Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get workItem in IBM RTC using Eclipse Lyo?

So I want to request RTC 3.X work itmes with LYo 2.1, but I can not extract them from the stream: Where client is OslcOAuthClient.

ClientResponse response = client.getResource(resultsUrl, CT_RDF); ChangeRequest req = response.getEntity(ChangeRequest.class);

I am wondering what is the right resource object is it ChangeRequest or it is another? My in my stream there is (when I use String.class):


 <rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/ns/cm#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/"
    xmlns:oslc_cmx="http://open-services.net/ns/cm-x#"
    xmlns:process="http://jazz.net/ns/process#"
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:acc="http://open-services.net/ns/core/acc#"
    xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
    xmlns:oslc="http://open-services.net/ns/core#"
    xmlns:oslc_pl="http://open-services.net/ns/pl#" > 
  <rdf:Description rdf:about="https://10.0.2.79:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/27?useEnumLabel=true">
    <oslc_cmx:severity rdf:resource="https://10.0.2.79:9443/ccm/oslc/enumerations/_moQdkFrdEeWQIIEAtKgWEg/severity/severity.literal.l3"/>
    <oslc:instanceShape rdf:resource="https://10.0.2.79:9443/ccm/oslc/shapes/workitems/_oFcxBlxhEeWQIIEAtKgWEg"/>
    <rtc_cm:modifiedBy rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <rtc_ext:archived rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</rtc_ext:archived>
    <rtc_cm:type rdf:resource="https://10.0.2.79:9443/ccm/oslc/types/_moQdkFrdEeWQIIEAtKgWEg/myId"/>
    <acc:accessContext rdf:resource="https://10.0.2.79:9443/ccm/acclist#_moQdkFrdEeWQIIEAtKgWEg"/>
    <rtc_cm:timeSheet rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/rtc_cm:timeSheet"/>
    <oslc:shortId rdf:datatype="http://www.w3.org/2001/XMLSchema#string">27</oslc:shortId>
    <oslc_cm:status rdf:datatype="http://www.w3.org/2001/XMLSchema#string">In Progress</oslc_cm:status>
    <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">27</dcterms:identifier>
    <process:projectArea rdf:resource="https://10.0.2.79:9443/ccm/process/project-areas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <acp:accessControl rdf:resource="https://10.0.2.79:9443/ccm/oslc/access-control/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc:discussedBy rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/rtc_cm:comments"/>
    <oslc_cm:inprogress rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</oslc_cm:inprogress>
    <dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-16T10:57:56.600Z</dcterms:modified>
    <rtc_cm:state rdf:resource="https://10.0.2.79:9443/ccm/oslc/workflows/_moQdkFrdEeWQIIEAtKgWEg/states/bugzillaWorkflow/2"/>
    <dcterms:description rdf:parseType="Literal">text</dcterms:description>
    <oslc_cm:fixed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:fixed>
    <rdf:type rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/>
    <dcterms:contributor rdf:resource="https://10.0.2.79:9443/jts/users/unassigned"/>
    <rtc_cm:repository rdf:resource="https://10.0.2.79:9443/ccm/oslc/repository"/>
    <rtc_cm:filedAgainst rdf:resource="https://10.0.2.79:9443/ccm/resource/itemOid/com.ibm.team.workitem.Category/_ns_RCFrdEeWQIIEAtKgWEg"/>
    <oslc_cm:closed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:closed>
    <dcterms:type rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MyType</dcterms:type>
    <dcterms:title rdf:parseType="Literal">WorkItemFromCustomEnumerationType</dcterms:title>
    <oslc_cm:approved rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:approved>
    <oslc_cmx:project rdf:resource="https://10.0.2.79:9443/ccm/oslc/projectareas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc_cm:verified rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:verified>
    <rtc_cm:progressTracking rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/progressTracking"/>
    <oslc_pl:schedule rdf:resource="https://10.0.2.79:9443/ccm/oslc/workitems/_oFcxBlxhEeWQIIEAtKgWEg/schedule"/>
    <dcterms:subject rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mytype</dcterms:subject>
    <oslc_cm:reviewed rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc_cm:reviewed>
    <rtc_ext:contextId>_moQdkFrdEeWQIIEAtKgWEg</rtc_ext:contextId>
    <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-09-16T10:57:24.636Z</dcterms:created>
    <oslc:serviceProvider rdf:resource="https://10.0.2.79:9443/ccm/oslc/contexts/_moQdkFrdEeWQIIEAtKgWEg/workitems/services"/>
    <process:teamArea rdf:resource="https://10.0.2.79:9443/ccm/process/team-areas/_moQdkFrdEeWQIIEAtKgWEg"/>
    <oslc:shortTitle rdf:parseType="Literal">MyType 27</oslc:shortTitle>
    <rtc_cm:subscribers rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <rtc_cm:resolvedBy rdf:resource="https://10.0.2.79:9443/jts/users/unassigned"/>
    <dcterms:creator rdf:resource="https://10.0.2.79:9443/jts/users/Admin"/>
    <oslc_cmx:priority rdf:resource="https://10.0.2.79:9443/ccm/oslc/enumerations/_moQdkFrdEeWQIIEAtKgWEg/priority/priority.literal.l1"/>
  </rdf:Description>
</rdf:RDF>

0 votes


Accepted answer

Permanent link
Yes, ChangeRequest is the right choice.

You can find other CLM specific resources in the "org.eclipse.lyo.client.oslc.resources" in the "org.eclipse.lyo.client.java" project.
Dinyo Dinev selected this answer as the correct answer

1 vote

Comments

Ok. I try it but I have null as a result. So when I read is as String.class there is result but when read with ChangeRequest.class null is returned. So for that reason I was wondering why there is no such resource class as WorkItem. I will revise my code.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 25

Question asked: Sep 17 '15, 3:02 a.m.

Question was seen: 2,977 times

Last updated: Sep 18 '15, 3:42 a.m.

Confirmation Cancel Confirm