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
 
<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.


> On Jan 30, 2020, at 5:04 AM, Stefan Verweij <[email protected]> wrote:
> 
> 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 
> >> <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 <http://datashapes.org/dash> 
> >> # imports: http://datashapes.org/graphql <http://datashapes.org/graphql> 
> >> 
> >> @prefix mytest: <http://example.org/ontologies/mytest# 
> >> <http://example.org/ontologies/mytest#>> . 
> >> @prefix metadata: <http://topbraid.org/metadata# 
> >> <http://topbraid.org/metadata#>> . 
> >> @prefix sh:    <http://www.w3.org/ns/shacl# <http://www.w3.org/ns/shacl#>> 
> >> . 
> >> @prefix teamwork: <http://topbraid.org/teamwork# 
> >> <http://topbraid.org/teamwork#>> . 
> >> @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns# 
> >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> . 
> >> @prefix owl:   <http://www.w3.org/2002/07/owl# 
> >> <http://www.w3.org/2002/07/owl#>> . 
> >> @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema# 
> >> <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://topbraid.org/swa#defaultNamespace>> 
> >>                 "http://example.org/ontologies/mytest# 
> >> <http://example.org/ontologies/mytest#>" ; 
> >>         teamwork:newInstancesUserCannotModifyURI 
> >>                 false ; 
> >>         owl:imports      <http://datashapes.org/dash 
> >> <http://datashapes.org/dash>> , <http://datashapes.org/graphql 
> >> <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 <http://datashapes.org/dash> 
> >> # imports: http://datashapes.org/graphql <http://datashapes.org/graphql> 
> >> 
> >> @prefix mytest: <http://example.org/ontologies/mytest# 
> >> <http://example.org/ontologies/mytest#>> . 
> >> @prefix metadata: <http://topbraid.org/metadata# 
> >> <http://topbraid.org/metadata#>> . 
> >> @prefix sh:    <http://www.w3.org/ns/shacl# <http://www.w3.org/ns/shacl#>> 
> >> . 
> >> @prefix teamwork: <http://topbraid.org/teamwork# 
> >> <http://topbraid.org/teamwork#>> . 
> >> @prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns# 
> >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> . 
> >> @prefix owl:   <http://www.w3.org/2002/07/owl# 
> >> <http://www.w3.org/2002/07/owl#>> . 
> >> @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema# 
> >> <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://topbraid.org/swa#defaultNamespace>> 
> >>                 "http://example.org/ontologies/mytest# 
> >> <http://example.org/ontologies/mytest#>" ; 
> >>         teamwork:newInstancesUserCannotModifyURI 
> >>                 false ; 
> >>         owl:imports      <http://datashapes.org/dash 
> >> <http://datashapes.org/dash>> , <http://datashapes.org/graphql 
> >> <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] 
> <mailto:[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
>  
> <https://groups.google.com/d/msgid/topbraid-users/7072fcbd-de2d-4597-b4c1-903948ec6582%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/735136E5-B2FC-4B4E-B2FB-7F739F0B91D6%40topquadrant.com.

Reply via email to