axiom.restriction

OWL 2 object-property class-expression (restriction) structural elements.

Mirrors the data-property restriction family in axiom.datatype. Concrete subclasses of ObjectRestriction declare rdf:type owl:Restriction and pair owl:onProperty with a filler or cardinality predicate per the OWL 2 RDF mapping.

Value and universal/existential restrictions:

Cardinality restrictions (unqualified and qualified via owl:onClass):

Classes

ObjectRestriction

Abstract base for OWL 2 class expressions that restrict an object property.

ObjectSomeValuesFrom

Element ObjectSomeValuesFrom( OPE CE ) in the OWL 2 structural specification.

ObjectAllValuesFrom

Element ObjectAllValuesFrom( OPE CE ) in the OWL 2 structural specification.

ObjectHasValue

Element ObjectHasValue( OPE a ) in the OWL 2 structural specification.

ObjectHasSelf

Element ObjectHasSelf( OPE ) in the OWL 2 structural specification.

ObjectMinCardinality

Element ObjectMinCardinality( n OPE ) in the OWL 2 structural specification.

ObjectMinCardinalityQualified

Element ObjectMinCardinality( n OPE CE ) in the OWL 2 structural specification.

ObjectMaxCardinality

Element ObjectMaxCardinality( n OPE ) in the OWL 2 structural specification.

ObjectMaxCardinalityQualified

Element ObjectMaxCardinality( n OPE CE ) in the OWL 2 structural specification.

ObjectExactCardinality

Element ObjectExactCardinality( n OPE ) in the OWL 2 structural specification.

ObjectExactCardinalityQualified

Element ObjectExactCardinality( n OPE CE ) in the OWL 2 structural specification.

Module Contents

class axiom.restriction.ObjectRestriction(/, **data: Any)

Bases: axiom.structural_element.StructuralElement, abc.ABC

Abstract base for OWL 2 class expressions that restrict an object property.

Not directly instantiable. Each concrete subclass declares a node of rdf:type owl:Restriction and pairs owl:onProperty with a class, individual, self, or cardinality predicate per the OWL 2 RDF mapping. name is the RDF subject of the restriction node (typically a blank node).

name_value: axiom.common.N3Resource = None
property name: rdflib.IdentifiedNode

Restriction node identifier (alias of name_value).

property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectSomeValuesFrom(/, **data: Any)

Bases: ObjectRestriction

Element ObjectSomeValuesFrom( OPE CE ) in the OWL 2 structural specification.

The RDF subject is typically an anonymous blank node (written _:x below).

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:someValuesFrom CE .
kind: Literal['ObjectSomeValuesFrom'] = 'ObjectSomeValuesFrom'
on_property: axiom.common.N3IRIRef
some_values_from: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectAllValuesFrom(/, **data: Any)

Bases: ObjectRestriction

Element ObjectAllValuesFrom( OPE CE ) in the OWL 2 structural specification.

The RDF subject is typically an anonymous blank node (written _:x below).

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:allValuesFrom CE .
kind: Literal['ObjectAllValuesFrom'] = 'ObjectAllValuesFrom'
on_property: axiom.common.N3IRIRef
all_values_from: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectHasValue(/, **data: Any)

Bases: ObjectRestriction

Element ObjectHasValue( OPE a ) in the OWL 2 structural specification.

The RDF subject is typically an anonymous blank node (written _:x below). has_value is an individual (IRI or blank node).

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:hasValue a .
kind: Literal['ObjectHasValue'] = 'ObjectHasValue'
on_property: axiom.common.N3IRIRef
has_value: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectHasSelf(/, **data: Any)

Bases: ObjectRestriction

Element ObjectHasSelf( OPE ) in the OWL 2 structural specification.

The RDF subject is typically an anonymous blank node (written _:x below). The mapping always uses the boolean literal "true"^^xsd:boolean.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:hasSelf "true"^^xsd:boolean .
kind: Literal['ObjectHasSelf'] = 'ObjectHasSelf'
on_property: axiom.common.N3IRIRef
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectMinCardinality(/, **data: Any)

Bases: ObjectRestriction

Element ObjectMinCardinality( n OPE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:minCardinality "n"^^xsd:nonNegativeInteger .
kind: Literal['ObjectMinCardinality'] = 'ObjectMinCardinality'
on_property: axiom.common.N3IRIRef
min_cardinality: axiom.common.N3Node
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectMinCardinalityQualified(/, **data: Any)

Bases: ObjectRestriction

Element ObjectMinCardinality( n OPE CE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:minQualifiedCardinality "n"^^xsd:nonNegativeInteger .
_:x owl:onClass CE .
kind: Literal['ObjectMinCardinalityQualified'] = 'ObjectMinCardinalityQualified'
on_property: axiom.common.N3IRIRef
min_qualified_cardinality: axiom.common.N3Node
on_class: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectMaxCardinality(/, **data: Any)

Bases: ObjectRestriction

Element ObjectMaxCardinality( n OPE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:maxCardinality "n"^^xsd:nonNegativeInteger .
kind: Literal['ObjectMaxCardinality'] = 'ObjectMaxCardinality'
on_property: axiom.common.N3IRIRef
max_cardinality: axiom.common.N3Node
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectMaxCardinalityQualified(/, **data: Any)

Bases: ObjectRestriction

Element ObjectMaxCardinality( n OPE CE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:maxQualifiedCardinality "n"^^xsd:nonNegativeInteger .
_:x owl:onClass CE .
kind: Literal['ObjectMaxCardinalityQualified'] = 'ObjectMaxCardinalityQualified'
on_property: axiom.common.N3IRIRef
max_qualified_cardinality: axiom.common.N3Node
on_class: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectExactCardinality(/, **data: Any)

Bases: ObjectRestriction

Element ObjectExactCardinality( n OPE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:cardinality "n"^^xsd:nonNegativeInteger .
kind: Literal['ObjectExactCardinality'] = 'ObjectExactCardinality'
on_property: axiom.common.N3IRIRef
cardinality: axiom.common.N3Node
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.

class axiom.restriction.ObjectExactCardinalityQualified(/, **data: Any)

Bases: ObjectRestriction

Element ObjectExactCardinality( n OPE CE ) in the OWL 2 structural specification.

Triples:

_:x rdf:type owl:Restriction .
_:x owl:onProperty OPE .
_:x owl:qualifiedCardinality "n"^^xsd:nonNegativeInteger .
_:x owl:onClass CE .
kind: Literal['ObjectExactCardinalityQualified'] = 'ObjectExactCardinalityQualified'
on_property: axiom.common.N3IRIRef
qualified_cardinality: axiom.common.N3Node
on_class: axiom.common.N3Resource
property as_triples: collections.abc.Sequence[axiom.common.Triple]

Triples representing this element as RDF; MUST NOT recurse into related elements.