owl_structural_model/
property_schema.rs1use crate::{
3 Axiom, AxiomAnnotations, ClassExpression, ObjectPropertyExpression, OperandSet,
4 StructuralModelError, UnorderedPair,
5};
6impl<L, B> Axiom<L, B> {
7 pub fn equivalent_object_properties(
11 properties: Vec<ObjectPropertyExpression>,
12 ) -> Result<Self, StructuralModelError> {
13 Ok(Self::EquivalentObjectProperties {
14 properties: OperandSet::try_new(properties)?,
15 annotations: AxiomAnnotations::empty(),
16 })
17 }
18 pub fn disjoint_object_properties(
22 properties: Vec<ObjectPropertyExpression>,
23 ) -> Result<Self, StructuralModelError> {
24 Ok(Self::DisjointObjectProperties {
25 properties: OperandSet::try_new(properties)?,
26 annotations: AxiomAnnotations::empty(),
27 })
28 }
29 #[must_use]
31 pub fn inverse_object_properties(
32 first: ObjectPropertyExpression,
33 second: ObjectPropertyExpression,
34 ) -> Self {
35 Self::InverseObjectProperties {
36 properties: UnorderedPair::new(first, second),
37 annotations: AxiomAnnotations::empty(),
38 }
39 }
40 #[must_use]
42 pub fn object_property_domain(
43 property: ObjectPropertyExpression,
44 domain: ClassExpression<L, B>,
45 ) -> Self {
46 Self::ObjectPropertyDomain {
47 property,
48 domain,
49 annotations: AxiomAnnotations::empty(),
50 }
51 }
52 #[must_use]
54 pub fn object_property_range(
55 property: ObjectPropertyExpression,
56 range: ClassExpression<L, B>,
57 ) -> Self {
58 Self::ObjectPropertyRange {
59 property,
60 range,
61 annotations: AxiomAnnotations::empty(),
62 }
63 }
64}