Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update shacl shapes #19

Merged
merged 12 commits into from
Dec 7, 2024
2 changes: 2 additions & 0 deletions journeyStar.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,15 @@ js:hasDate rdf:type owl:DatatypeProperty ;

### http://journey-star.dhlab.unibas.ch/ontology/JourneyStar#startDate
js:startDate rdf:type owl:DatatypeProperty ;
rdfs:subPropertyOf js:hasDate ;
rdfs:label "Startdatum"@de ,
"Start date"@en ;
rdfs:comment "The start of an activity."@en .


### http://journey-star.dhlab.unibas.ch/ontology/JourneyStar#endDate
js:endDate rdf:type owl:DatatypeProperty ;
rdfs:subPropertyOf js:hasDate ;
rdfs:label "Enddatum"@de ,
"has end date"@en ;
rdfs:comment "The end of an activity."@en .
Expand Down
76 changes: 57 additions & 19 deletions journeyStar_shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ js-shacl:PersonShape a sh:NodeShape ;
sh:or ( [ sh:datatype xsd:dateTime ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYear ]) ;
]
,
] ,
[
sh:path schema:birthPlace ;
sh:maxCount 1 ;
Expand All @@ -66,7 +65,8 @@ js-shacl:PersonShape a sh:NodeShape ;
[
sh:path js:hasWikiLink ;
sh:maxCount 1 ;
sh:datatype xsd:anyURI ;
sh:or ([ sh:datatype xsd:anyURI ]
[ sh:nodeKind sh:IRI ]) ;
] .

### Shape for Class js:Location
Expand All @@ -86,7 +86,7 @@ js-shacl:LocationShape a sh:NodeShape ;
] ,
[
sh:path js:alternativeName ;
sh:minCount 0 ;
sh:datatype xsd:string ;
] ,
[
sh:path js:hasWikiLink ;
Expand All @@ -95,41 +95,41 @@ js-shacl:LocationShape a sh:NodeShape ;
[ sh:nodeKind sh:IRI ]) ;
] .

### Shape for Class js:Journey
### Shape for Class js:Trip
#########################################
js-shacl:JourneyShape a sh:NodeShape ;
sh:targetClass js:Journey ;
js-shacl:TripShape a sh:NodeShape ;
sh:targetClass js:Trip ;
sh:property
[
sh:path js:hasParticipant ;
sh:nodeKind sh:IRI ;
] ,
[
sh:path js:hasStay ;
sh:node js-shacl:StayShape ;
] ,
[
sh:path js:origin ;
sh:minCount 1 ;
sh:or ( [ sh:datatype xsd:string ]
[ sh:node js-shacl:LocationShape ]
[ sh:datatype xsd:anyURI ]
[ sh:nodeKind sh:IRI ]) ;
] ,
[
sh:path js:destination ;
sh:minCount 1 ;
sh:or ( [ sh:datatype xsd:string ]
[ sh:node js-shacl:LocationShape ]
[ sh:datatype xsd:anyURI ]
[ sh:nodeKind sh:IRI ]) ;
] ,
[
sh:path js:startDate ;
sh:maxCount 1 ;
sh:or ( [ sh:datatype xsd:dateTime ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYear ]) ;
] ,
[
sh:path js:endDate ;
sh:maxCount 1 ;
sh:or ( [ sh:datatype xsd:dateTime ]
[ sh:datatype xsd:date ]
[ sh:datatype xsd:gYear ]) ;
Expand All @@ -148,6 +148,36 @@ js-shacl:JourneyShape a sh:NodeShape ;
sh:node js-shacl:LocationShape ;
] .

### Shape for Class js:Journey
Nora-Olivia-Ammann marked this conversation as resolved.
Show resolved Hide resolved
#########################################
js-shacl:JourneyShape a sh:NodeShape ;
sh:targetClass js:Journey ;
sh:property
[
sh:path js:origin ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ,
[
sh:path js:destination ;
sh:minCount 1 ;
sh:maxCount 1 ;
] ,
[
sh:path js:startDate ;
sh:maxCount 1 ;
] ,
[
sh:path js:endDate ;
sh:maxCount 1 ;
] ,
[
sh:path js:destination ;
sh:disjoint js:origin ;
sh:severity sh:Violation ;
sh:message "A Journey is specified that the destination and origin are not the same location."@en;
Nora-Olivia-Ammann marked this conversation as resolved.
Show resolved Hide resolved
] .

### Shape for Class js:Excursion
#########################################
js-shacl:ExcursionShape a sh:NodeShape ;
Expand All @@ -158,6 +188,14 @@ js-shacl:ExcursionShape a sh:NodeShape ;
sh:equals js:origin ;
sh:severity sh:Violation ;
sh:message "An excursion is specified by returning back to the location of departure after visiting a different location"@en;
] ,
[
sh:path js:startDate ;
sh:maxCount 1 ;
] ,
[
sh:path js:endDate ;
sh:maxCount 1 ;
] .

### Shape for Class js:Stay
Expand Down Expand Up @@ -198,13 +236,15 @@ js-shacl:AccommodationShape a sh:NodeShape ;
[
sh:path schema:address ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
] ,
[
sh:path js:hasLocation ;
sh:or ( [ sh:datatype xsd:string ]
[ sh:node js-shacl:LocationShape ]
[ sh:datatype xsd:anyURI ]
[ sh:nodeKind sh:IRI ]) ;
sh:maxCount 1 ;
] .

### Shape for Class js:Event
Expand Down Expand Up @@ -238,13 +278,13 @@ js-shacl:ActivityShape a sh:NodeShape ;
sh:targetClass js:Activity ;
sh:property
[
sh:path schema:name;
sh:datatype xsd:string;
sh:path schema:name ;
sh:datatype xsd:string ;
] ,
[
sh:path js:hasCost ;
sh:maxCount 1;
sh:datatype xsd:decimal ;
sh:maxCount 1 ;
] .

### Shape for Class js:SightSeeing
Expand All @@ -254,10 +294,10 @@ js-shacl:SightSeeingShape a sh:NodeShape ;
sh:property
[
sh:path js:sightingOf ;
sh:minCount 1 ;
sh:or ([ sh:datatype xsd:anyURI ]
[ sh:nodeKind sh:IRI ]
[ sh:datatype xsd:string ]) ;
sh:minCount 1 ;
] .

### Shape for Class js:Dining
Expand Down Expand Up @@ -292,15 +332,14 @@ js-shacl:CurrencyShape a sh:NodeShape ;
sh:property
[
sh:path schema:name ;
sh:minCount 1 ;
sh:datatype xsd:string ;
sh:minCount 1 ;
] ,
[
sh:path js:hasSubunit ;
sh:or ([ sh:node js-shacl:CurrencyShape ]
[ sh:nodeKind sh:IRI ]
[ sh:datatype xsd:anyURI ]
)
[ sh:datatype xsd:anyURI ] ) ;
] ,
[
sh:path js:alternativeName ;
Expand Down Expand Up @@ -500,7 +539,6 @@ js-shacl:valuePropertyShape
[ sh:datatype xsd:integer ]) ;
sh:minExclusive 0 .


### Star-Shape for Property js:certaintyPercentage
####################################################
js-shacl:certaintyPercentagePropertyShape
Expand Down