rdflib
rdflib copied to clipboard
owl:qualifiedCardinality support lacked
According to OWL2 Primer, Functional-Style Syntax
ClassAssertion(
ObjectExactCardinality( 3 :hasChild :Parent )
:John
)
is valid, and is equal to Turtle Syntax
:John rdf:type [
rdf:type owl:Restriction ;
owl:qualifiedCardinality "3"^^xsd:nonNegativeInteger ;
owl:onProperty :hasChild ;
owl:onClass :Parent
] .
However, ns.John.type = rdflib.extras.infixowl.Restriction(ns.hasChild, graph=g, cardinality=Literal(3), someValuesFrom=Class(ns.Parent, graph=g))
will only generate Turtle Syntax
ns:John rdf:type [
rdf:type owl:Restriction ;
owl:cardinality "3"^^xsd:nonNegativeInteger ;
owl:onProperty ns:hasChild ;
] .
without owl:onClass
field.