Skip to main content

ClassExpression

Enum ClassExpression 

Source
pub enum ClassExpression<L = OwlLiteral, B = BlankNodeId> {
Show 18 variants Named(Iri<String>), ObjectIntersectionOf(OperandSet<Self, 2>), ObjectUnionOf(OperandSet<Self, 2>), ObjectComplementOf(Box<Self>), ObjectOneOf(OperandSet<Individual<B>, 1>), ObjectSomeValuesFrom { property: ObjectPropertyExpression, filler: Box<Self>, }, ObjectAllValuesFrom { property: ObjectPropertyExpression, filler: Box<Self>, }, ObjectHasValue { property: ObjectPropertyExpression, individual: Individual<B>, }, ObjectHasSelf { property: ObjectPropertyExpression, }, ObjectMinCardinality { cardinality: Cardinality, property: ObjectPropertyExpression, filler: Box<Self>, }, ObjectMaxCardinality { cardinality: Cardinality, property: ObjectPropertyExpression, filler: Box<Self>, }, ObjectExactCardinality { cardinality: Cardinality, property: ObjectPropertyExpression, filler: Box<Self>, }, DataSomeValuesFrom { properties: OperandList<Iri<String>, 1>, range: DataRange<L>, }, DataAllValuesFrom { properties: OperandList<Iri<String>, 1>, range: DataRange<L>, }, DataHasValue { property: Iri<String>, value: L, }, DataMinCardinality { cardinality: Cardinality, property: Iri<String>, range: DataRange<L>, }, DataMaxCardinality { cardinality: Cardinality, property: Iri<String>, range: DataRange<L>, }, DataExactCardinality { cardinality: Cardinality, property: Iri<String>, range: DataRange<L>, },
}
Expand description

All 18 OWL 2 class-expression forms.

Variants§

§

Named(Iri<String>)

A named class, including owl:Thing and owl:Nothing.

§

ObjectIntersectionOf(OperandSet<Self, 2>)

Intersection of at least two source occurrences.

§

ObjectUnionOf(OperandSet<Self, 2>)

Union of at least two source occurrences.

§

ObjectComplementOf(Box<Self>)

Complement of one class expression.

§

ObjectOneOf(OperandSet<Individual<B>, 1>)

Enumeration of individuals.

§

ObjectSomeValuesFrom

Existential object restriction.

Fields

§property: ObjectPropertyExpression

The property operand.

§filler: Box<Self>

The filler operand.

§

ObjectAllValuesFrom

Universal object restriction.

Fields

§property: ObjectPropertyExpression

The property operand.

§filler: Box<Self>

The filler operand.

§

ObjectHasValue

Object value restriction.

Fields

§property: ObjectPropertyExpression

The property operand.

§individual: Individual<B>

The individual operand.

§

ObjectHasSelf

Object self restriction.

Fields

§property: ObjectPropertyExpression

The property operand.

§

ObjectMinCardinality

Minimum object cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: ObjectPropertyExpression

The property operand.

§filler: Box<Self>

The filler operand.

§

ObjectMaxCardinality

Maximum object cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: ObjectPropertyExpression

The property operand.

§filler: Box<Self>

The filler operand.

§

ObjectExactCardinality

Exact object cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: ObjectPropertyExpression

The property operand.

§filler: Box<Self>

The filler operand.

§

DataSomeValuesFrom

Some data-value restriction, with ordered property positions.

Fields

§properties: OperandList<Iri<String>, 1>

The properties operand.

§range: DataRange<L>

The range operand.

§

DataAllValuesFrom

All data-value restriction, with ordered property positions.

Fields

§properties: OperandList<Iri<String>, 1>

The properties operand.

§range: DataRange<L>

The range operand.

§

DataHasValue

Data value restriction.

Fields

§property: Iri<String>

The property operand.

§value: L

The value operand.

§

DataMinCardinality

Min data cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: Iri<String>

The property operand.

§range: DataRange<L>

The range operand.

§

DataMaxCardinality

Max data cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: Iri<String>

The property operand.

§range: DataRange<L>

The range operand.

§

DataExactCardinality

Exact data cardinality restriction.

Fields

§cardinality: Cardinality

The cardinality operand.

§property: Iri<String>

The property operand.

§range: DataRange<L>

The range operand.

Implementations§

Source§

impl<L, B> ClassExpression<L, B>

Source

pub fn named(iri: Iri<String>) -> Self

Create a named class.

Source

pub fn thing() -> Self

Create owl:Thing as a named class.

Source

pub fn nothing() -> Self

Create owl:Nothing as a named class.

Source

pub fn is_thing(&self) -> bool

Return whether this expression is the named universal class.

Source

