Skip to main content

owl_structural_model/
property_axiom.rs

1//! Checked construction for property axiom families.
2use crate::{Axiom, AxiomAnnotations, ObjectPropertyExpression, SubObjectPropertyExpression};
3impl<L, B> Axiom<L, B> {
4    /// Construct `SubObjectPropertyOf` without axiom annotations.
5    #[must_use]
6    pub fn sub_object_property_of(
7        sub_property: SubObjectPropertyExpression,
8        super_property: ObjectPropertyExpression,
9    ) -> Self {
10        Self::SubObjectPropertyOf {
11            sub_property,
12            super_property,
13            annotations: AxiomAnnotations::empty(),
14        }
15    }
16    /// Construct `FunctionalObjectProperty` without axiom annotations.
17    #[must_use]
18    pub fn functional_object_property(property: ObjectPropertyExpression) -> Self {
19        Self::FunctionalObjectProperty {
20            property,
21            annotations: AxiomAnnotations::empty(),
22        }
23    }
24    /// Construct `InverseFunctionalObjectProperty` without axiom annotations.
25    #[must_use]
26    pub fn inverse_functional_object_property(property: ObjectPropertyExpression) -> Self {
27        Self::InverseFunctionalObjectProperty {
28            property,
29            annotations: AxiomAnnotations::empty(),
30        }
31    }
32    /// Construct `ReflexiveObjectProperty` without axiom annotations.
33    #[must_use]
34    pub fn reflexive_object_property(property: ObjectPropertyExpression) -> Self {
35        Self::ReflexiveObjectProperty {
36            property,
37            annotations: AxiomAnnotations::empty(),
38        }
39    }
40    /// Construct `IrreflexiveObjectProperty` without axiom annotations.
41    #[must_use]
42    pub fn irreflexive_object_property(property: ObjectPropertyExpression) -> Self {
43        Self::IrreflexiveObjectProperty {
44            property,
45            annotations: AxiomAnnotations::empty(),
46        }
47    }
48    /// Construct `SymmetricObjectProperty` without axiom annotations.
49    #[must_use]
50    pub fn symmetric_object_property(property: ObjectPropertyExpression) -> Self {
51        Self::SymmetricObjectProperty {
52            property,
53            annotations: AxiomAnnotations::empty(),
54        }
55    }
56    /// Construct `AsymmetricObjectProperty` without axiom annotations.
57    #[must_use]
58    pub fn asymmetric_object_property(property: ObjectPropertyExpression) -> Self {
59        Self::AsymmetricObjectProperty {
60            property,
61            annotations: AxiomAnnotations::empty(),
62        }
63    }
64    /// Construct `TransitiveObjectProperty` without axiom annotations.
65    #[must_use]
66    pub fn transitive_object_property(property: ObjectPropertyExpression) -> Self {
67        Self::TransitiveObjectProperty {
68            property,
69            annotations: AxiomAnnotations::empty(),
70        }
71    }
72}