DNG 6.0 : Updating Collection, Requirements link and serching Artifacts(Requirements/collection) by Name using OSLC..
As of now i am able to perform following operations in DNG using OSLC:
1. Get all requirements from DNG project.
2. Create folder in Root folder.
3. List of all the folders in DNG project.
4. Creating requirements and linking of other requirements with that.
5. Get requirements from a folder.
6. Get requirements from a collection
Here are other queries :
a) is it possible to create new Collection and add requirements in that using OSLC. but at the time of creating collection i need to check if there is already a collection with same Name then i need to retrieve that collection instead of creating new.
b) Same as collection i need to check if there is already a requirements with the same name then i need to retrieve that requirement and allow user to make changes in the requirements linked with that(Add or remove more requirements). and then Update the same requirement in DNG. I am able to retrieve requirement (of couse not by name but all in folder/project). how can i get (satisfiedBy) links associated. After adding/requirement, how can i updated requirement back to that DNG.
I am using OSLC, Java. Thanking in Advance.
1. Get all requirements from DNG project.
2. Create folder in Root folder.
3. List of all the folders in DNG project.
4. Creating requirements and linking of other requirements with that.
5. Get requirements from a folder.
6. Get requirements from a collection
Here are other queries :
a) is it possible to create new Collection and add requirements in that using OSLC. but at the time of creating collection i need to check if there is already a collection with same Name then i need to retrieve that collection instead of creating new.
b) Same as collection i need to check if there is already a requirements with the same name then i need to retrieve that requirement and allow user to make changes in the requirements linked with that(Add or remove more requirements). and then Update the same requirement in DNG. I am able to retrieve requirement (of couse not by name but all in folder/project). how can i get (satisfiedBy) links associated. After adding/requirement, how can i updated requirement back to that DNG.
I am using OSLC, Java. Thanking in Advance.
Accepted answer
All you need to know is in the below article, which I believe you have been reading.
https://jazz.net/library/article/1197
To search artifacts with a particular name, simply use the query capability URL with the condition oslc.where=dc:title="some name". Note that the result may contain both requirements and requirement collections, so you need to separate them.
To create requirements or requirement collections, use the creationFactory URL (POST).
To add/remove requirements in a collection, modify the collection (PUT) with the desired <oslc_rm:uses> properties. Other links are added/removed in the same fashion.
https://jazz.net/library/article/1197
To search artifacts with a particular name, simply use the query capability URL with the condition oslc.where=dc:title="some name". Note that the result may contain both requirements and requirement collections, so you need to separate them.
To create requirements or requirement collections, use the creationFactory URL (POST).
To add/remove requirements in a collection, modify the collection (PUT) with the desired <oslc_rm:uses> properties. Other links are added/removed in the same fashion.
Comments
Thanks Donald, One more question. how can i create requirement in a folder if i have folder URI. I can create Requirement but that is getting created in root folder but i want it to be created in specific folder.
Have you tried to add the <nav:parent> tag (point to the desired folder) in the payload during the requirement creation?
1 vote
Yes, I have tried but i was passing parent folder url as String whereas it must be URI object. Thanks!!!
 requirement.getExtendedProperties().put(RmConstants.PROPERTY_PARENT_FOLDER , new URI(parentFolderURI));