On Oct 10, 2019, at 11:41 AM, Fan Li <lifa...@gmail.com> wrote:
Recently we encountered a situation where the validation error "Value must be an instance of [some class]" is raised, even though the individual has been declared an instance of a subclass of the class. We looked it up and it seems the error is related to the lack of RDFS entailment in the validation process: https://book.validatingrdf.com/bookHtml011.html#sec171
The referenced book also mentioned that entailment may be enabled during the validation process. Is it possible within EDG?
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/f4ad53ab-2f70-402c-8d4d-4b906ac5d69e%40googlegroups.com.
# baseURI: urn:x-evn-master:mytest# imports: http://datashapes.org/dash# imports: http://datashapes.org/graphql
@prefix mytest: <http://example.org/ontologies/mytest#> .@prefix metadata: <http://topbraid.org/metadata#> .@prefix sh: <http://www.w3.org/ns/shacl#> .@prefix teamwork: <http://topbraid.org/teamwork#> .@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix owl: <http://www.w3.org/2002/07/owl#> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .<urn:x-evn-master:mytest> a owl:Ontology ; rdfs:label "mytest" ; metadata:status metadata:UnderDevelopmentStatus ; teamwork:newInstancesUserCannotModifyURI false ; owl:imports <http://datashapes.org/dash> , <http://datashapes.org/graphql> .
mytest:B a sh:NodeShape , owl:Class ; rdfs:label "B" ; rdfs:subClassOf owl:Thing .
mytest:A a sh:NodeShape , owl:Class ; rdfs:label "A" ; rdfs:subClassOf mytest:B .
mytest:C a sh:NodeShape , owl:Class ; rdfs:label "C" ; rdfs:subClassOf owl:Thing ; sh:property mytest:C-prop1 .
mytest:C-prop1 a sh:PropertyShape ; sh:class mytest:B ; sh:path mytest:prop1 .
mytest:prop1 a owl:ObjectProperty ; rdfs:label "prop1" .
# baseURI: urn:x-evn-master:mytest# imports: http://datashapes.org/dash# imports: http://datashapes.org/graphql
@prefix mytest: <http://example.org/ontologies/mytest#> .@prefix metadata: <http://topbraid.org/metadata#> .@prefix sh: <http://www.w3.org/ns/shacl#> .@prefix teamwork: <http://topbraid.org/teamwork#> .@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .@prefix owl: <http://www.w3.org/2002/07/owl#> .@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .<urn:x-evn-master:mytest> a owl:Ontology ; rdfs:label "mytest" ; metadata:status metadata:UnderDevelopmentStatus ; teamwork:newInstancesUserCannotModifyURI false ; owl:imports <http://datashapes.org/dash> , <http://datashapes.org/graphql> .
mytest:34640a83-2c1b-11b2-80f2-005056bba47c a mytest:A ; rdfs:label "a1" .
mytest:34640a85-2c1b-11b2-80f2-005056bba47c a mytest:C ; rdfs:label "c1" ; mytest:prop1 mytest:34640a83-2c1b-11b2-80f2-005056bba47c .Fan Li,
Irene
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
rdfs:subClassOf declarations needed to walk the class hierarchy need to exist in the data graph. rdfs:subClassOf triples in order for SHACL to correctly identify class targets and validate Core SHACL constraints.To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/ef7c2a88-f029-43bd-9a80-ef4314110ed3%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/ef7c2a88-f029-43bd-9a80-ef4314110ed3%40googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/0c03228c-b996-4102-b0f8-0cadb0078423%40googlegroups.com.
> <mytest.ttl>
You do not need to separate them into 2 graphs for the purposes of validation. Shape graph and data graph are just roles. You could use a single graph as both, shapes and data.
As a best practice, we recommend separating schema (shapes) from data (instances) and connecting a graph with instances with a graph that defines schema using Includes/owl:imports mechanism.
>> On Oct 10, 2019, at 12:40 PM, Fan Li <lifa...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/7072fcbd-de2d-4597-b4c1-903948ec6582%40googlegroups.com.
I have also responded to the similar question at https://github.com/TopQuadrant/shacl-js/issues/22
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/735136E5-B2FC-4B4E-B2FB-7F739F0B91D6%40topquadrant.com.
I have also responded to the similar question at https://github.com/TopQuadrant/shacl-js/issues/22
Holger
Stefan,Is your question about EDG or about SHACL playground?
- In EDG, Data Graph is a type of asset collection that contains only instance data. When you create a data graph in EDG, you will be asked for an ontology to base it on. The dialog will give you a selection of ontologies that are available in your environment.
- It is important that there is a class in that ontology that is declared to be public. This should be a class for which you will have data. If your data will belong to multiple classes, make a common parent public. Please see https://doc.topquadrant.com/6.3/ontologies/#SHACL_requirements_for_working_with_Reference_Datasets_and_Data_Graphs
- Once this is set up, you can use Import RDF to load your data in JSON-LD serialization or any other serialization. The ontology you chose should, of course, correspond to this data. In other words, have SHACL Shapes for it.
In SHACL, there are two terms, “shapes graph” and “data graph”. These are roles that any graph can play. A SHACL engine will use a shapes graph as a source for SHACL Shapes and it will use a data graph as a source of data to be validated against these shapes. These are just roles and you can have the same graph playing both roles. You can also use as a data graph a graph containing just shapes, not “instance data” . This can be useful to validate your shapes declarations against the meta shapes for SHACL. If your graphs contain any owl:imports, SHACL engines should act on them, but you are not required to have them.SHACL playground is a sample implementation of SHACL in JavaScript.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.