Re: Datatypes

On 21/08/07, Garret Wilson <garret@globalmentor.com> wrote:
>
> Reto Bachmann-Gmür wrote:
> > - fully qualified java-class names (eg: "org.example.tools.MyTool")
> >
> > While I could use xsd:string I think it would be better to use custom
> > datatypes to have literals like
> > "org.example.tools.MyTool"^^http://example.org/datatypes#javaClass.

There is stuff for defining user-defined datatype in XSD, I seem to
remember the RDF spec skirting around that somehow...OWL has datatypes
as an orthogonal space to everything else...?

Whatever, here's a bit of practical material:

http://protege.stanford.edu/plugins/owl/xsp.html

> My opinion (see my earlier rants against RDF literals on this list): for
> Java classes shun literals and use URIs.

[/me hops sideways]

A couple of weeks ago I wanted something fairly close to the media
type bit, to be able to refer to URI schemes - "http", "ftp" etc. I
wound up with essentially :

  <scheme:Scheme rdf:about="http://purl.org/stuff/uri-schemes/http">
   <label>http</label>
  ...

In lieu of making the terms resolve (I do have isDefinedBy to the
specs...), it's at:
http://n2.talis.com/svn/playground/danja/schemas/uri-schemes.rdf

Expressing media ranges as non-literals is trickier, I suspect you'd
have to do something like:

_:range
      rdfs:label "application/*" ;
      iana:type <http://whatever/.../application> .

i.e. leaving the iana:subtype undefined.

Given that Java class names are qualified, might it not be possible to
use URIs there too?

Something like:

urn:java:org.example.tools.MyTool

For useful http URIs it's hard to imagine what would be the resources
- but you could avoid the issue by putting the javadoc online and make
303s from the URIs to the doc pages.

btw, while http://www.w3.org/TR/HTTP-in-RDF/ gives status codes URIs,
I believe it leaves everything else as literals.

Cheers,
Danny.

-- 

http://dannyayers.com

Received on Tuesday, 21 August 2007 18:14:35 UTC