| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| if (getIdentifier().getPath().endsWith("/")) { | ||
| final String container = normalize(getIdentifier()); |
There was a problem hiding this comment.
Newly, the condition is not normalized. This seems intentional.
But what happens with URIs of the form x/. and x/y/..?
Maybe we should normalize before checking whether it ends in a slash.
Sorry, something went wrong.
There was a problem hiding this comment.
getIdentifier from RDFSource via SolidRDFSource is a URI and getPath is not normalized.
Sorry, something went wrong.
There was a problem hiding this comment.
I've updated this to normalize the URI path
Sorry, something went wrong.
| if (!getIdentifier().getPath().endsWith("/")) { | ||
| messages.add("Container URI does not end in a slash"); | ||
| } | ||
|
|
||
| // Get the normalized container URI | ||
| final String container = normalize(getIdentifier()); |
There was a problem hiding this comment.
As above.
Maybe worth extracting something like isContainer for readability and consistency.
Sorry, something went wrong.
There was a problem hiding this comment.
done in 2b4b916
Sorry, something went wrong.
| if (!object.getIRIString().startsWith(container)) { | ||
| // Out-of-domain containment triple object | ||
|
|
||
| // 1 URI Structure Tests |
There was a problem hiding this comment.
What do these numbers refer to? I looked in several place I imagined would be relevant, but haven't found anything like this.
Sorry, something went wrong.
There was a problem hiding this comment.
That was more for my own organization. I've backed that out
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Resolves #634
This improves containment validation by considering more cases to be handled, specifically those containment triples that include fragment and query components.
The test cases have been expanded to include the additional cases.
The implementation makes more extensive use of normalized Java URI objects to achieve the improved validation.