My favorites | Sign in
Project Home Wiki Issues Source
Search
for
UrnSupport  
Mechanism to support and resolve URNs
Updated May 22, 2009 by caru...@gmail.com

Registering a vocabulary with URN terms

(Note: the MMI tools are in general undergoing significant changes at time of writing.)

Basic Voc2RDF functionality

Basically, Voc2RDF takes a base URI and a list of terms and creates a corresponding file in RDF format. Example:

Vocabulary URI: http://mmisw.org/ont/myvocab

name description
foo foo description ...
baz baz description ...

The first row is a header specifying properties for the terms in the subsequent rows. First column is special in that it is used to create the URI for the term in each row. In the example above, the final URI for the "foo" term will be "http://mmisw.org/ont/myvocab/foo". This term URI will be directly resolvable. For the remainder of this note, I say "MMI-based URI" to refer to URIs that are directly resolvable against the MMI Registry.

User-specified term URIs

If the header label of the first column in the Voc2RDF term table is "uri" (and not "name" as in the above example), then the values in the column will be used as given, ie., no composition with the base URI will be performed. For example:

Vocabulary URI: http://mmisw.org/ont/myvocab2

uri description
http://mydomain.xyz/abcd/foo foo description ...
http://other.xyz/baz baz description ...

In this case, http://mmisw.org/ont/myvocab2 will basically serve as a container of the terms.

User-specified term URNs

Of course, the user-specified URIs with the above mechanism can in particular be URNs, for example:

uri description
urn:ogc:def:crs:ogc:1_3:crs27 NAD27 longitude-latitude B.5 in OGC 06-042

Resolving URIs

As noted above, any MMI-based URI is resolvable directly. Another provided mechanism to resolve any registered URI is via an HTTP service as follows:

http://mmisw.org/ont?uri=<a URI>
which is particularly useful to resolve registered URNs, for example:
http://mmisw.org/ont?uri=urn:ogc:def:crs:ogc:1_3:crs27

The format of the response will be determined according to content negotiation, for example, in RDF ("application/rdf+xml") if the client says that's the preferred format. But a 'form' parameter can be included to explicitly request a particular format, for example:

http://mmisw.org/ont?uri=urn:ogc:def:crs:ogc:1_3:crs27&form=rdf
http://mmisw.org/ont?uri=urn:ogc:def:crs:ogc:1_3:crs27&form=html
http://mmisw.org/ont?uri=urn:ogc:def:crs:ogc:1_3:crs27&form=n3
Comment by project member ber...@gmail.com, May 26, 2009

I am not sure if the URN is itself registered as a resource in the registry using the above mechanism. Could you present an example of a SPARQL query, that gets the properties and values of that specific resource (OGC URN) ?

Comment by project member caru...@gmail.com, May 26, 2009

Yes, the URN is registered as a resource in the registry. (Note: for a vocabulary that was just registered, the terms may not be immediately available for queries--still working on that.)

SPARQL examples (you can use http://mmisw.org/ont/sparql.html):

1) CONSTRUCT { <urn:ogc:def:crs:ogc:1_3:crs27> ?prop ?value }

WHERE { <urn:ogc:def:crs:ogc:1_3:crs27> ?prop ?value . }

2) DESCRIBE <urn:ogc:def:crs:ogc:1_3:crs27>

Comment by smrTuc...@gmail.com, Jun 17, 2009

The http://mmisw.org/ont?uri=urn... request doesn't work with the urn's in the urn:cgi:classifierScheme:CGI:SimpleLithology?:200811 vocabulary. Note that I copied the owl off line and manually (as in a text editor...) changed one of the dataType properties created by the upload process to an objectProperty, and changed the URI from the http:// .... urn:cgi format to just urn's. Could that have broken things?

steve

Comment by grayb...@mbari.org, Jul 7, 2009

When using the URI feature, what gets used as the label? (When you don't use that feature, the first column is used as the default label for the item.)

Comment by project member caru...@gmail.com, Jul 7, 2009

The first column continues to be used to create the label for the term; this behavior has not changed.

In the above example, urn:ogc:def:crs:ogc:1_3:crs27, we get:

http://www.w3.org/2000/01/rdf-schema#label -> urn:ogc:def:crs:OGC:1.3:CRS27

Now, this is a good point. In general, the user should be able to specify the desired label. A possible mechanism is by designating special columns, via the header, to determine the values to be used as labels for the terms. For example, a column with the header "rdfs:label" would assign values for the http://www.w3.org/2000/01/rdf-schema#label property. Other possibilities include "skos:prefLabel", "skos:altLabel", etc.

See also http://code.google.com/p/mmisw/issues/detail?id=110

Comment by project member caru...@gmail.com, Jul 7, 2009

Steve: I'm reading your Jun 17, 2009 comment. (Sorry for the delay to counter-comment.)

What URNs are not working for you? I just tested with:

http://mmisw.org/ont?uri=urn:cgi:classifier:CGI:SimpleLithology:200811:porphyry
and
http://mmisw.org/ont?uri=urn:cgi:classifier:CGI:SimpleLithology:200811:coal

and they work.

I'm taking those from the vocabulary:

http://mmisw.org/ont/testing/Phenomenon?form=n3


Sign in to add a comment
Powered by Google Project Hosting