Dave, Ian, In RDF/XML, when rdf:ID is used on a property element, it reifies the statement [1] which results in 4 additional triples (rdf:Statement, rdf:subject, rdf:predicate, rdf:object) being added to the graph [2]. Turtle does not provide this kind of abbreviation, so you have to assert the additional 4 triples (the so-called reification quad). Similarly for other RDF representation formats.
Your example RM resource is: <RDF> <Requirement rdf:about="http://doors.example.com/object/77"> <implementedBy rdf:resource="http://rtc.example.com/workitem/99" rdf:ID="link1" /> </Requirement> <Description rdf:about="link1"> <title>WorkItem 99: cache result sets for 5 minutes</title> <acme:justifiedBy rdf:resource="http://doors.example.com/module/44"/> </Description> </RDF> This is an abbreviation for the following triples: <http://doors.example.com/object/77> rdf:type oslc_rm:Requirement . <http://doors.example.com/object/77> oslc_rm:implementedBy < http://rtc.example.com/workitem/99> . #link1 rdf:type rdf:Statement . #link1 rdf:subject <http://doors.example.com/object/77> . #link1 rdf:predicate oslc_rm:implementedBy . #link1 rdf:object <http://rtc.example.com/workitem/99> . #link1 :title "WorkItem 99: cache result sets for 5 minutes" . #link1 acme:justifiedBy <http://doors.example.com/module/44> . OSLC query only supports matching tree patterns. Therefore you can't get the result you want by filtering the Requirements collection. You CAN get the desired result by filtering the Statement collection, i.e. in order to support this type of query, the service needs to provide a Query capability that contains all the reified Statement resources. Suppose you have a Statement collection and you are looking for all Requirements that are implemented and justified. The WHERE clause is: oslc_where=rdf:subject{rdf:type=oslc_rm:Requirement} and rdf:predicate=oslc_rm:implemented and acme:justifiedBy!=<> Note that in your example below you used the wildcard to match"any value", but that isn't in the spec. Instead, we can test that the property has a non-empty URI. Are you proposing that we allow wildcard on the RHS of tests? [1] http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-reifying [2] http://www.w3.org/TR/REC-rdf-syntax/#section-Reification Regards, ___________________________________________________________________________ Arthur Ryman, PhD, DE Chief Architect, Project and Portfolio Management IBM Software, Rational Markham, ON, Canada | Office: 905-413-3077, Cell: 416-939-5063 Twitter | Facebook | YouTube From: Dave <[email protected]> To: Arthur Ryman/Toronto/IBM@IBMCA Cc: Ian Green1 <[email protected]> Date: 08/31/2010 02:32 PM Subject: Re: [oslc-core] Question on query access to link properties Hi Arthur, One of our action items from last week's meeting was to try to get your RDF/SPARQL wisdom on this question (below). If you have a chance before the OSLC Core meeting tomorrow, please give this one some thought. Thanks, Dave On Wed, Aug 25, 2010 at 6:05 PM, Ian Green1 <[email protected]> wrote: > > At today's core meeting we discussed properties on links. Properties on > links are expressed in the RDF model by reified triples. Here's an > example RM resource: > > <RDF> > <Requirement rdf:about="http://doors.example.com/object/77"> > <implementedBy rdf:resource="http://rtc.example.com/workitem/99" > rdf:ID="link1" /> > </Requirement> > <Description rdf:about="link1"> > <title>WorkItem 99: cache result sets for 5 minutes</title> > <acme:justifiedBy rdf:resource="http://doors.example.com/module/44"/> > </Description> > </RDF> > > > The intent here is that there is an implementation relationship between > requirement 77 and workitem 99, and that relation has a couple of > properties, title and justifiedBy. > > Question. This came up on the call but we wanted to hear Arthur's view in > particular on querying over link properties. Such properties need to be > accessible to query. Let's say I was looking for all resources having an > implementedBy link with a justification. Would this be expressed as > > oslc.where=implementedBy=*{acme:justifiedBy=*} > > Or is there a problem with this - for example, is it ambiguous? > > Another worry was that since the RDF/XML above is just one of the ways in > which the RDF model can be presented, would/should OSLC Query support those > additional "surface" representations? (For example, OSLC query involving > rdf:subject, predicate, and object. I tried to write such an OSLC query > but gave up - is it possible?) > > The feeing on the call was that there ought to be a single recommended way > (perhaps the only way) of accessing link properties in a query which was > reflective of the intuition that most folk would have, given the above > RDF/XML, or JSON representations. > > > > > _______________________________________________ > Oslc-Core mailing list > [email protected] > http://open-services.net/mailman/listinfo/oslc-core_open-services.net >
