|
|
@ -256,19 +256,21 @@ impl<I: StrId> Hash for EncodedTerm<I> { |
|
|
|
|
|
|
|
|
|
|
|
impl<I: StrId> EncodedTerm<I> { |
|
|
|
impl<I: StrId> EncodedTerm<I> { |
|
|
|
pub fn is_named_node(&self) -> bool { |
|
|
|
pub fn is_named_node(&self) -> bool { |
|
|
|
matches!(self, |
|
|
|
matches!(self, Self::NamedNode { .. }) |
|
|
|
Self::NamedNode { .. }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn is_blank_node(&self) -> bool { |
|
|
|
pub fn is_blank_node(&self) -> bool { |
|
|
|
matches!(self, |
|
|
|
matches!( |
|
|
|
|
|
|
|
self, |
|
|
|
Self::NumericalBlankNode { .. } |
|
|
|
Self::NumericalBlankNode { .. } |
|
|
|
| Self::SmallBlankNode { .. } |
|
|
|
| Self::SmallBlankNode { .. } |
|
|
|
| Self::BigBlankNode { .. }) |
|
|
|
| Self::BigBlankNode { .. } |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn is_literal(&self) -> bool { |
|
|
|
pub fn is_literal(&self) -> bool { |
|
|
|
matches!(self, |
|
|
|
matches!( |
|
|
|
|
|
|
|
self, |
|
|
|
Self::SmallStringLiteral { .. } |
|
|
|
Self::SmallStringLiteral { .. } |
|
|
|
| Self::BigStringLiteral { .. } |
|
|
|
| Self::BigStringLiteral { .. } |
|
|
|
| Self::SmallSmallLangStringLiteral { .. } |
|
|
|
| Self::SmallSmallLangStringLiteral { .. } |
|
|
@ -292,11 +294,15 @@ impl<I: StrId> EncodedTerm<I> { |
|
|
|
| Self::GMonthLiteral(_) |
|
|
|
| Self::GMonthLiteral(_) |
|
|
|
| Self::DurationLiteral(_) |
|
|
|
| Self::DurationLiteral(_) |
|
|
|
| Self::YearMonthDurationLiteral(_) |
|
|
|
| Self::YearMonthDurationLiteral(_) |
|
|
|
| Self::DayTimeDurationLiteral(_)) |
|
|
|
| Self::DayTimeDurationLiteral(_) |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn is_unknown_typed_literal(&self) -> bool { |
|
|
|
pub fn is_unknown_typed_literal(&self) -> bool { |
|
|
|
matches!(self, Self::SmallTypedLiteral { .. } | Self::BigTypedLiteral { .. }) |
|
|
|
matches!( |
|
|
|
|
|
|
|
self, |
|
|
|
|
|
|
|
Self::SmallTypedLiteral { .. } | Self::BigTypedLiteral { .. } |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pub fn is_default_graph(&self) -> bool { |
|
|
|
pub fn is_default_graph(&self) -> bool { |
|
|
|