-
Notifications
You must be signed in to change notification settings - Fork 30
Issue 172: Support for sh:closed sh:ByTypes
#399
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
Open
HolgerKnublauch
wants to merge
7
commits into
gh-pages
Choose a base branch
from
issue-172
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fd41d9f
Parking unfinished work
HolgerKnublauch 3e2a347
#172: Support for sh:ByTypes, test cases
HolgerKnublauch 86aaeec
#172: Fixed test case number
HolgerKnublauch 7b95194
Update shacl12-core/index.html
HolgerKnublauch f8c75c1
Apply suggestions from code review
HolgerKnublauch 3aa6bf7
Removed unnecessary sh:ignoredProperties statement
HolgerKnublauch aee3f4b
Merge branch 'gh-pages' into issue-172
HolgerKnublauch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@prefix dash: <http://datashapes.org/dash#> . | ||
@prefix ex: <http://example.com/ns#> . | ||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix sht: <http://www.w3.org/ns/shacl-test#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
ex:RootClass | ||
a rdfs:Class, sh:NodeShape ; | ||
sh:property [ sh:path ex:rootClassProperty1 ] ; | ||
sh:closed sh:ByTypes ; | ||
. | ||
ex:SubClass | ||
a rdfs:Class, sh:NodeShape ; | ||
rdfs:subClassOf ex:RootClass ; | ||
sh:property [ sh:path ex:subClassProperty1 ] ; | ||
sh:property [ sh:path ex:subClassProperty2 ] ; | ||
sh:closed sh:ByTypes ; | ||
. | ||
|
||
# Invalid because it uses ex:subClassProperty1 but it's not an instance of SubClass | ||
ex:InvalidInstance1 | ||
a ex:RootClass ; | ||
ex:subClassProperty1 1 ; | ||
. | ||
ex:ValidInstance1 | ||
a ex:RootClass ; | ||
ex:rootClassProperty1 1 ; | ||
. | ||
ex:ValidInstance2 | ||
a ex:SubClass ; | ||
ex:rootClassProperty1 1 ; | ||
ex:subClassProperty1 3 ; | ||
ex:subClassProperty2 4 ; | ||
. | ||
<> | ||
rdf:type mf:Manifest ; | ||
mf:entries ( | ||
<closed-003> | ||
) ; | ||
. | ||
<closed-003> | ||
rdf:type sht:Validate ; | ||
rdfs:label "Test of sh:closed at node shape 003" ; | ||
mf:action [ | ||
sht:dataGraph <> ; | ||
sht:shapesGraph <> ; | ||
] ; | ||
mf:result [ | ||
rdf:type sh:ValidationReport ; | ||
sh:conforms "false"^^xsd:boolean ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:focusNode ex:InvalidInstance1 ; | ||
sh:resultPath ex:subClassProperty1 ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:ClosedConstraintComponent ; | ||
sh:sourceShape ex:RootClass ; | ||
sh:value 1 ; | ||
] ; | ||
] ; | ||
mf:status sht:approved ; | ||
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
@prefix dash: <http://datashapes.org/dash#> . | ||
@prefix ex: <http://example.com/ns#> . | ||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix sht: <http://www.w3.org/ns/shacl-test#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
ex:RootClass | ||
a rdfs:Class, sh:NodeShape ; | ||
sh:property [ sh:path ex:rootClassProperty1 ] ; | ||
sh:closed sh:ByTypes ; | ||
. | ||
ex:SubClass | ||
a rdfs:Class, sh:NodeShape ; | ||
rdfs:subClassOf ex:RootClass ; | ||
sh:property [ sh:path ex:subClassProperty1 ] ; | ||
sh:property [ sh:path ex:subClassProperty2 ] ; | ||
. | ||
ex:RootShape | ||
a sh:NodeShape ; | ||
sh:targetClass ex:RootClass ; | ||
sh:property [ sh:path ex:rootShapeProperty1 ] ; | ||
. | ||
ex:SubShape | ||
a sh:NodeShape ; | ||
sh:targetClass ex:SubClass ; | ||
sh:node ex:SuperShape ; | ||
sh:property [ sh:path ex:subShapeProperty1 ] ; | ||
. | ||
ex:SuperShape | ||
a sh:NodeShape ; | ||
sh:property [ sh:path ex:superShapeProperty1 ] ; | ||
. | ||
|
||
# Invalid because it uses ex:subClassProperty1 but it's not an instance of SubClass | ||
ex:InvalidInstance1 | ||
a ex:RootClass ; | ||
ex:subClassProperty1 1 ; | ||
. | ||
ex:ValidInstance1 | ||
a ex:RootClass ; | ||
ex:rootClassProperty1 1 ; | ||
ex:rootShapeProperty1 2 ; | ||
. | ||
ex:ValidInstance2 | ||
a ex:SubClass ; | ||
ex:rootClassProperty1 1 ; | ||
ex:rootShapeProperty1 2 ; | ||
ex:subClassProperty1 3 ; | ||
ex:subClassProperty2 4 ; | ||
ex:subShapeProperty1 5 ; | ||
ex:superShapeProperty1 6 ; | ||
. | ||
<> | ||
rdf:type mf:Manifest ; | ||
mf:entries ( | ||
<closed-004> | ||
) ; | ||
. | ||
<closed-004> | ||
rdf:type sht:Validate ; | ||
rdfs:label "Test of sh:closed at node shape 004" ; | ||
mf:action [ | ||
sht:dataGraph <> ; | ||
sht:shapesGraph <> ; | ||
] ; | ||
mf:result [ | ||
rdf:type sh:ValidationReport ; | ||
sh:conforms "false"^^xsd:boolean ; | ||
sh:result [ | ||
rdf:type sh:ValidationResult ; | ||
sh:focusNode ex:InvalidInstance1 ; | ||
sh:resultPath ex:subClassProperty1 ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:ClosedConstraintComponent ; | ||
sh:sourceShape ex:RootClass ; | ||
sh:value 1 ; | ||
] ; | ||
] ; | ||
mf:status sht:approved ; | ||
. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre was adding syntax highlighting in unsuitable places in my testing. Have you tried to render your change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried out the suggested changes, and indeed some unwanted highlighting was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do my editing in GitHub's web interface, so I can't see my changes rendered until they're merged into a PR and PR-Preview is invoked.
I guess there's some CSS used on other
<pre>
blocks to prevent the unwanted syntax highlighting. Changing from the manual formatting to the<pre>
isn't vital; if I find the CSS incantation I'll try to apply it later.