|
UrnSupport
Mechanism to support and resolve URNs
Registering a vocabulary with URN terms(Note: the MMI tools are in general undergoing significant changes at time of writing.) Basic Voc2RDF functionalityBasically, 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
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 URIsIf 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
In this case, http://mmisw.org/ont/myvocab2 will basically serve as a container of the terms. User-specified term URNsOf course, the user-specified URIs with the above mechanism can in particular be URNs, for example:
Resolving URIsAs 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 | ||||||||||||||||
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) ?
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 }
2) DESCRIBE <urn:ogc:def:crs:ogc:1_3:crs27>
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
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.)
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
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:
andand they work.
I'm taking those from the vocabulary: