Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362012

Summary: RIO provider query results are incorrect format.
Product: [Technology] Lyo Reporter: Michael Fiedler <fiedler.mf>
Component: RIOAssignee: Michael Fiedler <fiedler.mf>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sspeiche
Version: unspecifiedFlags: sspeiche: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Update buildResponseResource to put query results in own element with correct about
fiedler.mf: iplog+
Additional updates to query parm handling fiedler.mf: iplog+

Description Michael Fiedler CLA 2011-10-25 18:16:36 EDT
Build Identifier: 

The RIO providers were not passing the ChangeRequestRdfXmlTests due to the result rdfs:members occupying an rdf:Description section with an about referring to the query itself, not the query base URL

Please assign to Michael Fiedler

Reproducible: Always
Comment 1 Michael Fiedler CLA 2011-10-25 18:31:34 EDT
Created attachment 205955 [details]
Update buildResponseResource to put query results in own element with correct about

I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.

Commits for this bug make changes to the buiildResponseResource for all 3 RIOs.  
 - put query result set in its own rdf:Description element with the proper about
 - add an oslc:totalCount to the query description section.

The CM RdfXML query tests pass now.
Comment 2 Steve Speicher CLA 2011-10-25 23:25:43 EDT
Getting null at end of URI for query URI.

For example when I use the queryBase URL without any oslc.where parameters such as:

GET http://localhost:8080/rio-cm/changerequest

I get a response that looks like:

<rdf:Description rdf:about="http://localhost:8080/rio-cm/changerequest?null">

Notice the extra trailing "?null".  This is one of the rare cases where the query URI == the container URI, so all predicates fit under 1 subject URI.
Comment 3 Michael Fiedler CLA 2011-10-26 09:00:48 EDT
The base RIO code was appending the ?null, so will fix that.   But, the proposed patch still was not considering the queryBase case correctly, so will fix that as well.

In my jetty test env, I am also seeing the case where the first GET on the queryBase as a url parameter that we need to ignore...i.e. make sure there is really an OSLC query parameter.

e.g. http://localhost:8080/rio-cm/changerequest?url=http%3A%2F%2Flocalhost%3A8080%2Frio-cm%2Fchangerequest
Comment 4 Michael Fiedler CLA 2011-10-26 11:40:39 EDT
Created attachment 205994 [details]
Additional updates to query parm handling

1) Don't add ?null to the queryUri when no parms exist
2) Put query predicates under the baseQuery subject when baseQuery used
3) handle case when all parameters are non-OSLC parameters
Comment 6 Samuel Padgett CLA 2015-03-09 09:53:41 EDT
Bulk update: Closing out Lyo bugs fixed long ago. Feel free to reopen if you feel your bug was closed in error.