-
Notifications
You must be signed in to change notification settings - Fork 14
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
TREE relations vs. SHACL constraint components #115
Comments
I’m not sure how we would be able to do that to be honest. Could you mint an example of what that would look like? We could also just refer to specific shacl components from the spec of course, but I’m not sure either where exactly |
I've adapted example 2 of the specification to the proposed idea, keeping the AND logic of multiple tree relations. @prefix ex: <http://example.org/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix tree: <https://w3id.org/tree#>.
ex:Collection1 a tree:Collection;
tree:member
ex:Subject1,
ex:Subject2;
tree:view ex:Node1.
ex:Node1 a tree:Node;
tree:relation
ex:R1,
ex:R2,
ex:R3.
ex:R1 a tree:Relation;
sh:minInclusive 3;
sh:path ex:value;
tree:node ex:Node3.
ex:R2 a tree:Relation;
sh:maxExclusive 10;
sh:path ex:value;
tree:node ex:Node3;
tree:remainingItems 7.
ex:R3 a tree:Relation;
sh:minInclusive 10;
sh:path ex:value;
tree:node ex:Node4;
tree:remainingItems 10.
ex:Subject1 a ex:Subject;
ex:value 1;
rdfs:label "Subject 1".
ex:Subject2 a ex:Subject;
ex:value 2;
rdfs:label "Subject 2". We could also make @prefix ex: <http://example.org/>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix tree: <https://w3id.org/tree#>.
ex:R1 a tree:Relation;
sh:property [
sh:minInclusive 3;
sh:path ex:value1
], [
sh:minInclusive 30;
sh:path ex:value2
];
tree:node ex:Node3. |
That’s a really interesting idea! I wonder how complex this would become to implement: where do we stop supporting sh:NodeShape and PropertyShape features? I think we could just have a special type of I’ll schedule this issue in the next call |
Is there a particular reason why the tree spec defines its own relations and doesn't use SHACL constraint components? I would see the following benefits:
Drawback:
The text was updated successfully, but these errors were encountered: