Re: Datatypes

Garret Wilson 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.
>>   
>
> My opinion (see my earlier rants against RDF literals on this list): 
> for Java classes shun literals and use URIs. For Java classes, use the 
> "java" URI scheme. That's what I do. No, it's not official, but I 
> would argue that it's more standardized than an any RDF Java class 
> datatype out there. It makes sense. It was even listed on 
> http://www.w3.org/Addressing/schemes.html at one time.
>
> Back in 1999 Dan Brickley was apparently thinking along similar lines:
>
> http://lists.xml.org/archives/xml-dev/199903/msg00165.html

I'm close to changing my mind on the format of a Java class URI. As I 
mentioned above, I have been using something like this:

<java:com.example.package.Class>

I think that in the future I'll be switching to a URN that indicates a 
hierarchical path and a fragment, like this:

<urn:java:com/example/package#Class>

This brings along all sorts of benefits, including the ability to 
resolve relative classes (e.g. more natural searching for parent classes 
using existing URI path processing code), better distinguishing between 
packages and classes, and a more URI-natural way of designating a class 
within a package. Plus, it's more namespace-like. I like it.

Hope that's helpful.

Garret

Received on Tuesday, 11 September 2007 00:53:27 UTC