pub enum DataRange<L = OwlLiteral> {
Datatype(Iri<String>),
DataIntersectionOf(OperandSet<Self, 2>),
DataUnionOf(OperandSet<Self, 2>),
DataComplementOf(Box<Self>),
DataOneOf(OperandSet<L, 1>),
DatatypeRestriction {
datatype: Iri<String>,
restrictions: OperandSet<FacetRestriction<L>, 1>,
},
}Expand description
A unary OWL 2 data range, independent of any datatype evaluator or RDF store.
Variants§
Datatype(Iri<String>)
A named datatype.
DataIntersectionOf(OperandSet<Self, 2>)
Intersection of at least two data ranges.
DataUnionOf(OperandSet<Self, 2>)
Union of at least two data ranges.
DataComplementOf(Box<Self>)
Complement of one data range.
DataOneOf(OperandSet<L, 1>)
Enumeration of at least one literal, preserving exact lexical forms.
DatatypeRestriction
A named datatype restricted by at least one facet/value pair.
Fields
restrictions: OperandSet<FacetRestriction<L>, 1>Structural restrictions, interpreted conjunctively.
Implementations§
Source§impl<L> DataRange<L>
impl<L> DataRange<L>
Sourcepub fn data_intersection_of(
operands: Vec<Self>,
) -> Result<Self, StructuralModelError>
pub fn data_intersection_of( operands: Vec<Self>, ) -> Result<Self, StructuralModelError>
Create an intersection of data ranges.
§Errors
Returns StructuralModelError::InvalidFormat for fewer than two operands.
Sourcepub fn data_union_of(operands: Vec<Self>) -> Result<Self, StructuralModelError>
pub fn data_union_of(operands: Vec<Self>) -> Result<Self, StructuralModelError>
Create a union of data ranges.
§Errors
Returns StructuralModelError::InvalidFormat for fewer than two operands.
Sourcepub fn data_complement_of(operand: Self) -> Self
pub fn data_complement_of(operand: Self) -> Self
Create the complement of a data range.
Sourcepub fn data_one_of(literals: Vec<L>) -> Result<Self, StructuralModelError>
pub fn data_one_of(literals: Vec<L>) -> Result<Self, StructuralModelError>
Create a literal enumeration without normalizing datatype values.
§Errors
Returns StructuralModelError::InvalidFormat for zero literals.
Sourcepub fn datatype_restriction(
datatype: Iri<String>,
restrictions: Vec<FacetRestriction<L>>,
) -> Result<Self, StructuralModelError>
pub fn datatype_restriction( datatype: Iri<String>, restrictions: Vec<FacetRestriction<L>>, ) -> Result<Self, StructuralModelError>
Create a restricted datatype without evaluating its facets or values.
§Errors
Returns StructuralModelError::InvalidFormat for zero facet restrictions.