hermitpy.load
Fragment
The loader turns an rdflib graph into a TBox and an ABox. A construct outside the fragment raises UnsupportedConstruct. It is not dropped.
Accepted
| Construct | What the loader does |
|---|---|
Named classes, owl:Thing, owl:Nothing | Named IRIs other than Thing and Nothing are recorded as classes to classify. |
rdfs:subClassOf | A named class on the left unfolds into its superclass. A complex left-hand side becomes a general inclusion. |
owl:equivalentClass | Two inclusions, one each way. Equivalence of two properties is refused. |
owl:disjointWith | Each class is a subclass of the complement of the other. Disjoint properties are refused. |
owl:complementOf, owl:intersectionOf, owl:unionOf | Parsed and pushed into negation normal form. |
owl:someValuesFrom, owl:allValuesFrom | Existential and universal restrictions on object properties, including inverse roles written with owl:inverseOf. |
owl:inverseOf | Named inverses are recorded both ways. A property declared inverse of itself is treated as symmetric. |
owl:TransitiveProperty, owl:SymmetricProperty | Named properties only. Transitivity is copied onto a named inverse. |
rdfs:domain, rdfs:range | Object-property domain and range, applied to a role and to its inverse. A datatype-property domain is an existential over rdfs:Literal. |
| Class assertions | individual a Class on a named individual. |
| Object-property assertions | Two named individuals and a named property. |
| Literal assertions | A named individual, a property, and a supported literal. |
Source: load.py.
Datatypes
Restrictions may use owl:onDatatype and owl:withRestrictions on a datatype property in the forward direction. The facets are xsd:minInclusive, xsd:maxInclusive, xsd:minExclusive, and xsd:maxExclusive. A datatype restriction on an inverse property is refused.
The numeric family is xsd:integer, xsd:int, xsd:long, xsd:short, xsd:nonNegativeInteger, xsd:positiveInteger, xsd:nonPositiveInteger, xsd:negativeInteger, xsd:decimal, xsd:double, xsd:float, owl:real, and owl:rational. Integer datatypes stay on integers when bounds are tightened. The other families are xsd:string, xsd:anyURI, xsd:date, xsd:dateTime, xsd:boolean, and rdfs:Literal. Any other datatype raises UnsupportedConstruct.
An existential numeric bound and a universal numeric bound that cannot overlap make the class unsatisfiable. The ontology can still be consistent.
Refused
These raise UnsupportedConstruct. The exception names the construct. See Errors.
- Cardinality, including
owl:maxCardinality,owl:minCardinality,owl:qualifiedCardinality, and the exact forms. - Property chains, role inclusion (
rdfs:subPropertyOf),owl:equivalentProperty, andowl:propertyDisjointWith. - Nominals (
owl:oneOf), keys,owl:hasSelf, andowl:disjointUnionOf. owl:sameAs,owl:differentFrom,owl:AllDifferent,owl:AllDisjointClasses, andowl:AllDisjointProperties.owl:FunctionalProperty,owl:InverseFunctionalProperty,owl:AsymmetricProperty,owl:IrreflexiveProperty, andowl:ReflexiveProperty.- Negative property assertions, SWRL, and
owl:imports. - Anonymous individuals, anonymous transitive or symmetric properties, cyclic class expressions, and a property with two conflicting
owl:inverseOftargets.
Any OWL predicate outside the accepted set is refused the same way, so a new constructor is not silently skipped.
Ignored
Annotation triples are skipped: rdfs:label, rdfs:comment, rdfs:seeAlso, rdfs:isDefinedBy, owl:versionInfo, owl:deprecated, and any property typed owl:AnnotationProperty. Ontology header triples such as owl:versionIRI, owl:priorVersion, owl:backwardCompatibleWith, and owl:incompatibleWith are not axioms.
How axioms land
A subclass axiom whose left side is a named class is stored as an unfolding of that name. Unfolding is applied when the tableau sees the atom. A left side that is a conjunction, a restriction, or another complex concept is stored as a general concept inclusion and added to every node.
owl:Nothing on the left of an inclusion is dropped. A superclass of owl:Thing is dropped. Declarations of owl:Class, owl:ObjectProperty, owl:DatatypeProperty, owl:NamedIndividual, and owl:Ontology are not class assertions.