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

DNG-How to get all the artifacts of module using OSLC

 Hi 

In Requirement Management I have created the module (Module->create module, - name as SWC, artifact type as software component->ok) and In SWC module I have imported custom artifacts from excel, after that I moved theses artifacts to folder name SWCartifact.

When I am trying to get these artifacts using oslc I am not able to fetch it.

Any help will greatly appreciated!

0 votes



2 answers

Permanent link

It works for me. The <oslc_rm:uses> attribute in the response is the resource URI of each artifact included in the module.

0 votes

Comments

 Hi Donald,


Thanks for reply!

Could you please help me with sample query?



Not sure what you really want. This is what I usually do.
1. Open the module in web client.
2. Click on the three-bar menu and choose Share Link to Artifact ...
3. Copy the link in the dialog.
4. Put the link in the OSLC client and just fire away.

 HI Donald,

below is the query I am firing to get artifacts.This gives me artifact in the specific folder, but I want all the artifacts of a model weather it is in same folder or in different folders.

<o:p> </o:p>

<o:p>   </o:p> Is there any query to get artifacts of a model whether they are in same folder or in different folder? Thanks in advance!

<o:p> </o:p>

String queryCapability = client.lookupQueryCapability(serviceProviderURL, OSLCConstants.OSLC_RM_V2, OSLCConstants.RM_REQUIREMENT_TYPE);
OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams.setWhere("nav:parent=<"+ folderUri +">, rdf:type=<;http://open-services.net/ns/rm#Requirement>");
OslcQuery query =new OslcQuery(client, queryCapability, 20, queryParams);
result = query.submit();


Permanent link

According to the Jazz.net article: https://jazz.net/library/article/1197

You should be able to query the items in a collection (perhaps Modules too?).  
Note says:
To query for all artifacts in a collection based on collection’s identifier, use a query similar to:
 &oslc.prefix=oslc_rm=<http://open-services.net/ns/rm%23>,dcterms=<http://purl.org/dc/terms/>
    
 &oslc.select=oslc_rm:uses&oslc.where=dcterms:identifier=1
    
Unfortunately, this query does not seem to work in 6.03. Adding a prefix for oslc_rm simply eliminated the filtering applied by the where clause.  It returns the entire set.  This may be a bug.

0 votes

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

Question asked: Apr 27 '17, 6:28 a.m.

Question was seen: 4,968 times

Last updated: Oct 27 '22, 9:08 p.m.

Confirmation Cancel Confirm