java: URIs (was: Re: my laziness with literals)

Garret Wilson wrote:
>
> Dan Brickley wrote:
>> There is a java: URI scheme. This is used for example in ARQ for 
>> dynamic  code loading. I don't see a case for using info: instead.
>
> OK, I'm on Dan's side, now.
>
> java:/com/example/package#Class

Dan,

I've noticed that your java: URI scheme usage, and that of ARQ 
(<http://jena.sourceforge.net/ARQ/java-uri.html>), is to use the 
unmodified full Java package.Class name as the URI scheme-specific part. 
This provides several problems: one can't use common path-processing 
methods (such as found in the Java URI class) to find a class' package, 
or to find a package's parent package. Similarly, there's no elegant way 
to represent a package as a URI rather than ending the URI with a 
full-stop, which I don't find aesthetically pleasing.

Modifying my proposal above to find something closer to what's already 
being used, I would propose:

java:/com/example/package/

and

java:/com/example/package/Class

This would meet the shortcomings I mention, allowing easy processing via 
Java URI methods.

Best,

Garret

Received on Monday, 15 October 2007 19:00:32 UTC