Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Query question

Samuel,

  Thank you for the guidance.  I was able to work around the issue and didn't need to use the setPrefix().  One of the problems obvious is a lack of understanding RTC's OSLC API on my part.


Regards,


CHRISTOPHER D. FRYETT
IBM Certified IT Specialist
C&SI Lab Services and Support Tools


2D barcode - encoded with contact informationPhone: 1-720-395-3723 | Mobile: 1-406-927-2812
E-mail:
 fryett@xxxxxxxxxx
Chat:
Skype:  christopher.fryett
Find me on:
 LinkedIn: www.linkedin.com/in/christopherfryett Twitter: cfryett 
IBM

401 N 31st St
Billings, MT 59101-1286
United States


Inactive hide details for Samuel Padgett---12/17/2013 11:49:42 AM---Correction: queryParams.setWhere("dcterms:type=Samuel Padgett---12/17/2013 11:49:42 AM---Correction: queryParams.setWhere("dcterms:type=

From: Samuel Padgett/Durham/IBM@IBMUS
To: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Cc: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>, lyo-dev-bounces@xxxxxxxxxxx
Date: 12/17/2013 11:49 AM
Subject: Re: [lyo-dev] Query question
Sent by: lyo-dev-bounces@xxxxxxxxxxx




Correction:

queryParams.setWhere("dcterms:type=\"com.ibm.rational.utl.request.type.utlrequest\"");
queryParams.setPrefix("dcterms=<
http://purl.org/dc/elements/1.1/>");

--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx
Eclipse Lyo: Enabling tool integration with OSLC



__________________


Chris,


In your request below, you ask for dc:type and dc:description without defining the dc prefix. I can tell from the URI of the description. If you use a non-standard prefix, you must use oslc.prefix or the provider won't know what you're referring to. It's also a bad idea to use different prefixes for the same namespace (both dcterms and dc in the same request).


For your original request, you have a long query. I would start with something simple to try to get it to work, then build from there. How about


queryParams.setWhere("dc:type=\"com.ibm.rational.utl.request.type.utlrequest\");
queryParams.setPrefix("dcterms=<
http://purl.org/dc/elements/1.1/>");

In my RTC repository, the dcterm:type values are short strings like "Defect". You might double-check the values in your oslc.where.


I also see you have spaces before comparison operators in your original query. This isn't allowed per the query syntax.


http://open-services.net/bin/view/Main/OSLCCoreSpecQuery?sortcol=table;up=#oslc_where

--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx
Eclipse Lyo: Enabling tool integration with OSLC



Inactive hide details for Christopher D Fryett---12/17/2013 01:18:55 PM---I did try changing dc to dcterms with no luck.  When Christopher D Fryett---12/17/2013 01:18:55 PM---I did try changing dc to dcterms with no luck.  When I searched google it looked like there may have
    From:

Christopher D Fryett/Billings/IBM@IBMUS
    To:

Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
    Date:

12/17/2013 01:18 PM
    Subject:

Re: [lyo-dev] Query question
    Sent by:

lyo-dev-bounces@xxxxxxxxxxx




I did try changing dc to dcterms with no luck.  When I searched google it looked like there may have been an issue with dc:type but no resolution.  Adding setPrefix() is not working either.  I have gone after a specific work item and get the following although it looks like the first item in the select isn't being returned.  When I incorporated the dc:type for the where clause in my original email I get the error I sent before.  


<rdf:RDF
  xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dcterms="
http://purl.org/dc/terms/"
  xmlns:oslc_cm="
http://open-services.net/ns/cm#"
  xmlns:rdfs="
http://www.w3.org/2000/01/rdf-schema#"
  xmlns:oslc="
http://open-services.net/ns/core#" >
<rdf:Description rdf:about="
https://localhost:9443/rtc/oslc/contexts/_v-iPIIO2Ed-ec4_ZoGHE4w/workitems">
  <rdfs:member rdf:resource="
https://localhost:9443/rtc/resource/itemName/com.ibm.team.workitem.WorkItem/8260"/>
</rdf:Description>
<rdf:Description rdf:about="
https://localhost:9443/rtc/resource/itemName/com.ibm.team.workitem.WorkItem/8260">
  <rdf:type rdf:resource="
http://open-services.net/ns/cm#ChangeRequest"/>
</rdf:Description>
<rdf:Description rdf:about="
https://localhost:9443/rtc/oslc/contexts/_v-iPIIO2Ed-ec4_ZoGHE4w/workitems?oslc.where=dcterms%3Aidentifier%3D%228260%22&amp;oslc.select=oslc_cm.properties%3Drtc_cm%3Acom.ibm.rational.utl.request.attrib.client%2Cdc%3Atitle%2Cdc%3Atype%2Cdc%3Adescription">
  <dcterms:title>Work Items</dcterms:title>
  <oslc:totalCount>1</oslc:totalCount>
  <rdf:type rdf:resource="
http://open-services.net/ns/core#ResponseInfo"/>
</rdf:Description>
</rdf:RDF>



Regards,



CHRISTOPHER D. FRYETT

IBM Certified IT Specialist
C&SI Lab Services and Support Tools
 

2D barcode - encoded with contact informationPhone: 1-720-395-3723 | Mobile: 1-406-927-2812
E-mail:
 fryett@xxxxxxxxxx
Chat:
Skype:  christopher.fryett
Find me on:
 LinkedIn: www.linkedin.com/in/christopherfryett Twitter: cfryett 
IBM

401 N 31st St
Billings, MT 59101-1286
United States


Inactive hide details for Samuel Padgett---12/17/2013 10:30:29 AM---These can be difficult to debug. The one thing that stands Samuel Padgett---12/17/2013 10:30:29 AM---These can be difficult to debug. The one thing that stands out to me is you're using the dc prefix i

From:
Samuel Padgett/Durham/IBM@IBMUS
To:
Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Cc:
Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>, lyo-dev-bounces@xxxxxxxxxxx
Date:
12/17/2013 10:30 AM
Subject:
Re: [lyo-dev] Query question
Sent by:
lyo-dev-bounces@xxxxxxxxxxx




These can be difficult to debug. The one thing that stands out to me is you're using the dc prefix in the where clause instead of the usual dcterms. If you define your prefixes using oslc.prefix, does it work?


queryParams.setPrefix("dc=<
http://purl.org/dc/elements/1.1/>,rtc_cm=<http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/>");

Or perhaps just change dc:type to dcterms:type in your call to setWhere().
--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx
Eclipse Lyo: Enabling tool integration with OSLC



Inactive hide details for Christopher D Fryett---12/17/2013 10:52:13 AM---I have taken the RTC client example and was able to sChristopher D Fryett---12/17/2013 10:52:13 AM---I have taken the RTC client example and was able to successfully query the specific RTC provider.  N 
    From:

Christopher D Fryett/Billings/IBM@IBMUS
    To:

Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
    Date:

12/17/2013 10:52 AM
    Subject:

[lyo-dev] Query question
    Sent by:

lyo-dev-bounces@xxxxxxxxxxx




I have taken the RTC client example and was able to successfully query the specific RTC provider.  Now I am trying to take an existing query and get it working, but the response says unknown attribute.  Is there a better way to debug this.  The information I am trying to retrieve is a name not the ID.  Your insight is greatly appreciated.


queryParams.setWhere(
"dc:type in [\"com.ibm.rational.utl.request.type.utlrequest\",\"com.ibm.rational.utl.request.type.sdt\",\"com.ibm.rational.utl.request.type.jsrequest\",\"com.ibm.rational.utl.request.type.ttrequest\",\"com.ibm.rational.utl.request.type.em\",\"com.ibm.rational.utl.request.type.cloud_poc\",\"com.ibm.rational.utl.request.type.grt\"] and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"TBD\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"NA\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"N/A\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"Enablement\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"Several\" and rtc_cm:com.ibm.rational.utl.request.attrib.client !=\"Internal\" and rtc_cm:resolutionDate =\"\"");
queryParams.setSelect(
"oslc_cm.properties=rtc_cm:com.ibm.rational.utl.request.attrib.client,dcterms:title,dcterms:type,dcterms:description");


<rdf:RDF
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="
http://open-services.net/ns/core#" >
<rdf:Description rdf:nodeID="A0">
<oslc:message>Unknown attribute id: [type]</oslc:message>
<oslc:statusCode>400</oslc:statusCode>
<rdf:type rdf:resource="
http://open-services.net/ns/core#Error"/>
</rdf:Description>
</rdf:RDF>


Chris
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/lyo-dev

JPEG image

JPEG image

JPEG image

JPEG image

GIF image

GIF image

GIF image


Back to the top