Expand description
This crate provides a set of modules that contain the IRI
s and QName
strings for commonly used vocabularies. It also provides macro support for defining new namespaces in the same style as this library.
The vocabularies supported can be found below.
Macro Example
The following example replicates the geo
module using the namespace!
macro. Note that as this
macro uses paste::item
the client will need to have a dependency on the
paste crate.
ⓘ
#[macro_use]
extern crate paste;
#[macro_use]
extern crate rdftk_names;
use rdftk_names::Vocabulary;
namespace! {
GeoSpatialVocabulary,
"geo",
"http://www.w3.org/2003/01/geo/wgs84_pos#",
{
spatial_thing, "SpatialThing",
temporal_thing, "TemporalThing",
event, "Event",
point, "Point",
lat, "lat",
location, "location",
long, "long",
alt, "alt",
lat_long, "lat_long"
}
}
Modules
Namespaces for Dublin Core metadata.
Functions that create IRIs for the Friend of a Friend namespace.
Functions that create IRIs for the W3C Geo Vocabulary namespace.
Functions that create IRIs for the RDF Schema namespace.
Functions that create IRIs for the XML Schema Data Types namespace.