Expressing operators and functions in RDF

Hi,

I am working on the design of a OWL ontology for operations and
functions (some are spatial and temporal) that can be used by a Rule
language (for example current draft OWL Rules). Prior developing the
ontology, I am trying to produce some examples in RDF-XML syntax to
express these operations/functions. CWM has already some build-in
operators.

I can distinguish 3 cases for the moment:

Case 1: binary operator using a Resource as left operand : 

Example: (Polygon perimeter 20)

This is the easiest case.

Case 2: binary operator using a Literal as left operand  : 

example  ( -1 absoluteValue 1). 

In this case, the literal needs to be placed in a List (of
operands/arguments). 
In RDF it should look like this:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:math="http://www.examples/operator/numeric#">
  <rdf:List>
     <rdf:first>-1</rdf:first>
     <rdf:rest
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
     <math:absoluteValue>1</math:absoluteValue>
   </rdf:List>
</rdf:RDF>

Is there a more compact way to express this using
rdf:parseType="Collection" ? The RDF specification does not seem to
provide a syntax for this. 


Case 3: operator with a arity >=3

Example : (1,2) sum 3 

In this the n-ary relationship I use a RDF List for the Subject.

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:math="http://www.examples/operator/numeric#">
  <rdf:List>
     <rdf:first>1</rdf:first>
     <rdf:rest parseType="Resource">
         <rdf:first>2</rdf:first>
         <rdf:rest
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
      </rdf:rest>
     <math:sum>3</math:sum>
   </rdf:List>
</rdf:RDF>

Once again, is there any more compact and readable way to express this
using rdf:Parse="Collection when element of a list are literal ? I am
finding the RDF syntax quite ugly if parseCollection cannot be used.
Your improvements are welcome.

Is the approach I am taking for expressing operators seems to you OK, or
am I on the wrong track to express operators and functions in RDF ?. 


Best regards
 
Stephane Fellah
Senior Software Engineer
 
PCI Geomatics
490, Boulevard St Joseph
Hull, Quebec
Canada J8Y 3Y7
Tel: 1 819 770 0022 Ext. 223
Fax 1 819 770 0098
Visit our web site:  www.pcigeomatics.com
 

Received on Friday, 31 October 2003 17:45:49 UTC