pyowl2.axioms.assertion.negative_data_property_assertion
An implementation of an OWL negative data property assertion that formally declares a specific individual does not possess a particular literal value for a given data property.
Description
The software models a specific type of axiom used in ontology engineering to represent the absence of a relationship between an individual and a data value. By inheriting from a base assertion class, it encapsulates a source individual, a target literal value, and a data property expression to define the negation, while also supporting optional annotations for metadata. The internal state is managed through properties that allow both retrieval and modification of the core components, ensuring the assertion can be inspected or updated dynamically after instantiation. A string representation method generates a functional syntax format that includes the annotations and the structural elements of the assertion, facilitating serialization or debugging within the broader ontology framework.
Classes
This entity models a negative assertion within an ontology, formally declaring that a specific individual is not associated with a particular literal value through a given data property. It is constructed by defining a source individual, a target data value, and the data property expression that connects them, effectively stating that the relationship does not exist. Users can optionally attach a list of annotations to the axiom to provide context or metadata. The internal components—the property, the individual, and the target value—are accessible and mutable, allowing for the assertion to be inspected or modified after creation. |
Module Contents
UML Class Diagram for OWLNegativeDataPropertyAssertion
- class OWLNegativeDataPropertyAssertion(
- expression: pyowl2.abstracts.data_property_expression.OWLDataPropertyExpression,
- source: pyowl2.abstracts.individual.OWLIndividual,
- value: pyowl2.literal.literal.OWLLiteral,
- annotations: list[pyowl2.base.annotation.OWLAnnotation] | None = None,
Bases:
pyowl2.abstracts.assertion.OWLAssertion
This entity models a negative assertion within an ontology, formally declaring that a specific individual is not associated with a particular literal value through a given data property. It is constructed by defining a source individual, a target data value, and the data property expression that connects them, effectively stating that the relationship does not exist. Users can optionally attach a list of annotations to the axiom to provide context or metadata. The internal components—the property, the individual, and the target value—are accessible and mutable, allowing for the assertion to be inspected or modified after creation.
- Parameters:
data_property_expression (OWLDataPropertyExpression) – The data property expression that is asserted not to relate the source individual to the target value.
source_individual (OWLIndividual) – The individual that serves as the subject of the negative assertion, representing the entity that is asserted not to possess the specified data property value.
target_value (OWLLiteral) – The concrete data value that the source individual is asserted not to possess for the given data property.
- __str__() str[source]
Returns a string representation of the negative data property assertion using a functional syntax format. The output string includes the axiom annotations, the data property expression, the source individual, and the target value. If the object has no associated annotations, the representation explicitly displays an empty list in the annotation position.
- Returns:
A string representation of the negative data property assertion in a functional syntax, including the annotations, data property expression, source individual, and target value.
- Return type:
str
- _data_property_expression: pyowl2.abstracts.data_property_expression.OWLDataPropertyExpression
- _source_individual: pyowl2.abstracts.individual.OWLIndividual
- _target_value: pyowl2.literal.literal.OWLLiteral
- property data_property_expression: pyowl2.abstracts.data_property_expression.OWLDataPropertyExpression
Assigns a new data property expression to this negative data property assertion, replacing any previously held value. The method accepts an instance of OWLDataPropertyExpression, defining the specific data property that is being negated for the subject individual. This setter directly mutates the internal state of the object.
- Parameters:
value (OWLDataPropertyExpression) – The OWL data property expression to assign to the object.
- property source_individual: pyowl2.abstracts.individual.OWLIndividual
Updates the subject individual associated with the negative data property assertion. This method assigns the provided OWLIndividual object to the internal state, overwriting any previously stored source individual.
- Parameters:
value (OWLIndividual) – The OWL individual to assign as the source.
- property target_value: pyowl2.literal.literal.OWLLiteral
Assigns the specific literal value that is being negated by this assertion. The method accepts an OWLLiteral object representing the data value and updates the internal state to reflect this new target. This operation modifies the object in place, changing the semantic meaning of the assertion to deny that the subject individual has this specific property value.
- Parameters:
value (OWLLiteral) – The OWLLiteral to assign as the target value.