-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Even though we tested the property shape in https://shacl.org/playground/, when upload the property shape to GraphDB, we encounter errors:
http://stko-kwg.geog.ucsb.ed/sosa-shacl/observedPropertyRangeConstraint is a sh:PropertyShape without a sh:path!
I then tried to add sh:path to the shape like:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .
@prefix sosa-shacl: <http://stko-kwg.geog.ucsb.ed/sosa-shacl/> .
@prefix time: <http://www.w3.org/2006/time#> .
### Shapes for property sosa:observedProperty
sosa-shacl:observedPropertyDomainConstraint
a sh:PropertyShape ;
sh:targetSubjectsOf sosa:observedProperty ;
sh:path sosa:observedProperty ;
rdfs:comment "We restrict the domain of sosa:observedProperty to sosa:Observation" ;
sh:class sosa:Observation .
And use it on sample data:
@prefix ex: <http://example.org/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sosa-shacl: <http://stko-kwg.geog.ucsb.ed/sosa-shacl/> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .
ex:obs1 a sosa:Observation ;
sosa:observedProperty ex:obsprop1 .
ex:sensor2 a sosa:Sensor ;
sosa:observedProperty ex:obsprop2 .
It will show that obs1 violates the shape (for both shacl playground and GraphDB), even though it should not. So I assume it means the shape is incorrect.
Any help on it would be appreciated!
Metadata
Metadata
Assignees
Labels
No labels