W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2004

Re: OWL, how do I...

From: Benjamin Nowack <bnowack@appmosphere.com>
Date: Sat, 7 Feb 2004 20:01:05 +0100
To: "Eric Jain" <Eric.Jain@isb-sib.ch>
Cc: "rdf-interest" <www-rdf-interest@w3.org>
Message-ID: <PM-EH.20040207200105.E6E00.1.1D@192.168.27.2>



On 06.02.2004 16:38:04, Eric Jain wrote:
>
>While writing a simple OWL ontology for describing some RDF data, I
>stumbled over the following three issues:

some ideas only, hope it helps..
(there are some Measurement examples in the OWL reference doc
somewhere, btw.)


>1) How do I state that any 'Measurement' must be an integer and may have
>one 'unit'?
>
>  <foo> <rdf:type> <Foo>
>  <foo> <length> <#_1>
>  <#_1> <rdf:type> <Measurement>
>  <#_1> <rdf:value> 42
>  <#_1> <unit> <Meter>
>

--
A Measurement MAY have one unit:

<owl:Class rdf:ID="Measurement">
   <rdfs:subClassOf>
      <owl:onProperty rdf:resource="unit"/>
      <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
         1
      </owl:maxCardinality>
   </rdfs:subClassOf>
</owl:Class>

--
Any Measurement('s value) MUST be an integer:
There may be an owl full solution to directly apply a local value
constraint to rdf:value (allValuesFrom xsd:integer?) but I'd suggest
defining a separate value prop for Measurements:

<owl:DatatypeProperty rdf:ID="mValue">
   <rdf:type rdf:resource="&owl;FunctionalProperty"/>
   <rdfs:domain rdf:resource="#Measurement"/>
   <rdfs:range rdf:resource="&xsd;integer"/>
</owl:DatatypeProperty>

but you'd still have to type your instance data:
<Foo rdf:about="#foo">
   <length>
      <Measurement>
         <mValue rdf:datatype="&xsd;integer">42</mValue>
         ...



>2) How do I state that any statement with a 'length' property is
>expected to have an author property?
>
>  <rdf:Description rdf:about="urn:test:1">
>    <length rdf:ID="#_1">42</length>
>  </rdf:Description>
>
>  <rdf:Description rdf:about="#_1">
>    <author>Me</author>
>  </rdf:Description>

--
hm, sorry, don't know enough about this reification stuff.
(you could maybe define some sort of complete 
AuthoredLengthStatement class with cardinality constraints
on length and author and then make your app consider only
"valid" AuthoredLengthStatements...)


>3) What's the benefit of using owl:Thing instead of plain simple
>rdf:Description for describing data?
another hm. As far as I understand, rdf:Description is
(informally) a description _of_ a (general) resource, owl:Thing
is actually typing the resource as being in OWL space. to me 
rdf:Description is a basic construct to be able to talk about
resources at all, it doesn't add information to the graph.
but this is just a personal view and may be completely wrong..

best,
benjamin

--
Benjamin Nowack

Kruppstr. 82-100
45145 Essen, Germany
Received on Saturday, 7 February 2004 14:01:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:58 UTC