You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature has been requested by a simple use case. Some users want to use the same shapes to describe data which validate the same data before and after applying inference.
For example, imagine some RDF data like the following:
A possible shape for teachers before RDFS inference could be:
<TeacherShape> {
a [ :Teacher] ;
schema:name xsd:string ;
}
but if we apply inference, that node would no longer conform, because the inference system would add the triple :alice a :Person.
A possible shape for teachers after inference could be:
<TeacherShape> {
a [ :Teacher] ;
a [:Person ] ;
schema:name xsd:string ;
}
But in this case, the node before inference would not conform as expected.
Although this is right, from a practical point of view, keeping two set of shapes, one for shapes of nodes before inference and another for shapes of nodes after inference can be problematic so some users (see this issue ), are requesting some solution to have a single shape file which can be used to validate both before and after inference.
One solution could be to define some annotations to disable the validation of some constraints when some conditions are met
For example, a shape for the previous case could be:
<TeacherShape> {
a [ :Teacher] ;
a [:Person ] ; // sx:applyWhen sx:RDFSEntailment
schema:name xsd:string ;
}
where the annotation sx:applyWhen defines that the triple constraint a [:Person] should only be applied when the validation is performed after RDFS inference.
Maybe there are other solutions or best practices that we could recommend for this use case.
The text was updated successfully, but these errors were encountered:
@hsolbrig had a similar issue where his data had non-redundant type arcs; when validating an instance of :Dog as :Animal, it would be nice to infer that the
<S> { a [:Animal] }
constraint was met by the data:
<n>a :Dog .
Would such inference by specified by RDFS written in another graph?
This feature has been requested by a simple use case. Some users want to use the same shapes to describe data which validate the same data before and after applying inference.
For example, imagine some RDF data like the following:
A possible shape for teachers before RDFS inference could be:
but if we apply inference, that node would no longer conform, because the inference system would add the triple
:alice a :Person
.A possible shape for teachers after inference could be:
But in this case, the node before inference would not conform as expected.
Although this is right, from a practical point of view, keeping two set of shapes, one for shapes of nodes before inference and another for shapes of nodes after inference can be problematic so some users (see this issue ), are requesting some solution to have a single shape file which can be used to validate both before and after inference.
One solution could be to define some annotations to disable the validation of some constraints when some conditions are met
For example, a shape for the previous case could be:
where the annotation
sx:applyWhen
defines that the triple constrainta [:Person]
should only be applied when the validation is performed after RDFS inference.Maybe there are other solutions or best practices that we could recommend for this use case.
The text was updated successfully, but these errors were encountered: