Crate rdftk_names

Source
Expand description

names This crate provides a set of modules that contain the Iris 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.

use rdftk_names::namespace;

namespace! {
    "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§

dc
Namespaces for Dublin Core metadata.
foaf
Functions that create IRIs for the Friend of a Friend namespace.
geo
Functions that create IRIs for the W3C Geo Vocabulary namespace.
owl
Functions that create IRIs for the OWL 2 Web ontology Language OWL2 namespace.
rdf
Functions that create IRIs for the RDF namespace.
rdfs
Functions that create IRIs for the RDF Schema namespace.
skos
Namespaces for SKOS, SKOS eXtension for Labels (SKOS-XL), and the ISO-25964 thesaurus vocabulary.
xsd
Functions that create IRIs for the XML Schema Data Types namespace.

Macros§

namespace
This macro produces the constants and functions to describe a vocabulary.
nsname
This macro should only called by the namespace! macro. It takes an identifier and a string and produces: