W3C home > Mailing lists > Public > semantic-web@w3.org > August 2007

Datatypes

From: Michael Schneider <schneid@fzi.de>
Date: Tue, 21 Aug 2007 20:42:21 +0200
Message-ID: <0EF30CAA69519C4CB91D01481AEA06A0373F0D@judith.fzi.de>
To: <reto@gmuer.ch>
Cc: <semantic-web@w3.org>

Hi Reto!

Reto Bachmann-Gmür <reto@gmuer.ch> wrote:
> I'm writing an ontology with properties pointing to literals
> representing the following:
> - media types (eg: "application/xhtml+xml")
> - media ranges (eg: "application/*")
> - 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 question:
> - Anyone knows a place where such datatypes are already defined?
> - Datatypes are typically defined in an XML-schema, is there an ontology
> to do so in RDF?
> - Is it a good idea to define the datatypes in the same namespace as the
> ontology using them?

I'm afraid that I cannot answer your questions here. I have never worked
with custom datatypes in RDF, or even created any. And I would surly be
reluctant to do so, before not having considered other possibilities. Thus
my question: Are you really restricted to datavalues for your application? I
could imagine an alternative approach, which might or might not serve your
needs.

Instead of encoding the mime types and java class names into data literals,
you could define URIs for them in the following way:

    * urn:mime:application/xhtml+xml
    * urn:java:org.example.tools.myTool

Note here, that these URIs are really unique in each case, due to the unique
naming schemes for encoding mime types and Java class names.

Then, instead of specifying custom datatypes, you can define OWL classes,
and assign them to your URIs:

    ex:MimeType a owl:Class .
    <urn:mime:application/xhtml+xml> a ex:MimeType .

    ex:JavaClass a owl:Class .
    <urn:java:org.example.tools.myTool> a ex:JavaClass .

I do not know your concrete application, but when you say that you use
"properties pointing to literals", I would believe that you intent to use
the different kinds of literals for annotating resources. Perhaps something
like multimedia stuff, which is annotated by its mime type and the decoder
pluging class to use? You can do this with my idea, too (using object
properties instead of datatype properties):

     <http://videobase.org/film/kubrik/2001>
         ex:hasMimeType <urn:mime:video/mpg4> ;
         ex:hasPlugin <urn:java:org.videoplugins.decoder.MP4> .

or something similar (I just made this up).

Maybe, there are alread URN schemes or ontologies for mime types and java
class names, but I don't know.

Now, can you live with such an alternative approach?

Cheers,
Michael

--
Dipl.-Inform. Michael Schneider
FZI Forschungszentrum Informatik Karlsruhe
Abtl. Information Process Engineering (IPE)
Tel  : +49-721-9654-726
Fax  : +49-721-9654-727
Email: Michael.Schneider@fzi.de
Web  : http://www.fzi.de/ipe/eng/mitarbeiter.php?id=555

FZI Forschungszentrum Informatik an der Universität Karlsruhe
Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
Tel.: +49-721-9654-0, Fax: +49-721-9654-959
Stiftung des bürgerlichen Rechts
Az: 14-0563.1 Regierungspräsidium Karlsruhe
Vorstand: Rüdiger Dillmann, Michael Flor, Jivka Ovtcharova, Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus
Received on Wednesday, 22 August 2007 03:58:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:17 GMT