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.
Constructs a new IRI
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
.
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
.
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
.
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);
Formats the value using the given formatter. Read more
Returns the "default value" for a type. Read more