Documentation ¶
Overview ¶
Package voc implements an RDF namespace (vocabulary) registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullIRI ¶
FullIRI replaces known prefix in IRI with it's full vocabulary IRI.
FullIRI("rdf:type") // returns "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
func RegisterPrefix ¶
RegisterPrefix globally associates a given prefix with a base vocabulary IRI.
Types ¶
type ByFullName ¶
type ByFullName []Namespace
func (ByFullName) Len ¶
func (o ByFullName) Len() int
func (ByFullName) Less ¶
func (o ByFullName) Less(i, j int) bool
func (ByFullName) Swap ¶
func (o ByFullName) Swap(i, j int)
type Namespaces ¶
type Namespaces struct { Safe bool // if set, assume no locking is required // contains filtered or unexported fields }
Namespaces is a set of registered namespaces.
func (*Namespaces) Clone ¶
func (p *Namespaces) Clone() *Namespaces
Clone makes a copy of namespaces list.
func (*Namespaces) CloneTo ¶
func (p *Namespaces) CloneTo(p2 *Namespaces)
CloneTo adds registered namespaces to a given list.
func (*Namespaces) FullIRI ¶
func (p *Namespaces) FullIRI(iri string) string
FullIRI replaces known prefix in IRI with it's full vocabulary IRI.
FullIRI("rdf:type") // returns "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
func (*Namespaces) List ¶
func (p *Namespaces) List() (out []Namespace)
List enumerates all registered namespace pairs.
func (*Namespaces) Register ¶
func (p *Namespaces) Register(ns Namespace)
Register adds namespace to registered list.
func (*Namespaces) ShortIRI ¶
func (p *Namespaces) ShortIRI(iri string) string
ShortIRI replaces a base IRI of a known vocabulary with it's prefix.
ShortIRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type") // returns "rdf:type"
Directories ¶
Path | Synopsis |
---|---|
Package core imports all well-known RDF vocabularies.
|
Package core imports all well-known RDF vocabularies. |
Package owl contains constants of the Web Ontology Language (OWL)
|
Package owl contains constants of the Web Ontology Language (OWL) |
Package rdf contains constants of the RDF Concepts Vocabulary (RDF)
|
Package rdf contains constants of the RDF Concepts Vocabulary (RDF) |
Package rdfs contains constants of the RDF Schema vocabulary (RDFS)
|
Package rdfs contains constants of the RDF Schema vocabulary (RDFS) |
Package schema contains constants of the Schema.org vocabulary.
|
Package schema contains constants of the Schema.org vocabulary. |
Package xsd contains constants of the W3C XML Schema Definition Language https://www.w3.org/TR/xmlschema11-1/
|
Package xsd contains constants of the W3C XML Schema Definition Language https://www.w3.org/TR/xmlschema11-1/ |
Click to show internal directories.
Click to hide internal directories.