Skip to content

Commit

Permalink
combine shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Aug 13, 2024
1 parent bb96d34 commit 0bc3324
Show file tree
Hide file tree
Showing 7 changed files with 197 additions and 242 deletions.
16 changes: 0 additions & 16 deletions resources/shape/AdditionalProperty.ttl

This file was deleted.

21 changes: 0 additions & 21 deletions resources/shape/Axles.ttl

This file was deleted.

251 changes: 197 additions & 54 deletions resources/shape/DataSheet.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX unit: <http://qudt.org/vocab/unit/>
PREFIX qudt: <http://qudt.org/schema/qudt/>
PREFIX quantitykind: <http://qudt.org/vocab/quantitykind/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX schema: <http://schema.org/>
PREFIX mads: <http://www.loc.gov/mads/rdf/v1#>
Expand All @@ -12,77 +17,215 @@ PREFIX sh: <http://www.w3.org/ns/shacl#>
sh:path mads:hasSource ;
sh:minCount 1 ;
sh:class mads:Source ;
] ,
],
[
sh:path wikibus:vehicle ;
sh:path dcterms:subject ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class wikibus:Vehicle ;
# sh:class wikibus:Vehicle ;
sh:nodeKind sh:IRI ;
],
[
sh:path schema:vehicleEngine ;
sh:class schema:EngineSpecification ;
],
[
sh:path wikibus:gearbox ;
sh:class wikibus:GearboxSpecification ;
sh:node <#gearbox> ;
],
[
sh:path schema:weight ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:numberOfAxles ;
sh:datatype xsd:integer ;
],
[
sh:path schema:weightTotal ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:length ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:width ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:height ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:wheelbase ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:seatingCapacity ;
sh:class schema:QuantitativeValue ;
],
[
sh:path wikibus:standingCapacity ;
sh:class schema:QuantitativeValue ;
],
[
sh:path wikibus:additionalCapacity ;
sh:class schema:QuantitativeValue ;
],
[
sh:path wikibus:axle ;
sh:class schema:QuantitativeValue ;
sh:node
[
sh:property
[
sh:path schema:position ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:integer ;
],
[
sh:path wikibus:differentialRatio ;
sh:maxCount 1 ;
sh:class schema:QuantitativeValue ;
]
] ;
],
[
sh:path mads:hasSource ;
sh:class mads:Source ;
sh:node
[
sh:property
[
sh:path mads:citationSource ;
sh:minCount 1 ;
] ;
] ;
] ;
.

<#engine>
a sh:NodeShape ;
sh:targetObjectsOf schema:vehicleEngine ;
sh:class schema:EngineSpecification ;
.

<#gearbox>
a sh:NodeShape ;
sh:targetObjectsOf wikibus:gearbox ;
sh:class wikibus:GearboxSpecification ;
.

<#weight>
<#propertyValue>
a sh:NodeShape ;
sh:targetObjectsOf schema:weight ;
sh:class schema:QuantitativeValue ;
sh:targetClass schema:PropertyValue ;
.

<#numberOfAxles>
<#quantativeValue>
a sh:NodeShape ;
sh:targetObjectsOf schema:numberOfAxles ;
sh:datatype xsd:integer ;
.

<#weightTotal>
a sh:NodeShape ;
sh:targetObjectsOf schema:weightTotal ;
sh:class schema:QuantitativeValue ;
.

<#length>
a sh:NodeShape ;
sh:targetObjectsOf schema:length ;
sh:class schema:QuantitativeValue ;
.

<#width>
a sh:NodeShape ;
sh:targetObjectsOf schema:width ;
sh:class schema:QuantitativeValue ;
.

<#height>
a sh:NodeShape ;
sh:targetObjectsOf schema:height ;
sh:class schema:QuantitativeValue ;
sh:targetClass schema:QuantitativeValue ;
sh:property
[
sh:deactivated true ;
sh:path schema:unitCode ;
sh:class qudt:Unit ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:node
[
sh:property
[
sh:path qudt:hasQuantityKind ;
sh:class quantitykind:Mass ;
] ;
] ;
] ;
.

<#wheelbase>
<#additionalProperty>
a sh:NodeShape ;
sh:targetObjectsOf schema:wheelbase ;
sh:class schema:QuantitativeValue ;
sh:targetObjectsOf schema:additionalProperty ;
sh:class schema:PropertyValue ;
.

<#seatingCapacity>
<#engine>
a sh:NodeShape ;
sh:targetObjectsOf schema:seatingCapacity ;
sh:class schema:QuantitativeValue ;
sh:targetClass schema:EngineSpecification ;
sh:property
[
sh:path schema:producer ;
sh:maxCount 1 ;
sh:or
(
[
sh:class schema:Brand ;
sh:deactivated true
]
[
sh:class schema:Organization ;
sh:deactivated true
]
) ;
],
[
sh:path schema:engineDisplacement ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:enginePower ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:valueReference ;
sh:maxCount 1 ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:unitCode ;
sh:hasValue unit:REV-PER-MIN ;
] ;
] ;
],
[
sh:path schema:torque ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:valueReference ;
sh:minCount 1 ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:unitCode ;
sh:hasValue unit:REV-PER-MIN ;
] ;
] ;
],
[
sh:path schema:fuelType ;
sh:in ( wd:Q38423 ) ;
],
[
sh:path wikibus:enginePlacement ;
sh:in ( wikibus:Rear ) ;
] ;
.

<#standingCapacity>
<#gearbox>
a sh:NodeShape ;
sh:targetObjectsOf wikibus:standingCapacity ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path wikibus:gearRatio ;
sh:class schema:QuantitativeValue ;
sh:node
[
sh:property
[
sh:message "The gear ratio requires gear reference" ;
sh:path schema:valueReference ;
sh:class schema:QuantitativeValue ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:node
[
sh:property
[
sh:path schema:value ;
sh:or ( [ sh:datatype xsd:integer ] [ sh:in (wd:Q2203464 wd:Q38553397) ] ) ;
] ;
] ;
] ;
] ;
] ;
.
57 changes: 0 additions & 57 deletions resources/shape/Engine.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,6 @@ PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX sh: <http://www.w3.org/ns/shacl#>

<>
a sh:NodeShape ;
sh:targetClass schema:EngineSpecification, wikibus:Engine ;
sh:property
[
sh:path schema:brand ;
sh:minCount 1 ;
sh:or
(
[ sh:class schema:Brand ]
[ sh:class schema:Organization ]
) ;
],
[
sh:path schema:engineDisplacement ;
sh:class schema:QuantitativeValue ;
],
[
sh:path schema:enginePower ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:valueReference ;
sh:minCount 1 ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:unitCode ;
sh:hasValue unit:REV-PER-MIN ;
] ;
] ;
],
[
sh:path schema:torque ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:valueReference ;
sh:minCount 1 ;
sh:class schema:QuantitativeValue ;
sh:property
[
sh:path schema:unitCode ;
sh:hasValue unit:REV-PER-MIN ;
] ;
] ;
],
[
sh:path schema:fuelType ;
sh:in ( wd:Q38423 ) ;
],
[
sh:path wikibus:enginePlacement ;
sh:in ( wikibus:Rear ) ;
] ;
.

<#EngineSpecification>
a sh:NodeShape ;
sh:targetClass schema:EngineSpecification ;
Expand Down
Loading

0 comments on commit 0bc3324

Please sign in to comment.