Struct horned_owl::model::Build[][src]

pub struct Build(_);

Build creates new IRI and NamedEntity instances.

There is caching for performance. An IRI or NamedEntity with a given IRI will use the same string in memory, if they have been created with the same builder. Equality, ordering and hashing is conserved across different Build instances, so entities from different instances can be combined within a single ontology without consequences except for increased memory use.

Methods

impl Build
[src]

Constructs a new IRI

Examples

let b = Build::new();
let iri = b.iri("http://www.example.com");
assert_eq!("http://www.example.com", String::from(iri));

Constructs a new Class.

Examples

let b = Build::new();
let c1 = b.class("http://www.example.com".to_string());
let c2 = b.class("http://www.example.com");

assert_eq!(c1, c2);

Constructs a new ObjectProperty.

Examples

let b = Build::new();
let obp1 = b.object_property("http://www.example.com".to_string());
let obp2 = b.object_property("http://www.example.com");

assert_eq!(obp1, obp2);

Constructs a new AnnotationProperty.

Examples

let b = Build::new();
let anp1 = b.annotation_property("http://www.example.com".to_string());
let anp2 = b.annotation_property("http://www.example.com");

assert_eq!(anp1, anp2);

Trait Implementations

impl Debug for Build
[src]

Formats the value using the given formatter. Read more

impl Default for Build
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl !Send for Build

impl !Sync for Build