github.com/cayleygraph/cayley@v0.7.7/voc/voc.go (about) 1 // Package voc is deprecated. Use github.com/cayleygraph/quad/voc. 2 package voc 3 4 import ( 5 "github.com/cayleygraph/quad/voc" 6 ) 7 8 // Namespace is a RDF namespace (vocabulary). 9 // 10 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 11 type Namespace = voc.Namespace 12 13 type ByFullName = voc.ByFullName 14 15 // Namespaces is a set of registered namespaces. 16 // 17 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 18 type Namespaces = voc.Namespaces 19 20 // Register adds namespace to a global registered list. 21 // 22 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 23 func Register(ns Namespace) { 24 voc.Register(ns) 25 } 26 27 // RegisterPrefix globally associates a given prefix with a base vocabulary IRI. 28 // 29 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 30 func RegisterPrefix(pref string, ns string) { 31 voc.RegisterPrefix(pref, ns) 32 } 33 34 // ShortIRI replaces a base IRI of a known vocabulary with it's prefix. 35 // 36 // ShortIRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type") // returns "rdf:type" 37 // 38 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 39 func ShortIRI(iri string) string { 40 return voc.ShortIRI(iri) 41 } 42 43 // FullIRI replaces known prefix in IRI with it's full vocabulary IRI. 44 // 45 // FullIRI("rdf:type") // returns "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" 46 // 47 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 48 func FullIRI(iri string) string { 49 return voc.FullIRI(iri) 50 } 51 52 // List enumerates all registered namespace pairs. 53 // 54 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 55 func List() []Namespace { 56 return voc.List() 57 } 58 59 // Clone makes a copy of global namespaces list. 60 // 61 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 62 func Clone() *Namespaces { 63 return voc.Clone() 64 } 65 66 // CloneTo adds all global namespaces to a given list. 67 // 68 // Deprecated: use github.com/cayleygraph/quad/voc package instead. 69 func CloneTo(p *Namespaces) { 70 voc.CloneTo(p) 71 }