W3C home > Mailing lists > Public > www-rdf-comments@w3.org > January to March 2002

Re: Jena and DAML question

From: <tarod@softhome.net>
Date: Thu, 07 Feb 2002 12:11:24 GMT
Message-ID: <20020207121124.10777.qmail@softhome.net>
To: www-rdf-comments@w3.org

tarod@softhome.net writes:

> 
> tarod@softhome.net writes:
> 
> > 
> > 
> >   I have a question about Jena and DAML
> > 
> >   I have the following xmlschema
> > 
> > --- c:\users\mcarrion\javaprogs\damltest\rdf\ownTypes.xsd  
> > ---------------------
> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/10/XMLSchema">
> > <xsd:simpleType name="joven">
> > 	<xsd:restriction
> > base="http://www.w3.org/2001/10/XMLSchema#positiveInteger">
> > 		<xsd:maxInclusive value="14"/> 
> > 	</xsd:restriction>
> > </xsd:simpleType>
> > </xsd:schema>
> > --- eof -------------------------------------
> > 
> > ok?
> >   I also have this daml model
> > 
> > --- c:\users\mcarrion\javaprogs\damltest\rdf\daml.rdf 
> > --------------------------
> > 
> > <rdf:RDF
> > 	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> > 	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
> > 	xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
> > 	xmlns:xsd="http://www.w3.org/2001/10/XMLSchema#"
> > 	xmlns:xsdOwn="file:///users/mcarrion/javaprogs/damltest/rdf/ownTypes#"
> > 	xmlns:own="file:///users/mcarrion/javaprogs/damltest/rdf/ownTypes#"
> > 	xmlns="file:///users/mcarrion/javaprogs/damltest/rdf/daml#"
> > 	>
> > 
> > <daml:Ontology rdf:about="">
> > 	<rdfs:comment>Example</rdfs:comment>
> > 	<daml:imports rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
> > </daml:Ontology>
> > 
> > <daml:Class rdf:ID="Persona"/>
> > 
> > <Persona rdf:ID="p1">
> > 	<name>Jose Manuel</name>
> > 	<age>20</age>
> > </Persona>
> > 
> > <Persona rdf:ID="p2">
> > 	<name>Marc</name>
> > 	<age>10</age>
> > </Persona>
> > 
> > <daml:DatatypeProperty rdf:ID="age">
> > 	<rdfs:domain rdf:resource="#Persona"/>
> > 	<rdfs:range
> > rdf:resource="http://www.w3.org/2001/10/XMLSchema#positiveInteger"/>
> > </daml:DatatypeProperty>
> > 
> > <daml:DatatypeProperty rdf:ID="name">
> > 	<rdfs:domain rdf:resource="#Persona"/>
> > 	<rdfs:range rdf:resource="http://www.w3.org/2001/10/XMLSchema#String"/>
> > </daml:DatatypeProperty>
> > 
> > <daml:Class rdf:about="#Joven">
> > 	<daml:intersectionOf rdf:parseType="daml:collection">
> > 		<rdfs:Class rdf:about="#Persona"/>
> > 		<daml:Restriction>
> > 				<daml:onProperty rdf:resource="#age"/>
> > 				<daml:hasClass
> > rdf:resource="file:///users/mcarrion/javaprogs/damltest/rdf/ownTypes#joven"/>
> > 		</daml:Restriction>
> > 	</daml:intersectionOf>
> > </daml:Class>
> > 
> > </rdf:RDF>
> > 
> > --- eof -----------------------------------------------
> > 
> > 
> >   Here I have the Person class and I want to define the Joven class (Young
> > in spanish) this is the way I found in the examples.
> >   
> >   When running jena I have the DAMLClass Joven (j)
> >   if I do j.getInstances() the iterator that I get is empty, why? should
> > this call returns me the instance p2 or not? Am I doing something wrong? or
> > maybe I thought that the call should return somenthing that it shouldn't...
> > I don't know
> >   
> >   Thanks everybody for you help,
> >                                 Marc
> 
>   I also found this...
>   If I create the DAMLClass Persona and the DAMLClass Contrato and then I
> do
> <daml:Class rdf:ID="PersonasContratos">
> 	<daml:subClassOf>
> 		<daml:unionOf rdf:parseType="daml:collection">
> 			<daml:Class rdf:about="#Persona"/>
> 			<daml:Class rdf:about="#Contrato"/>
> 		</daml:unionOf>
> 	</daml:subClassOf>
> </daml:Class>
>   
>   if I ask for personas I get all the instances, if I ask for contratos I
> get all the contratos but if I ask for PersonasContratos I get nothing.
> 
>   any clue what I'm doing wrong?
> 
>   Thanks,
>          Marc

  Uffff, I'm still doing tests :) 
  I tried the exampled in Jena-1.3.0\doc\DAML+OIL\examples and I thing it
doesn't work, or I don't know how it should work. 

  If you look the Ian instance it says that you should be able to inference
that Ian is a BigFoot, but if you look BigFoot it doesn't have any
instance!!!! is it correct?

  Thanks,
        Marc
Received on Thursday, 7 February 2002 07:09:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 14:16:30 GMT