shacl issue

23 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Jun 23, 2021, 3:46:53 AM6/23/21
to topbrai...@googlegroups.com

So in total i have now:

 

# baseURI: https://w3id.org/sml-example/shacl/def

# imports: https://w3id.org/sml/shacl/def

# imports: https://w3id.org/sml-example/rdfs/def

# prefix: ex

 

@prefix ex: <https://w3id.org/sml-example/def#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .

@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .

@prefix qudt: <http://qudt.org/schema/qudt/> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

@prefix sml: <https://w3id.org/sml/def#> .

@prefix time: <http://www.w3.org/2006/time#> .

@prefix unit: <http://qudt.org/vocab/unit/> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

 

<https://w3id.org/sml-example/shacl/def>

  a owl:Ontology ;

  owl:imports <https://w3id.org/sml/shacl/def> ;

  owl:imports <https://w3id.org/sml-example/rdfs/def> ;

.

ex:Bridge

  a sh:NodeShape ;

  sh:property [

    sh:path ex:height ;

    sh:minCount 1 ;

    ] ;

  sh:property [

    sh:path sml:hasPart ;

    sh:minCount 1 ;

    sh:maxCount 1 ;

    sh:class ex:Deck ;

    ] ;

.

ex:Deck

  a sh:NodeShape ;

  sh:property [

    sh:path sml:hasPart ;

    sh:minCount 1 ;

    sh:class ex:Slab ;

    ] ;

.

ex:Vehicle

  a sh:NodeShape ;

  sh:property [

    sh:path ex:loadLevel ;

    sh:class ex:LoadLevelType ;

    sh:in (ex:Light ex:Normal ex:Heavy ) ;

    ] ;

  sh:property [

    sh:path ex:hasLegalSpeed ;

    sh:datatype xsd:boolean ;

    ] ;

.

ex:accuracy

  a sh:NodeShape ;

  sh:class sml:QuantityValue ;

.

ex:currentlyServingVehicle

  a sh:NodeShape ;

  sh:class ex:Vehicle ;

.

ex:height

  a sh:NodeShape ;

  sh:class sml:QuantityValue ;

.

ex:velocity

  a sh:NodeShape ;

  sh:class sml:QuantityValue ;

.

 

Where the typing is in the imported rdfs-graph:

 

# baseURI: https://w3id.org/sml-example/rdfs/def

# imports: https://w3id.org/sml/rdfs/def

# imports: https://w3id.org/sml-example/skos/term

# prefix: ex

 

@prefix ex-term: <https://w3id.org/sml-example/term#> .

@prefix ex: <https://w3id.org/sml-example/def#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .

@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .

@prefix qudt: <http://qudt.org/schema/qudt/> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

@prefix sml: <https://w3id.org/sml/def#> .

@prefix time: <http://www.w3.org/2006/time#> .

@prefix unit: <http://qudt.org/vocab/unit/> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

 

<https://w3id.org/sml-example/rdfs/def>

  a owl:Ontology ;

  owl:imports <https://w3id.org/sml/rdfs/def> ;

  owl:imports <https://w3id.org/sml-example/skos/term> ;

.

ex:Bridge

  a rdfs:Class ;

  rdfs:isDefinedBy ex-term:Bridge ;

  rdfs:subClassOf sml:PhysicalObject ;

.

ex:Deck

  a rdfs:Class ;

  rdfs:isDefinedBy ex-term:Deck ;

  rdfs:subClassOf sml:PhysicalObject ;

.

ex:Heavy

  a ex:LoadLevelType ;

  rdfs:isDefinedBy ex-term:Heavy ;

.

ex:Light

  a ex:LoadLevelType ;

  rdfs:isDefinedBy ex-term:Light ;

.

ex:LoadLevelType

  a rdfs:Class ;

  rdfs:isDefinedBy ex-term:LoadLevelType ;

  rdfs:subClassOf sml:EnumerationType ;

.

ex:NonGeometricProperties

  a rdfs:Container ;

  rdfs:isDefinedBy ex-term:NonGeometricProperties ;

  rdfs:member ex:loadLevel ;

  rdfs:member ex:velocity ;

.

ex:Normal

  a ex:LoadLevelType ;

  rdfs:isDefinedBy ex-term:Normal ;

.

ex:Slab

  a rdfs:Class ;

  rdfs:isDefinedBy ex-term:Slab ;

  rdfs:subClassOf sml:PhysicalObject ;

.

ex:Vehicle

  a rdfs:Class ;

  rdfs:subClassOf sml:PhysicalObject ;

.

ex:accuracy

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:accuracy ;

  rdfs:range sml:QuantityValue ;

.

ex:currentlyServingVehicle

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:currentlyServingVehicle ;

  rdfs:range ex:Vehicle ;

.

ex:hasLegalSpeed

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:hasLegalSpeed ;

  rdfs:domain ex:Vehicle ;

  rdfs:range xsd:boolean ;

.

ex:height

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:height ;

  rdfs:range sml:QuantityValue ;

  sml:quantityKind quantitykind:Length ;

.

ex:loadLevel

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:loadLevel ;

  rdfs:domain ex:Vehicle ;

  rdfs:range ex:LoadLevelType ;

.

ex:velocity

  a rdf:Property ;

  rdfs:isDefinedBy ex-term:velocity ;

  rdfs:range sml:QuantityValue ;

  sml:quantityKind quantitykind:Speed ;

.

 

And the terminology is in a separate skos graph again, but this aside…

 

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

Reply all
Reply to author
Forward
0 new messages