Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362012 - RIO provider query results are incorrect format.
Summary: RIO provider query results are incorrect format.
Status: CLOSED FIXED
Alias: None
Product: Lyo
Classification: Technology
Component: RIO (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Fiedler CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 18:16 EDT by Michael Fiedler CLA
Modified: 2015-03-09 09:53 EDT (History)
1 user (show)

See Also:
sspeiche: review+


Attachments
Update buildResponseResource to put query results in own element with correct about (15.44 KB, patch)
2011-10-25 18:31 EDT, Michael Fiedler CLA
fiedler.mf: iplog+
Details | Diff
Additional updates to query parm handling (26.24 KB, patch)
2011-10-26 11:40 EDT, Michael Fiedler CLA
fiedler.mf: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.