Skip to content

Commit

Permalink
Remove ids:shapesGraph, instead use sh:shapesGraph
Browse files Browse the repository at this point in the history
Remove ids:shapesGraph, instead use sh:shapesGraph
  • Loading branch information
lcomet committed Sep 9, 2021
1 parent cf105d7 commit e7c3300
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
5 changes: 1 addition & 4 deletions examples/domain-specific-semantics-using-SHACL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ The Information Model is domain-independent; it contains generic properties for

The [TEMP_SHACL.ttl](TEMP_SHACL.ttl) contains a SHACL shape, which describes the schema of a JSON temperature dataset. The [TEMP_DATA_SCHEMA.json](TEMP_DATA_SCHEMA.json) file contains the corresponding JSON schema, from which the SHACL shape is derived.

[TEMP_RESOURCE.ttl](TEMP_RESOURCE.ttl) and [TEMP_RESOURCE.json](TEMP_RESOURCE.json), show an exemplary modelling of a temperature dataset as an _ids:Resource_ using the [RDF/Turtle](https://www.w3.org/TR/turtle/) or [JSON-LD](https://www.w3.org/TR/2014/REC-json-ld-20140116/) RDF serialization. The aforementioned [TEMP_SHACL.ttl](TEMP_SHACL.ttl) SHACL shape can be referenced by its URI in the _ids:Resource_ (or _dcat:Distribution_) using the _ids:shapesGraph_ property, an import of _sh:shapesGraph_ into the IDS namespace. In this way, domain-specific semantics can be supplemented to a _ids:Resource / dcat:Distribution_.
[TEMP_RESOURCE.ttl](TEMP_RESOURCE.ttl) and [TEMP_RESOURCE.json](TEMP_RESOURCE.json), show an exemplary modelling of a temperature dataset as an _ids:Resource_ using the [RDF/Turtle](https://www.w3.org/TR/turtle/) or [JSON-LD](https://www.w3.org/TR/2014/REC-json-ld-20140116/) RDF serialization. The aforementioned [TEMP_SHACL.ttl](TEMP_SHACL.ttl) SHACL shape can be referenced by its URI in the _ids:Resource_ (or _dcat:Distribution_) using the _sh:shapesGraph_ property, an import of _sh:shapesGraph_ into the IDS namespace. In this way, domain-specific semantics can be supplemented to a _ids:Resource / dcat:Distribution_.

```
ids:shapesGraph "<URI of an RDF graph containing SHACL shapes>";
```

##### Validate data using SHACL
With a SHACL validator, such as the Open Source [TopBraid SHACL API](https://github.com/TopQuadrant/shacl) tool or the [SHACL Playground](https://shacl.org/playground/) website, one can validate RDF / JSON-LD data using SHACL shapes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ sample_Data:
ids:propertyPartition "<Ref to subset of a ids:VocabularyData>";
];

# Value of ids:shapesGraph should be a URI to a graph (e.g., an RDF file) containing one or more SHACL shapes which describe the domain-specific semantics of the ids:Resource
ids:shapesGraph "https://example.com/shacl_shapes/temperature_shacl.ttl";
# Value of sh:shapesGraph should be a URI to a graph (e.g., an RDF file) containing one or more SHACL shapes which describe the domain-specific semantics of the ids:Resource
sh:shapesGraph "https://example.com/shacl_shapes/temperature_shacl.ttl";

ids:representation [
a ids:DataRepresentation ;
Expand Down
9 changes: 0 additions & 9 deletions model/shared/DescribedSemantically.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,3 @@ ids:DescribedSemantically
rdfs:label "DescribedSemantically"@en ;
rdfs:comment "Entity described semantically."@en ;
.


ids:shapesGraph a owl:DatatypeProperty;
rdfs:subPropertyOf sh:shapesGraph;
rdfs:domain ids:DescribedSemantically;
rdfs:range xsd:anyURI;
rdfs:label "shapeGraph"@en;
rdfs:comment "Reference to SHACL shape graph, which describes domain-specific knowledge."@en;
.
4 changes: 2 additions & 2 deletions testing/shared/DescribedSemanticallyShape.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ shapes:DescribedSemanticallyShape

sh:property [
a sh:PropertyShape ;
sh:path ids:shapesGraph ;
sh:path sh:shapesGraph ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/InformationModel/master/testing/shared/DescribedSemantically.ttl> (DescribedSemanticallyShape): An ids:shapesGraph property must point from an ids:DescribedSemantically to zero or one IRI."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/InformationModel/master/testing/shared/DescribedSemantically.ttl> (DescribedSemanticallyShape): An sh:shapesGraph property must point from an ids:DescribedSemantically to zero or one IRI."@en ;
] .

0 comments on commit e7c3300

Please sign in to comment.