Skip to content

Commit

Permalink
GH-4923 Spaces inserted by PropertyPathBuilder cause problems with Al…
Browse files Browse the repository at this point in the history
…legroGraph

- Removed spaces after prefix operators and before postfix operators
  • Loading branch information
reckart committed Mar 6, 2024
1 parent 23f3e8c commit 97731a1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public InversePath(PropertyPath path) {
this.path = path;
}

@Override
public String getQueryString() {
return "^ " + path.getQueryString();
return "^" + path.getQueryString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public InversePredicatePath(IRI predicate) {

@Override
public String getQueryString() {
return "^ " + predicate.getQueryString();
return "^" + predicate.getQueryString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public NegatedPropertySet(PredicatePathOrInversePredicatePath... properties) {
@Override
public String getQueryString() {
if (properties.length == 1) {
return "! " + properties[0].getQueryString();
return "!" + properties[0].getQueryString();
} else {
return Arrays
.stream(properties)
.map(QueryElement::getQueryString)
.collect(Collectors.joining(" | ", "! ( ", " )"));
.collect(Collectors.joining(" | ", "!( ", " )"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public OneOrMorePath(PropertyPath path) {

@Override
public String getQueryString() {
return path.getQueryString() + " +";
return path.getQueryString() + "+";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public ZeroOrMorePath(PropertyPath path) {

@Override
public String getQueryString() {
return path.getQueryString() + " *";
return path.getQueryString() + "*";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public ZeroOrOnePath(PropertyPath path) {

@Override
public String getQueryString() {
return path.getQueryString() + " ?";
return path.getQueryString() + "?";
}
}

0 comments on commit 97731a1

Please sign in to comment.