Skip to content

Commit

Permalink
placeholders for ontology sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Duggan committed May 27, 2015
1 parent ccc79b0 commit e4285b0
Showing 1 changed file with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions lib/Tuba/Plugin/TubaHelpers.pm
Original file line number Diff line number Diff line change
Expand Up @@ -499,41 +499,46 @@ sub register {
return $c->link_to($url, $url, target => "_blank");
});
$app->helper(turtle_namespaces => sub {
return (
bibo => 'http://purl.org/ontology/bibo/',
dbpedia => 'http://dbpedia.org/resource/',
dbpprop => 'http://dbpedia.org/property/',
dbpedia_owl => 'http://dbpedia.org/ontology/',
dc => 'http://purl.org/dc/elements/1.1/',
dcterms => 'http://purl.org/dc/terms/',
dcmitype => 'http://purl.org/dc/dcmitype/',
foaf => 'http://xmlns.com/foaf/0.1/',
gcis => 'http://data.globalchange.gov/gcis.owl#',
org => 'http://www.w3.org/ns/org#',
prov => 'http://www.w3.org/ns/prov#',
owl => 'http://www.w3.org/2002/07/owl#',
rdf => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
rdfs => 'http://www.w3.org/2000/01/rdf-schema#',
xml => 'http://www.w3.org/XML/1998/namespace',
xsd => 'http://www.w3.org/2001/XMLSchema#',
dwc => 'http://rs.tdwg.org/dwc/terms/',
doco => 'http://purl.org/spar/doco',
cito => 'http://purl.org/spar/cito/',
biro => 'http://purl.org/spar/biro/',
datacite => 'http://purl.org/spar/datacite/',
co => 'http://purl.org/co/',
frbr => 'http://purl.org/vocab/frbr/core#',
dcat => 'http://www.w3.org/ns/dcat#',
vivo => 'http://vivoweb.org/ontology/core#',
ext => 'http://http://sweet.jpl.nasa.gov/2.3/propTime.owl#',
meth => 'http://sweet.jpl.nasa.gov/2.3/reprSciMethodology.owl#',
geo => 'http://www.w3.org/2003/01/geo/wgs84_pos#',
fabio => 'http://purl.org/spar/fabio/',
schema => 'http://schema.org/',
skos => 'http://www.w3.org/2004/02/skos/core#',
place => 'http://purl.org/ontology/places#',
lemon => 'http://lemon-model.net/lemon#',
)
my $c = shift;
my $sources = shift;
state $namespaces = [
# [ abbrev => prefix => src ],
[ bibo => 'http://purl.org/ontology/bibo/' => 'http://eelst.cs.unibo.it/apps/LODE/source?url=http://purl.org/spar/biro', ],
[ dbpedia => 'http://dbpedia.org/resource/', ],
[ dbpprop => 'http://dbpedia.org/property/', ],
[ dbpedia_owl => 'http://dbpedia.org/ontology/', ],
[ dc => 'http://purl.org/dc/elements/1.1/', ],
[ dcterms => 'http://purl.org/dc/terms/', ],
[ dcmitype => 'http://purl.org/dc/dcmitype/', ],
[ foaf => 'http://xmlns.com/foaf/0.1/', ],
[ gcis => 'http://data.globalchange.gov/gcis.owl#', ],
[ org => 'http://www.w3.org/ns/org#', ],
[ prov => 'http://www.w3.org/ns/prov#', ],
[ owl => 'http://www.w3.org/2002/07/owl#', ],
[ rdf => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', ],
[ rdfs => 'http://www.w3.org/2000/01/rdf-schema#', ],
[ xml => 'http://www.w3.org/XML/1998/namespace', ],
[ xsd => 'http://www.w3.org/2001/XMLSchema#', ],
[ dwc => 'http://rs.tdwg.org/dwc/terms/', ],
[ doco => 'http://purl.org/spar/doco', ],
[ cito => 'http://purl.org/spar/cito/', ],
[ biro => 'http://purl.org/spar/biro/', ],
[ datacite => 'http://purl.org/spar/datacite/', ],
[ co => 'http://purl.org/co/', ],
[ frbr => 'http://purl.org/vocab/frbr/core#', ],
[ dcat => 'http://www.w3.org/ns/dcat#', ],
[ vivo => 'http://vivoweb.org/ontology/core#', ],
[ ext => 'http://http://sweet.jpl.nasa.gov/2.3/propTime.owl#', ],
[ meth => 'http://sweet.jpl.nasa.gov/2.3/reprSciMethodology.owl#', ],
[ geo => 'http://www.w3.org/2003/01/geo/wgs84_pos#', ],
[ fabio => 'http://purl.org/spar/fabio/', ],
[ schema => 'http://schema.org/', ],
[ skos => 'http://www.w3.org/2004/02/skos/core#', ],
[ place => 'http://purl.org/ontology/places#', ],
[ lemon => 'http://lemon-model.net/lemon#', ],
];
return ( map {( $_->[0] => $_->[2] )} @$namespaces ) if $sources;
return ( map {( $_->[0] => $_->[1] )} @$namespaces );
});
$app->helper(valid_gcid => sub {
my $c = shift;
Expand Down

0 comments on commit e4285b0

Please sign in to comment.