Dear Prof. Cyganiak, Many thanx once again for your valuable feedback. May I ask another question. We intend to use the d2r server for exposing data retrieved from a MySQL database. The DB will periodically updated, so our question is whether there is a way to periodically refresh the rdf data produced by the d2r server without manually restarting the server.
Thanx in advance for your time, Kind Regards, Pantelis Karamolegkos -----Original Message----- From: Richard Cyganiak [mailto:[email protected]] Sent: Saturday, March 12, 2011 8:28 PM To: Pantelis N. Karamolegkos Cc: [email protected] Subject: Re: [d2rq-dev] Issue with D2R Hi Pantelis, You have to combine the recipes "Example: Property bridge using information from another database table" "Example: Joining a table to itself using d2rq:alias" from the manual at http://www4.wiwiss.fu-berlin.de/bizer/d2rq/spec/ Note in particular the use of d2rq:alias. Hope that helps, Richard On 10 Mar 2011, at 18:16, Pantelis N. Karamolegkos wrote: > Hi, > > I am using the attached MySQL db schema. > I want to add a property bridge to the Person Class (derived from the Person table) that will list the persons that each person has interacted with (i.e. the pairings of each person in the TracesOfContacts table). > > I added the following section in the mapping file but it does not seem to work (I don't even see the property InteractsWith appearing in the web browser), although it does appear in the respective rdf dump > <http://localhost:2020/vocab/resource/person_InteractsWith> <http://www.w3.org/2000/01/rdf-schema#label> "Has Interacted With the following" . > <http://localhost:2020/vocab/resource/person_InteractsWith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . > > > I have also used the (now in comment) sql statement (after also commenting the d2rq:column "person.ID"; statement) but I get the following error message > Subquery returns more than 1 row: SELECT DISTINCT `person`.`ID`, (SELECT `tracesofcontacts`.`PersonB` from tracesofcontacts, person WHERE `tracesofcontacts`.`PersonA` = `person`.`ID`) AS expr9eb38d53 FROM `tracesofcontacts`, `person` (E0) > > > > Any ideas? > > Thanx, > > > map:person_InteractsWith a d2rq:PropertyBridge; > d2rq:belongsToClassMap map:person; > d2rq:property vocab:person_InteractsWith; > d2rq:column "person.ID"; > #d2rq:sqlExpression "SELECT tracesofcontacts.PersonB from tracesofcontacts, person WHERE tracesofcontacts.PersonA = person.ID"; > d2rq:join "tracesofcontacts.PersonA => person.ID"; > d2rq:join "tracesofcontacts.PersonB <= person.ID"; > d2rq:datatype xsd:integer; > d2rq:propertyDefinitionLabel "Has Interacted With the following"; > <test_db.pdf>--------------------------------------------------------------- --------------- > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d__________________________________________ _____ > d2rq-map-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ d2rq-map-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
