Hi Irene, I have a question regarding this topic: I cannot find any documentation about importing an ontology with the owl:import mechanism in a data graph with instances and how this data graph would look like then, e.g. if we look at the examples Fan gave (or one in JSON-LD format?). In the https://shacl.org/playground/ the data graph does not seem to import the ontology if I am not mistaken?
Stefan Op donderdag 10 oktober 2019 20:52:31 UTC+2 schreef Irene Polikoff: > > 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 <[email protected]> wrote: > >> > >> Hi Irene, thanks for your prompt response! I should be more clear that > the error doesn't surface in the EDG editor interface but through the SHACL > validation form (/edg/tbl/swp?_viewClass=tblshacl%3AValidationPage) as well > as the public shacl playground (http://shacl.org). I have enclosed a > simple example for you to reproduce. > >> > >> shape: > >> # 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 ; > >> <http://topbraid.org/swa#defaultNamespace> > >> "http://example.org/ontologies/mytest#" ; > >> 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" . > >> > >> > >> data: > >> # 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 ; > >> <http://topbraid.org/swa#defaultNamespace> > >> "http://example.org/ontologies/mytest#" ; > >> 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 . > >> > >> > >> > >> With regard to SHACL reference, I would be more than happy to know if > you have any recommendations. > >> > >> Thanks, > >> Fan > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/7072fcbd-de2d-4597-b4c1-903948ec6582%40googlegroups.com.