pub fn is_nothing(&self) -> bool

Return whether this expression is the named empty class.

Source

pub fn object_intersection_of( operands: Vec<Self>, ) -> Result<Self, StructuralModelError>

Create an unordered intersection.

§Errors

Rejects fewer than two source occurrences.

Source

pub fn object_union_of( operands: Vec<Self>, ) -> Result<Self, StructuralModelError>

Create an unordered union.

§Errors

Rejects fewer than two source occurrences.

Source

pub fn object_complement_of(operand: Self) -> Self

Create a complement expression.

Source

pub fn object_one_of( individuals: Vec<Individual<B>>, ) -> Result<Self, StructuralModelError>

Create a nonempty enumeration of individuals.

§Errors

Rejects an empty enumeration.

Source

pub fn object_some_values_from( property: ObjectPropertyExpression, filler: Self, ) -> Self

Create an object some-values restriction.

Source

pub fn object_all_values_from( property: ObjectPropertyExpression, filler: Self, ) -> Self

Create an object all-values restriction.

Source

pub fn object_has_value( property: ObjectPropertyExpression, individual: Individual<B>, ) -> Self

Create an object value restriction.

Source

pub fn object_has_self(property: ObjectPropertyExpression) -> Self

Create a self restriction.

Source§

impl<L, B> ClassExpression<L, B>

Source

pub fn kind(&self) -> ClassExpressionKind

Return the structural expression kind without evaluating it.

Source§

impl<L, B> ClassExpression<L, B>

Source

pub fn object_min_cardinality( cardinality: Cardinality, property: ObjectPropertyExpression, filler: Option<Self>, ) -> Self

Create an object minimum cardinality restriction; no filler means owl:Thing.

Source

pub fn object_max_cardinality( cardinality: Cardinality, property: ObjectPropertyExpression, filler: Option<Self>, ) -> Self

Create an object maximum cardinality restriction; no filler means owl:Thing.

Source

pub fn object_exact_cardinality( cardinality: Cardinality, property: ObjectPropertyExpression, filler: Option<Self>, ) -> Self

Create an object exact cardinality restriction; no filler means owl:Thing.

Source

pub fn data_some_values_from( properties: Vec<Iri<String>>, range: DataRange<L>, ) -> Result<Self, StructuralModelError>

Create a data some-values restriction with ordered property positions.

§Errors

Rejects an empty property list. Datatype arity is checked by semantic validators.

Source

pub fn data_all_values_from( properties: Vec<Iri<String>>, range: DataRange<L>, ) -> Result<Self, StructuralModelError>

Create a data all-values restriction with ordered property positions.

§Errors

Rejects an empty property list. Datatype arity is checked by semantic validators.

Source

pub fn data_has_value(property: Iri<String>, value: L) -> Self

Create a data-value restriction without evaluating the literal.

Source

pub fn data_min_cardinality( cardinality: Cardinality, property: Iri<String>, range: Option<DataRange<L>>, ) -> Self

Create a data minimum cardinality restriction; no range means rdfs:Literal.

Source

pub fn data_max_cardinality( cardinality: Cardinality, property: Iri<String>, range: Option<DataRange<L>>, ) -> Self

Create a data maximum cardinality restriction; no range means rdfs:Literal.

Source

pub fn data_exact_cardinality( cardinality: Cardinality, property: Iri<String>, range: Option<DataRange<L>>, ) -> Self

Create a data exact cardinality restriction; no range means rdfs:Literal.

Trait Implementations§

Source§

impl<L: Clone, B: Clone> Clone for ClassExpression<L, B>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<L: Debug, B: Debug> Debug for ClassExpression<L, B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, L, B> Deserialize<'de> for ClassExpression<L, B>
where L: Deserialize<'de>, B: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<L: Eq, B: Eq> Eq for ClassExpression<L, B>

Source§

impl<L: Hash, B: Hash> Hash for ClassExpression<L, B>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<L: PartialEq, B: PartialEq> PartialEq for ClassExpression<L, B>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<L, B> Serialize for ClassExpression<L, B>
where L: Serialize, B: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<L: PartialEq, B: PartialEq> StructuralPartialEq for ClassExpression<L, B>

Auto Trait Implementations§

§

impl<L, B> Freeze for ClassExpression<L, B>

§

impl<L, B> RefUnwindSafe for ClassExpression<L, B>

§

impl<L, B> Send for ClassExpression<L, B>

§

impl<L, B> Sync for ClassExpression<L, B>

§

impl<L, B> Unpin for ClassExpression<L, B>

§

impl<L, B> UnsafeUnpin for ClassExpression<L, B>

§

impl<L, B> UnwindSafe for ClassExpression<L, B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.