From: Gunnar A. G. <ggr...@cs...> - 2005-04-25 12:17:47
|
Hi, It looks like something goes wrong with the identify of the person nodes you are creating. Coudl you let us see the php code which creates this problem? You might also want to look at RDFWorld, which gives you an easy, although not very scalable, way to map between rdf and php objects http://chxo.com/rdfworld/index.htm Good luck! - Gunnar hen...@ya... wrote: > Not sure if this problem I am having is obvious - I hope it is! > > What I would like to do is: > > --------------- > given an RDFS ontology (and later, OWL) I would like to be able to > easily create get, set, delete, and update functions - so that for any > class, their properties and inherited properties become part of simple > php functions to serve as APIs for other applications. > --------------- > > Problem: > > > If you create an RDFS class like "Person" - then you want to create > instances using the statement and resource API of RAP it appears that > instead of the desired > > < ns:Person about="ns:person1" ns:hasTeeth=14> > </person> > < ns:Person about="ns:person2" ns:hasTeeth=14> > </person> > > Using the statement api I ended up with one, completely incorrect > instance of a person > > < ns:Person about="ns:Person"> > <ns:hasTeeth =14 /> > <ns:hasTeeth =14 /> > </Person> > > I also ended up with unneeded(?) <Description... > tags. > > The ontology model looks like it understands classes and properties - > but I am reluctant to use the RAP ontology model because it looks to be > incomplete. > > > > RDFS example file: > > > <?xml version='1.0' encoding='UTF-8'?> > <!DOCTYPE rdf:RDF [ > <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <!ENTITY hendler3 'http://www.somewhere.net/hendler3#'> > <!ENTITY rdfs > 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> > ]> > <rdf:RDF xmlns:rdf="&rdf;" > xmlns:hendler3="&hendler3;" > xmlns:rdfs="&rdfs;"> > <rdfs:Class rdf:about="&hendler3;Mammal" > rdfs:comment="A mamal" > rdfs:label="Mammal"> > <rdfs:subClassOf rdf:resource="&rdfs;Resource"/> > </rdfs:Class> > <rdfs:Class rdf:about="&hendler3;Person" > rdfs:comment="a person" > rdfs:label="Person"> > <rdfs:subClassOf rdf:resource="&hendler3;Mammal"/> > </rdfs:Class> > <rdf:Property rdf:about="&hendler3;hasName" > rdfs:comment="has name" > rdfs:label="hasName"> > <rdfs:domain rdf:resource="&hendler3;Person"/> > <rdfs:range rdf:resource="&rdfs;Literal"/> > </rdf:Property> > <rdf:Property rdf:about="&hendler3;hasTeeth" > rdfs:comment="has teeth" > rdfs:label="hasTeeth"> > <rdfs:domain rdf:resource="&hendler3;Mammal"/> > <rdfs:range rdf:resource="&rdfs;Literal"/> > </rdf:Property> > </rdf:RDF> > > > Desired RDF > > > > <?xml version='1.0' encoding='UTF-8'?> > <!DOCTYPE rdf:RDF [ > <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <!ENTITY hendler3 'http://www.somewhere.net/hendler3#'> > <!ENTITY rdfs > 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#'> > ]> > <rdf:RDF xmlns:rdf="&rdf;" > xmlns:hendler3="&hendler3;" > xmlns:rdfs="&rdfs;"> > <hendler3:Mammal rdf:about="&hendler3;Doggy" > hendler3:hasTeeth="14" > rdfs:label="14"/> > <hendler3:Person rdf:about="&hendler3;Jonathan" > hendler3:hasName="Jonathan" > hendler3:hasTeeth="28" > rdfs:label="28"/> > <hendler3:Person rdf:about="&hendler3;Sonia" > hendler3:hasName="Sonia" > hendler3:hasTeeth="27" > rdfs:label="27"/> > </rdf:RDF> > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest -- Gunnar AAstrand Grimnes ----------------------- Room 312, Computing Science Dept. University of Aberdeen Aberdeen AB24 3UE Mobile: (+44) (0) 7950 251379 Email: ggr...@cs... WWW: http://www.csd.abdn.ac.uk/~ggrimnes |