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

get all collections from serviceprovider

I was using the link for working with requirements.
For getting the services for a specific project area I have used 
https://jazz.server.com:9443/rm/discovery/_jMaJ8AlnEeOYRLW4UQ3HEg/services.xml

<rdf:RDF>
<oslc:ServiceProvider rdf:about="https://jazz.server.com:9443/rm/discovery/_jMaJ8AlnEeOYRLW4UQ3HEg/services.xml">
<dcterms:title rdf:parseType="Literal">JKE Banking (Requirements Management)</dcterms:title>
<dcterms:description rdf:parseType="Literal">
Service Descriptor for Project: JKE Banking (Requirements Management)
</dcterms:description>
<dcterms:publisher rdf:resource="https://jazz.server.com:9443/rm/application-about"/>
<oslc:details rdf:resource="https://jazz.server.com:9443/jts/process/project-areas/_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<rm:home rdf:resource="https://jazz.server.com:9443/rm/web#action=com.ibm.rdm.web.pages.showProjectDashboard&projectURI=https://jazz.server.com:9443/jts/process/project-areas/_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<oslc:service>
<oslc:Service>
<oslc:domain rdf:resource="http://open-services.net/ns/rm#"/>
<oslc:selectionDialog>
<oslc:Dialog>
<dcterms:title rdf:parseType="Literal">Requirement Selection</dcterms:title>
<oslc:label>Requirement</oslc:label>
<oslc:dialog rdf:resource="https://jazz.server.com:9443/rm/_ajax-modules/com.ibm.rdm.web.RRCPicker?projectURL=https%3A%2F%2Fjazz.server.com%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<oslc:hintWidth>800px</oslc:hintWidth>
<oslc:hintHeight>510px</oslc:hintHeight>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
</oslc:Dialog>
</oslc:selectionDialog>
<oslc:selectionDialog></oslc:selectionDialog>
<oslc:creationDialog></oslc:creationDialog>
<oslc:creationDialog></oslc:creationDialog>
<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title rdf:parseType="Literal">Requirement Creation Factory</dcterms:title>
<oslc:creation rdf:resource="https://jazz.server.com:9443/rm/requirementFactory?projectURL=https%3A%2F%2Fjazz.server.com%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1bxdYwlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1hayYAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1kgioglnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1mrs5AlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1o1B8glnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1vd1dAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1xAtkQlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1x6shAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1zwfkglnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_119fAQlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_13RtpAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_14mjUQlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_150ERAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_185NcAlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_1_gckQlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_2BfZkQlnEeOYRLW4UQ3HEg"/>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title rdf:parseType="Literal">Collection Creation Factory</dcterms:title>
<oslc:creation rdf:resource="https://jazz.server.com:9443/rm/requirementFactory?projectURL=https%3A%2F%2Fjazz.server.com%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_17IS5QlnEeOYRLW4UQ3HEg"/>
<oslc:resourceShape rdf:resource="https://jazz.server.com:9443/rm/types/_2CyaEglnEeOYRLW4UQ3HEg"/>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:queryCapability>
<oslc:QueryCapability>
<dcterms:title rdf:parseType="Literal">Query Capability</dcterms:title>
<oslc:queryBase rdf:resource="https://jazz.server.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fjazz.server.com%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_jMaJ8AlnEeOYRLW4UQ3HEg"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
</oslc:QueryCapability>
</oslc:queryCapability>
<oslc:queryCapability>
<oslc:QueryCapability>
<dcterms:title rdf:parseType="Literal">Folder Query Capability</dcterms:title>
<oslc:queryBase rdf:resource="https://jazz.server.com:9443/rm/folders?oslc.where=public_rm:parent=https://jazz.server.com:9443/rm/folders/_jMaJ8AlnEeOYRLW4UQ3HEg"/>
</oslc:QueryCapability>
</oslc:queryCapability>
<calm:filter>
<calm:Filter>
<dcterms:title rdf:parseType="Literal">Requirements Changed Since Filter</dcterms:title>
<oslc:usage rdf:resource="http://jazz.net/xmlns/prod/jazz/calm/1.0/requirementsChangedSince"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<calm:filerBase rdf:resource="https://jazz.server.com:9443/rm/calmFilter/_jMaJ8AlnEeOYRLW4UQ3HEg/requirementsChangedSince"/>
</calm:Filter>
</calm:filter>
</oslc:Service>
</oslc:service>
</oslc:ServiceProvider>
</rdf:RDF>

how to get the list of collections and their respective requirements from the service xml.
i tried with this url  https://jazz.server.com:9443/rm/publish/collections/* its only giving list of collections not the requirements 

0 votes


Accepted answer

Permanent link
Hi,

You can use the query Capability ( found in the service doc ) with following parameters ( some chars are URL encoded ) :
&oslc.prefix=dcterms%3D%3Chttp://purl.org/dc/terms/%3E,rdf%3D%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23%3E,oslc_rm%3D%3Chttp://open-services.net/ns/rm%23%3E
&oslc.select=dcterms:title,oslc_rm:uses
&oslc.where=rdf:type=%3Chttp://open-services.net/ns/rm%23RequirementCollection%3E

That will provide an output like :

 <rdfs:member>
            <oslc_rm:RequirementCollection rdf:about="https://gradev.ibm.com:9444/rdm/resources/_hnLEFQpwEeOjY9bpifAJpg">
                <dcterms:title>Coll02</dcterms:title>
                <oslc_rm:uses rdf:resource="https://gradev.ibm.com:9444/rdm/resources/_kwGj4QpwEeOjY9bpifAJpg"/>
            </oslc_rm:RequirementCollection>
        </rdfs:member>
        <rdfs:member>
            <oslc_rm:RequirementCollection rdf:about="https://gradev.ibm.com:9444/rdm/resources/_jPfFtApwEeOjY9bpifAJpg">
                <dcterms:title>Coll03</dcterms:title>
                <oslc_rm:uses rdf:resource="https://gradev.ibm.com:9444/rdm/resources/_liPLdQpwEeOjY9bpifAJpg"/>
                <oslc_rm:uses rdf:resource="https://gradev.ibm.com:9444/rdm/resources/_mfTQpQpwEeOjY9bpifAJpg"/>
            </oslc_rm:RequirementCollection>
        </rdfs:member>

where oslc_rm:uses contains the URI of an artifact that is part of that specific collection

Rosa Naranjo selected this answer as the correct answer

0 votes

Comments

 hi Gabriel Ruelas 

could you please explain with the xml what i was getting . I used the following url
https://jazz.server.com:9443/rm/folders?oslc.where=public_rm:parent=https://jazz.server.com:9443/rm/folders/_jMaJ8AlnEeOYRLW4UQ3HEg" it was giving 403 error

The folder query is used to obtain/navigate the folder structure. Tyry using :
"https://jazz.server.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fjazz.server.com%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_jMaJ8AlnEeOYRLW4UQ3HEg

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,940
× 516
× 19

Question asked: Aug 21 '13, 6:13 a.m.

Question was seen: 6,081 times

Last updated: Sep 03 '13, 2:10 p.m.

Confirmation Cancel Confirm