lib/rdf/vocab.rb in rdf-vocab-3.1.4 vs lib/rdf/vocab.rb in rdf-vocab-3.1.5
- old
+ new
@@ -9,10 +9,11 @@
VOCABS = {
acl: {uri: "http://www.w3.org/ns/auth/acl#"},
as: {uri: "https://www.w3.org/ns/activitystreams#", source: 'etc/as.ttl'},
bf2: {uri: 'http://id.loc.gov/ontologies/bibframe/'},
bibframe: {
+ # Obsolete
uri: "http://bibframe.org/vocab/",
class_name: "Bibframe",
skip: true
},
bibo: {uri: "http://purl.org/ontology/bibo/", source: "etc/bibo.ttl"},
@@ -58,12 +59,11 @@
},
dbo: {uri: "http://dbpedia.org/ontology/", source: "http://dbpedia.org/data3/.ttl"},
dc: {uri: "http://purl.org/dc/terms/"},
dc11: {uri: "http://purl.org/dc/elements/1.1/"},
dcat: {
- uri: "http://www.w3.org/ns/dcat#",
- source: "https://w3c.github.io/dxwg/dcat/rdf/dcat.ttl"
+ uri: "http://www.w3.org/ns/dcat#"
},
dcmitype: {
uri: "http://purl.org/dc/dcmitype/",
class_name: "DCMIType"
},
@@ -92,23 +92,11 @@
source: "http://www.w3.org/ns/earl",
},
ebucore: {
uri: "http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#",
source: "https://www.ebu.ch/metadata/ontologies/ebucore/ebucore.rdf",
- class_name: "EBUCore",
- patch: %{
- @prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
- @prefix dc: <http://purl.org/dc/terms/> .
- @prefix dc11: <http://purl.org/dc/elements/1.1/> .
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
- DeleteExisting {
- ebucore:Agent rdfs:subClassOf dc11:Agent .
- } .
- AddNew {
- ebucore:Agent rdfs:subClassOf dc:Agent .
- } .
- }
+ class_name: "EBUCore"
},
edm: {
uri: "http://www.europeana.eu/schemas/edm/",
source: "http://www.europeana.eu/schemas/edm/rdf/edm.owl"
},
@@ -130,12 +118,11 @@
}
},
fcrepo4: {
uri: "http://fedora.info/definitions/v4/repository#",
class_name: "Fcrepo4",
- source: "http://fedora.info/definitions/v4/2015/07/24/repository",
- skip: true # Not returning triples
+ source: "http://fedora.info/definitions/v4/2015/07/24/repository"
},
foaf: {uri: "http://xmlns.com/foaf/0.1/"},
geo: {uri: "http://www.w3.org/2003/01/geo/wgs84_pos#"},
geojson:{
uri: "https://purl.org/geojson/vocab#",
@@ -223,11 +210,11 @@
@prefix owl: <http://www.w3.org/2002/07/owl#>.
DeleteExisting {:gender a owl:DataTypeProperty .} .
AddNew {:gender a owl:DatatypeProperty .} .
}
},
- marc_relators: {
+ marcrelators: {
uri: "http://id.loc.gov/vocabulary/relators/",
source: "http://id.loc.gov/vocabulary/relators.rdf",
class_name: "MARCRelators",
patch: %{
@prefix marcrelators: <http://id.loc.gov/vocabulary/relators/> .
@@ -247,26 +234,25 @@
uri: "http://www.loc.gov/mods/rdf/v1#",
source: "http://www.loc.gov/standards/mods/modsrdf/v1/modsrdf.owl"
},
nfo: {uri: 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#', skip: true},
oa: {uri: "http://www.w3.org/ns/oa#"},
- og: {uri: "http://ogp.me/ns#", strict: false},
- ogc: {uri: "http://ogp.me/ns/class#", source: "http://ogp.me/ns", strict: false},
+ og: {uri: "http://ogp.me/ns#", source: 'http://ogp.me/ns/ogp.me.ttl', strict: false},
+ ogc: {uri: "http://ogp.me/ns/class#", source: "http://ogp.me/ns/ogp.me.ttl", strict: false},
ore: {uri: "http://www.openarchives.org/ore/terms/"},
org: {uri: "http://www.w3.org/ns/org#"},
owl: {uri: "http://www.w3.org/2002/07/owl#", alias: true},
pcdm: {
uri: "http://pcdm.org/models#",
source: "https://raw.githubusercontent.com/duraspace/pcdm/master/models.rdf"
},
pplan: {uri: "http://purl.org/net/p-plan#"},
premis: {
uri: "http://www.loc.gov/premis/rdf/v1#",
- source: "http://www.loc.gov/premis/rdf/v1.rdf",
- skip: true # Not returning triples
+ source: "http://www.loc.gov/premis/rdf/v1.rdf"
},
- premis_event_type: {
+ premiseventtype: {
uri: "http://id.loc.gov/vocabulary/preservation/eventType/",
source: "http://id.loc.gov/vocabulary/preservation/eventType",
class_name: "PremisEventType"
},
prov: {uri: "http://www.w3.org/ns/prov#"},
@@ -300,17 +286,18 @@
rss: {uri: "http://purl.org/rss/1.0/", source: "http://purl.org/rss/1.0/schema.rdf"},
schema: {
uri: "http://schema.org/",
source: "http://schema.org/version/latest/all-layers.nq"
},
- sh: { uri: 'http://www.w3.org/ns/shacl#', source: 'https://www.w3.org/ns/shacl.ttl' },
+ sd: {uri: 'http://www.w3.org/ns/sparql-service-description#', source: 'http://www.w3.org/ns/sparql-service-description.ttl'},
+ sh: {uri: 'http://www.w3.org/ns/shacl#', source: 'https://www.w3.org/ns/shacl.ttl'},
sioc: {uri: "http://rdfs.org/sioc/ns#"},
- sioc_services: {
+ siocservices: {
uri: "http://rdfs.org/sioc/services#",
class_name: "SiocServices"
},
- sioct: {uri: "http://rdfs.org/sioc/types#", class_name: "SiocTypes"},
+ sioctypes: {uri: "http://rdfs.org/sioc/types#", class_name: "SiocTypes"},
skos: {uri: "http://www.w3.org/2004/02/skos/core#"},
skosxl: {uri: "http://www.w3.org/2008/05/skos-xl#", source: "http://www.w3.org/TR/skos-reference/skos-xl.rdf"},
v: {uri: "http://rdf.data-vocabulary.org/#", source: "etc/rdf.data-vocab.ttl"},
vmd: {uri: "http://data-vocabulary.org/", source: "etc/data-vocab.ttl"},
vcard: {uri: "http://www.w3.org/2006/vcard/ns#"},
@@ -327,17 +314,16 @@
xsd: {uri: "http://www.w3.org/2001/XMLSchema#", strict: false, alias: true},
}.freeze
# Autoload vocabularies
VOCABS.each do |id, params|
- v = params.fetch(:class_name, id.to_s.upcase).to_sym
+ v = (params[:class_name] ||= id.to_s.upcase).to_sym
autoload v, File.expand_path("../vocab/#{id}", __FILE__) unless params[:alias]
end
# Aliases for vocabularies still defined directly in RDF.rb
def self.const_missing(constant)
if VOCABS.fetch(constant.to_s.downcase.to_sym, {})[:alias]
- require "rdf/vocab/#{constant.to_s.downcase}"
const_set(constant, RDF.const_get(constant))
else
super
end
end