From: Alexandre P. <al...@pa...> - 2006-03-12 12:45:09
|
Hi, FYI, I managed to do what I wanted using InfModel, and not OntModel. The 3 steps are: - Adding the vocabulary in RAP vocabularies - Defining the model as an instance of InfModelF - Adding subproperties statements as: $this->add(new Statement(RELATIONSHIP::ACQUAINTANCE_OF(), RDFS::SUB_PROPERTY_OF(), FOAF::KNOWS()); So that any findFirstMatchingStatement($subject, FOAF::KNOWS, $null) query returns all statements with rel:xxx as a predicate. As I have to add the Relationship vocabulary in RAP, I created a small script to quickly do it, instead of writing or copy/pasting properties/class definition. The script can be used for any vocabulary, and can be downloaded here: http://apassant.net/share/semweb/vocab2rap-0.1.tgz. Feel free to add it in RAP if you think it's usefull. Alex. 2006/2/23, Josef Petr=E1k <jsp...@gm...>: > Hi, > > I am not sure how exactly the OntModel works but be aware! FOAF and > relationship module are not ontologies but "plain" RDF Schemas. While > I was playing with Java tool Jastor for generating model from > ontologies I was faced with this problem and got into trouble. > > Josef Petr=E1k > > On 2/23/06, Alexandre Passant <al...@pa...> wrote: > > Hi, > > > > I used RAP to write a FOAF parser [1], in which I use MemModel to read > > my RDF files. > > > > I recently thaught about FOAF extensions, as the Relationship > > vocabulary [2], which defines some subproperties of foaf:knows. > > > > At the moment, with my MemModel, I use > > findFirstMatchingStatement($subject, FOAF::KNOWS, $null) to get all > > foaf:knows classes related to my subject. > > > > But, I assume, it won't work if the RDF files that use rel:worksWith > > instead of foaf:knows. > > > > Is that the role of OntModel to make this kind of queries work ? If > > so, should I have to write somewhere (in vocabulary folder) the > > Relationship model and its mapping with FOAF ? > > > > Thanx for any advice on this point. > > > > [1] http://gna.org/projects/phoaf > > [2] http://vocab.org/relationship/ > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > > that extends applications into web and mobile media. Attend the live we= bcast > > and join the prime developer group breaking into this new coding territ= ory! > > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > > _______________________________________________ > > Rdfapi-php-interest mailing list > > Rdf...@li... > > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > > > > > -- > *** jspetrak (HW) *** > > Weblog: http://zapisky.info/ > Homepage: http://zapisky.info/home/ > > ICQ: 179271149 > Jabber: Imp...@nj... > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Rdfapi-php-interest mailing list > Rdf...@li... > https://lists.sourceforge.net/lists/listinfo/rdfapi-php-interest > |