[oslc-core] Query - server side aggregation
Dragos Cojocari
dragos.cojocari at ro.ibm.com
Mon Nov 22 05:19:51 EST 2010
Hey all,
how can a query consumer know which resources a query service can access
and aggregate. To better explain the question I have attached at the end
of the mail there is a snippet taken from the OSLC 2.0 ChangeRequest
Resource Shape . Assuming we have a query service for the ChangeRequest
resource how can a query consumer tell which of the 3 resource properties
above ( creator, relatedChangeRequest and testedBytestCase) can be
aggregated by the query service and thus usable in a complex query.
The answer to this question is needed so that the query consumer can
decide how to build the queries to access the data:
- a single request (query) that returns everything:
https://<querybase>?oslc_cm.select=dc:creator{*},cm:relatedChangeRequest
{*}, cm:testedByTestCase{*}
- multiple requests , one for the collection of Change Requests and then
separate GET requests to retrieve the information about creator,
relatedChangeRequest and testedByTestCase.
Regards,
Dragos
From:
Dragos Cojocari/Romania/IBM at IBMRO
To:
Arthur Ryman/Toronto/IBM at IBMCA, Tack Tong/Toronto/IBM at IBMCA
Date:
11/12/2010 10:15 AM
Subject:
OSLC Query question
Hey Arthur, Tack,
I have asked this before, maybe in a different formulation, but I need to
ask again as this is still not clear to me and it will play a great part
in RPE support for Reportable REST v2. The question is wow can a query
consumer know which resources a query provider can access and aggregate.
To make this more clear here is an example.
At the end of the mail there is a snippet taken from the OSLC 2.0
ChangeRequest Resource Shape .
Assuming we have a query service for the ChangeRequest resource how can a
query consumer tell which of the following resource properties: creator,
relatedChangeRequest and testedBytestCase can be aggregated by the query
service. The need to know this by looking at the resource shapes and query
is to allow the query consumer to decide if:
- a single request that returns the ChangeRequest resources and the
details of its resource properties can be made:
https://<querybase>?oslc_cm.select=dc:creator{*},cm:relatedChangeRequest
{*}, cm:testedByTestCase{*}
- multiple requests are needed: one for the collection of Change Requests
and then for each request separate requests to get the details of its
resource properties
Thanks and Regards,
Dragos
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:foaf="http://http://xmlns.com/foaf/0.1/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc:ResourceShape
rdf:about="http://example.com/oslc/shapes/ChangeRequest">
<dcterms:title>CM V2 Change Request</dcterms:title>
<oslc:describes rdf:resource="
http://open-services.net/ns/cm#ChangeRequest" />
<rdf:type rdf:resource="http://open-services.net/ns/core#ResourceShape"
/>
<oslc:property>
<oslc:Property>
<oslc:name>creator</oslc:name>
<oslc:propertyDefinition rdf:resource="
http://purl.org/dc/terms/creator" />
<oslc:valueType rdf:resource="
http://open-service.net/ns/core#AnyResource" />
<oslc:range rdf:resource="http://http://xmlns.com/foaf/0.1/Person
" />
<oslc:valueShape rdf:resource="
http://example.com/oslc/shapes/Person" />
<oslc:occurs rdf:resource="
http://open-service.net/ns/core#Zero-or-many" />
<oslc:representation rdf:resource="
http://open-service.net/ns/core#Either" />
</oslc:Property>
</oslc:property>
<!-- Relationship properties -->
<oslc:property>
<oslc:Property>
<oslc:name>relatedChangeRequest</oslc:name>
<dcterms:title>Related ChangeRequest</dcterms:title>
<oslc:propertyDefinition
rdf:resource="
http://open-services.net/ns/cm#relatedChangeRequest" />
<oslc:valueType rdf:resource="
http://open-services.net/ns/core#Resource" />
<oslc:range rdf:resource="
http://open-services.net/ns/cm#ChangeRequest" />
<oslc:occurs rdf:resource="
http://open-service.net/ns/core#Zero-or-many" />
<oslc:representation rdf:resource="
http://open-service.net/ns/core#Reference" />
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property>
<oslc:name>testedByTestCase</oslc:name>
<dcterms:title>Tested by TestCase</dcterms:title>
<oslc:propertyDefinition
rdf:resource="http://open-services.net/ns/cm#testedByTestCase"
/>
<oslc:valueType rdf:resource="
http://open-services.net/ns/core#Resource" />
<oslc:range rdf:resource="http://open-services.net/ns/qm#TestCase
" />
<oslc:occurs rdf:resource="
http://open-service.net/ns/core#Zero-or-many" />
<oslc:representation rdf:resource="
http://open-service.net/ns/core#Reference" />
</oslc:Property>
</oslc:property>
</oslc:ResourceShape>
</rdf:RDF>
Exceptand situatiile in care partile au convenit in alt mod: / Unless
stated otherwise above:
IBM România S.R.L.
Bucharest Business Park, Corp A2, Şos. Bucureşti-Ploieşti Nr. 1A, 013681
Bucureşti 1, ROMANIA
CIF RO378660, RC J/40/5106/1991
Cap.Soc. 41.670 Lei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://open-services.net/pipermail/oslc-core_open-services.net/attachments/20101122/d4d4d70e/attachment-0003.html>
More information about the Oslc-Core
mailing list