-
Notifications
You must be signed in to change notification settings - Fork 0
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
Draft: SHACL derived from map #126
base: issue_115_shapes
Are you sure you want to change the base?
Conversation
@@ -2,7 +2,7 @@ base "https://schema.example.org/" | |||
|
|||
// this sample is inspired by https://w3c.github.io/shacl/shacl-compact-syntax/#example | |||
|
|||
node-shape PersonNodeShape { | |||
node-shape PersonNodeShape from PersonMapping { |
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.
Main change, which would have multiple effects:
- every property mapped in the the
PersonMapping
would automatically generate a Property Shape, even if not listed here - properties would be suggested from the predicates mapped in
properties
- target classes would be suggested based on the mapping
types
@@ -14,26 +14,29 @@ node-shape PersonNodeShape { | |||
rdf.^type | |||
|
|||
properties | |||
ex.ssn node-kind Literal [0..1] { |
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.
Removed node-kind
because it would be implied from the the mapping itself
node-kind Any | ||
cardinality [0..*] |
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 propose to move node-kind
and cardinality
inside the block since I expect both would be optional
classes ex.Company | ||
pattern "^https://data.example.org/" |
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.
Removed because sh:pattern
actually does not work with URLs
datatype xsd.string | ||
} | ||
} | ||
|
||
node-shape EmptyNodeShape { | ||
} | ||
|
||
property-shape EmptyPropertyShape node-kind Any [0..*] { | ||
property-shape EmptyPropertyShape { | ||
node-kind Any |
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 think that node-kind Any
could actually be skipped unless its purpose is to override the default output derived from the mapping.
This PR suggests to support filling shapes from existing mapping blocks. An earlier idea #7 was the exact opposite: to write the shapes first and drive proposals shown in the mapping from the shape |
re #125