Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register RDF Namespaces used by Drupal 8 in Fedora4 #333

Closed
DiegoPino opened this issue Aug 18, 2016 · 16 comments
Closed

Register RDF Namespaces used by Drupal 8 in Fedora4 #333

DiegoPino opened this issue Aug 18, 2016 · 16 comments
Assignees

Comments

@DiegoPino
Copy link
Contributor

We could need namespace registration logic on module install (or on when adding new predicates via UI that make use of a non existing/previouls registered rdf namespace) .

Fedora 4 keeps track of each use namespace/prefix globally. Keeping track of prefix + namespaces in RDF can be tricky since there is no easy way to "extract" prefixing from full RDF documents, at least not in EasyRDF (our RDF library), which can lead to multiple ns1, ns2, etc or even conflicts. So it could be useful to register(create a fake resource for example) all commonly used namespaces and prefixes to make CRUD easier and slimmer and avoid complications of miss matching prefixes (dc11 versus dc?)

@whikloj
Copy link
Member

whikloj commented Aug 18, 2016

I just remembered... I think @acoburn has something he uses to register namespaces & prefixes in Fedora.

@ruebot ruebot added the MVP label Aug 29, 2016
@ruebot ruebot added the Vagrant label Sep 26, 2016
@ruebot ruebot self-assigned this Sep 26, 2016
@ruebot
Copy link
Member

ruebot commented Sep 26, 2016

@Islandora-CLAW/committers Please review this stub list below, and let me know of any other prefixes that we should instantiate Fedora with.

@Islandora-CLAW/sprinters feel free to jump in here too.

PREFIX acl: <http://www.w3.org/ns/auth/acl#>
PREFIX bf: <http://id.loc.gov/ontologies/bibframe/>
PREFIX cc: <http://creativecommons.org/ns#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dwc: <http://rs.tdwg.org/dwc/terms/>
PREFIX ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#>
PREFIX exif: <http://www.w3.org/2003/12/exif/ns#>
PREFIX fedoraconfig: <http://fedora.info/definitions/v4/config#>
PREFIX fedora: <http://fedora.info/definitions/v4/repository#>
PREFIX fedoramodel: <info:fedora/fedora-system:def/model#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX gn: <http://www.geonames.org/ontology#>
PREFIX iana: <http://www.iana.org/assignments/relation/>
PREFIX image: <http://www.modeshape.org/images/1.0>
PREFIX islandorarelsext: <http://islandora.ca/ontology/relsext#>
PREFIX islandorarelsint: <http://islandora.ca/ontology/relsint#>
PREFIX jcr: <http://www.jcp.org/jcr/1.0>
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX mix: <http://www.jcp.org/jcr/mix/1.0>
PREFIX mode: <http://www.modeshape.org/1.0>
PREFIX nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#>
PREFIX nt: <http://www.jcp.org/jcr/nt/1.0>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX pcdm: <http://pcdm.org/models#>
PREFIX pcdmfmt: <http://pcdm.org/2015/10/14/file-format-types>
PREFIX pcdmrts: <http://pcdm.org/rights#>
PREFIX pcdmuse: <http://pcdm.org/use#>
PREFIX pcdmwrks: <http://pcdm.org/works#>
PREFIX premis: <http://www.loc.gov/premis/rdf/v1#>
PREFIX prov: <http://www.w3.org/TR/prov-o/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rel: <http://id.loc.gov/vocabulary/relators/>
PREFIX schema: <http://schema.org>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sv: <http://www.jcp.org/jcr/sv/1.0>
PREFIX test: <info:fedora/test/>
PREFIX xml: <http://www.w3.org/XML/1998/namespace>
PREFIX xmlns: <http://www.w3.org/2000/xmlns/>
PREFIX xs: <http://www.w3.org/2001/XMLSchema>
PREFIX xsi: <http://www.w3.org/2001/XMLSchema-instance>

@DiegoPino
Copy link
Contributor Author

Some of those prefixes are server managed by fedora 4. Not sure if re-registering them would fail at all, end with server generated/duplicated namespaces (ns1, etc) or just be ignored.

Also, each user contributed ontology should also trigger prefix registering by hooking somehow to the rdf api on Drupal.

We should also add:
http://www.w3.org/TR/prov-o/ simple description here
@Prefix schema: http://schema.org, since we are using that on drupal,
@Prefix owl: http://www.w3.org/2002/07/owl# .

And this one, why did i not see it before? 😄
http://www.bbc.co.uk/ontologies/cms !!

The question on what method ( @acoburn 's one was mentioned) we want to use is still open.

@ruebot
Copy link
Member

ruebot commented Sep 27, 2016

@DiegoPino updated the list.

Re-reading this thread, we have a couple options:

  • Edit fedora-node-types.cnd - which is probably a bad idea for a variety of reasons
  • Create a fcrepoNamespaceConfig utility similar to what @awead has done here and here
  • Some thing else?

Either way, @awead and I will have to do this for the NYC Fedora Camp vagrant, which means I'll do the same here. ...or other way around 😄

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

is purl a good prefix for http://purl.org/dc/terms/? I would think dcterms might be better.

ore could also be useful.

From the Prov website:

We suggest the use of prov as a prefix for this namespace.

So, I'd also suggest using prov instead of provo.

@awead
Copy link

awead commented Sep 27, 2016

I also recall a way to change the prefixes after they'd been registered. Perhaps this is dark magic?

@awead
Copy link

awead commented Sep 27, 2016

And 👍 to whatever @acoburn says. I would not take my prefix uris as gospel.

@ruebot
Copy link
Member

ruebot commented Sep 27, 2016

@acoburn good catches. I've updated my list.

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

@awead there is this utility for changing namespaces, but it's also a bit wonky and has certain limitations (i.e. you can't change any prefix that is used with rdf:type). I am not sure I would recommend its use.

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

pcdmformat for http://pcdm.org/file-format-types# is another namespace that could be useful.

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

dwc is, I think, the standard prefix for Darwin Core: http://rs.tdwg.org/dwc/terms/
This is a vocabulary that is really useful for scientific (esp. biological) resources.

@ruebot
Copy link
Member

ruebot commented Sep 27, 2016

@acoburn heh. I was just adding the pcdm extentions 😄

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

cc for Creative Commons: http://creativecommons.org/ns#

Also, I know I'm planning to use Geonames data, but I'm not sure that the geonames namespace will be entirely necessary (e.g. <> dcterms:spatial <http://sws.geonames.org/4929022/>). That said, if there is interest in using the Geonames ontology, this would be the namespace: gn for: http://www.geonames.org/ontology#

@acoburn
Copy link
Contributor

acoburn commented Sep 27, 2016

Bibframe is another possibility: bf for http://id.loc.gov/ontologies/bibframe/

@ruebot
Copy link
Member

ruebot commented Sep 27, 2016

PR: #383

@whikloj
Copy link
Member

whikloj commented Sep 28, 2016

Resolved with 75c6365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants