Re: help on restrictions on simpletypes

On Jul 8, 2005, at 7:38 AM, Paolo Coletti wrote:

>
> Hello everybody.
>
> I am trying to call a service using Mindswap API 1.1.0 beta.

Cool.

> When I deploy a service with only strings as input and output  
> everything
> works fine.

Yay.

> When I deploy a different version of the same service which uses a  
> complex
> type as input and I try to tun it, I have problems passing its values  
> and
> defining the complex type in the OWL-S file.

Complex types are an issue for OWL and RDF. OWL and RDF (and OWL-S!!!  
Though it uses a distinct typing mechanism) want to use URIs to  
identify datatypes. However, any userdefined XML schema type will  
*lack* a canonical URI. So, for each new datatype, you'd have to do  
something special to your engine to get it to recognize it.

This problem is being worked on by the Semantic Web Best Practicies and  
XML schema working groups, see:
	http://www.w3.org/TR/2005/WD-swbp-xsch-datatypes-20050427/

> My complex type is only a simple restriction on the simple type string.
> In my WSDL it is:
>
> <simpleType name="myinput">
>   <restriction base="xsd:string">
>     <enumeration value="A600" />
>     <enumeration value="A500" />
>   </restriction>
> </simpleType>
>
>
> in the OWL-S file I modifies the lines
>
> <process:Input rdf:ID="myinput">
>   <process:parameterType
> rdf:datatype="&xsd;#anyURI">http://www.w3.org/2001/XMLSchema#string</ 
> process
> :parameterType>
> 	<rdfs:label>mytype</rdfs:label>
> </process:Input>
>
> with
>
> <process:Input rdf:ID="myinput">
>   <process:parameterType
> rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">#mytypeclass</ 
> process
> :parameterType>
> </process:Input>

It'll surely have to be an absolute URI, in any case.

>
> and add these lines
>
>
>  <owl:Class rdf:ID="mytypeclass">
>  <owl:oneOf rdf:parseType="Collection">
>   <mytypeclass rdf:ID="A600" />
>   <mytypeclass rdf:ID="A700" />
>   </owl:oneOf>
>   </owl:Class>

[snip]

Urrrr. I don't think this is doing what you want it too. If you are  
trying to define a datatype enuermation (for one, you can't use the  
parseType=Collection abbreviation).

Check the owl guide or reference.

Cheers,
Bijan.

P.S. (There is a dedicated OWL-S API mailing list (findable from the  
mindswap pages). I'm pleased to say that the users (not just he  
developers) have been active and helpful.)

Received on Sunday, 10 July 2005 14:13:13 UTC