On Jul 20, 2014 5:05 AM, "Peter F. Patel-Schneider" <pfpschneider@gmail.com> wrote: > > It is very hard to see how ShEx constraints can be associated with instances of RDFS types. I view the ability to associate constraints with instances of types as the most important aspect of a constraint system, hence my questions about how this can be done in ShEx. There's an obvious approach, but I don't think it is right? If only a single pattern may match a predicate then there can only be a single pattern matching rdf:type. If the entire class hierarchy is known at the time that the pattern is created, then a pattern can be created as a set of disjuncts. For each acceptable subclass there would be a disjunct for each member S of the power set of superclasses of that subclass, with a value set for rdf:type consisting of the subclass plus all members of S, with a fixed cardinality on the pattern equal to the size of the value set. As long as the matching is against a graph, so that duplicate triples are not present, this should match all and only the desired types. Fewer patterns could be used if all super classes are required to be present (one pattern for each distinct set of superclasses of an acceptable class that does not contain that any acceptable class). The value set for each pattern would contain the superclasses, plus each acceptable class for which those classes are the non-acceptable superclasses. The minimum cardinality would be one more than that of the set of superclasses. If inferencing is not allowed, and no superclasses that are not sufficient for a match are allowed, then a value set of just the sufficient classes, with minimum cardinality 1 would suffice. This seems too complicated to be the right way, so I may have missed something.Received on Sunday, 20 July 2014 13:05:34 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:39 UTC