[−][src]Struct rdftk_core::resource::Resource
The main resource builder type.
Implementations
impl Resource
[src]
pub fn new(subject: SubjectNode) -> Self
[src]
Construct a new Resource
with the subject cloned from an existing
SubjectNode
.
pub fn blank() -> Self
[src]
Construct a new Resource
with a new blank node as the subject.
pub fn blank_named(name: &str) -> Self
[src]
Construct a new Resource
with a named blank node as the subject.
pub fn named(name: IRIRef) -> Self
[src]
Construct a new Resource
with the provided IRI
as the subject.
pub fn is_a_resource(&self) -> bool
[src]
Returns true
if this instance is a resource in web terms, that is it's subject is an IRI
.
pub fn is_an_individual(&self) -> bool
[src]
Returns true
if this instance is an individual in RDFS terms, that is it has at least one
rdf:type
predicate.
pub fn predicate(&mut self, predicate: Predicate) -> &mut Self
[src]
Add the Predicate
instance to this resource.
pub fn property(&mut self, predicate: IRIRef, value: Literal) -> &mut Self
[src]
Add a new predicate with a literal value to this resource.
pub fn value_of(&mut self, predicate: IRIRef, value: Literal) -> &mut Self
[src]
Add a new predicate with a literal value to this resource.
pub fn literal(&mut self, predicate: IRIRef, value: Literal) -> &mut Self
[src]
Add a new predicate with a literal value to this resource.
pub fn property_alternatives(
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
pub fn property_bag(
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
pub fn property_sequence(
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Literal]
) -> &mut Self
pub fn property_container(
&mut self,
predicate: IRIRef,
values: &[Literal],
kind: IRIRef
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Literal],
kind: IRIRef
) -> &mut Self
pub fn resource_blank_named(
&mut self,
predicate: IRIRef,
name: &str
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
name: &str
) -> &mut Self
pub fn resource_named(&mut self, predicate: IRIRef, name: IRIRef) -> &mut Self
[src]
pub fn resource(&mut self, predicate: IRIRef, resource: Resource) -> &mut Self
[src]
pub fn resource_alternatives(
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
pub fn resource_bag(
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
pub fn resource_sequence(
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Resource]
) -> &mut Self
pub fn resource_container(
&mut self,
predicate: IRIRef,
values: &[Resource],
kind: IRIRef
) -> &mut Self
[src]
&mut self,
predicate: IRIRef,
values: &[Resource],
kind: IRIRef
) -> &mut Self
pub fn instance_of(&mut self, name: IRIRef) -> &mut Self
[src]
Set the RDF type (classifier) of this resource.
Trait Implementations
impl Clone for Resource
[src]
impl Debug for Resource
[src]
impl Into<Vec<Rc<Statement>, Global>> for Resource
[src]
impl Into<Vec<Statement, Global>> for Resource
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Resource
impl !Send for Resource
impl !Sync for Resource
impl Unpin for Resource
impl !UnwindSafe for Resource
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,