[oslc-core] Question on query access to link properties
ryman at ca.ibm.com
Tue Aug 31 15:49:02 EDT 2010
In RDF/XML, when rdf:ID is used on a property element, it reifies the
statement  which results in 4 additional triples (rdf:Statement,
rdf:subject, rdf:predicate, rdf:object) being added to the graph .
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:
<title>WorkItem 99: cache result sets for 5 minutes</title>
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 <
#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:
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
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
Dave <snoopdave at gmail.com>
Arthur Ryman/Toronto/IBM at IBMCA
Ian Green1 <ian.green at uk.ibm.com>
08/31/2010 02:32 PM
Re: [oslc-core] Question on query access to link properties
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
On Wed, Aug 25, 2010 at 6:05 PM, Ian Green1 <ian.green at uk.ibm.com> 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:
> <Requirement rdf:about="http://doors.example.com/object/77">
> <implementedBy rdf:resource="http://rtc.example.com/workitem/99"
> rdf:ID="link1" />
> <Description rdf:about="link1">
> <title>WorkItem 99: cache result sets for 5 minutes</title>
> <acme:justifiedBy rdf:resource="http://doors.example.com/module/44"/>
> 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
> particular on querying over link properties. Such properties need to be
> accessible to query. Let's say I was looking for all resources having
> implementedBy link with a justification. Would this be expressed as
> 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
> which the RDF model can be presented, would/should OSLC Query support
> additional "surface" representations? (For example, OSLC query
> 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
> (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
> Oslc-Core at open-services.net
More information about the Oslc-Core