Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CombinedEdgeLabelMapping #317

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Add CombinedEdgeLabelMapping #317

merged 2 commits into from
Nov 10, 2023

Conversation

BentolhodaH
Copy link
Collaborator

Add CombinedEdgeLabelMapping and its tests
Encapsulate creating EdgeLabelMapping into different functions to avoid duplicate code
Add UnSupportedEdgeLabelException

Encapsulate creating EdgeLabelMapping into different functions to avoid duplicate code
Add UnSupportedEdgeLabelException
@BentolhodaH BentolhodaH requested a review from hartig November 7, 2023 22:22
@BentolhodaH
Copy link
Collaborator Author

In 'RunBGPOverNeo4j.java,' currently, we are not reading the TTL file. It is necessary to specify a command-line argument to obtain the file address, similar to the file query file address. In this step, should I make modifications to that part to read from the example file instead of creating classes manually?

@hartig
Copy link
Member

hartig commented Nov 8, 2023

Indeed. The command-line tool needs to be extended to provide such an argument. Please do that, but in a separate PR. In terms of implementing it, it should be implemented more like the argument for the federation catalog that we have in the other command-line tool.

Copy link
Member

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor things.


@Override
public Node map(final String label) {
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
for ( final EdgeLabelMapping edgeLabelMapping : edgeLabelMappings ) {

}

public String unmap(final Node node) {
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
for ( final EdgeLabelMapping edgeLabelMapping : edgeLabelMappings ) {


@Override
public boolean isPossibleResult(final Node node) {
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (EdgeLabelMapping edgeLabelMapping : edgeLabelMappings) {
for ( final EdgeLabelMapping edgeLabelMapping : edgeLabelMappings ) {

try {
return edgeLabelMapping.map(label);
}
catch (IllegalArgumentException exception) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be UnSupportedEdgeLabelException ?

@BentolhodaH BentolhodaH requested a review from hartig November 10, 2023 20:10
Copy link
Member

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@hartig hartig merged commit d9dc2e5 into main Nov 10, 2023
1 check passed
@hartig hartig deleted the combinedEdgeLabelMapping branch November 10, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants