while creating a requirement in DOORS NG through lyo client project,how to set the value of ArtifactFormat
Accepted answer
Hello
The DNG OSLC implementation only supports artefacts whose format is "Text", "Collection" and "Module". Other formats would require a standardization of their representation at OSLC - currently there are no plans to reach such standardization at OSLC.
I suggest you raise an enhancement request on the DNG product.
cheers
-ian
The DNG OSLC implementation only supports artefacts whose format is "Text", "Collection" and "Module". Other formats would require a standardization of their representation at OSLC - currently there are no plans to reach such standardization at OSLC.
I suggest you raise an enhancement request on the DNG product.
cheers
-ian
Comments
Hi Ian,
I tried creating Requirement collection with artifactformat value as "Module".But by default the value get set to "Collection".
Is there any way I can create Module Artifact through OSLC lyo Java client
Hi Amit
no, I'm afraid the HTTP API doesn't support Module creation.This is something we're hoping to address in upcoming work. You can track this at OSLC API for modules (67748).
regards
-ian
2 other answers
Have you checked the sample code, namely org.eclipse.lyo.client/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/RRCFormSample.java? The related code is shown below.
//Get Feature Requirement Type URL
ResourceShape featureInstanceShape = RmUtil.lookupRequirementsInstanceShapes(
serviceProviderUrl, OSLCConstants.OSLC_RM_V2,
OSLCConstants.RM_REQUIREMENT_TYPE, client, "Feature");
......
if (( featureInstanceShape != null ) && (requirementFactory != null ) ){
// Create REQ01
requirement = new Requirement();
requirement.setInstanceShape(featureInstanceShape.getAbout());
requirement.setTitle("Req01");
//Get Feature Requirement Type URL
ResourceShape featureInstanceShape = RmUtil.lookupRequirementsInstanceShapes(
serviceProviderUrl, OSLCConstants.OSLC_RM_V2,
OSLCConstants.RM_REQUIREMENT_TYPE, client, "Feature");
......
if (( featureInstanceShape != null ) && (requirementFactory != null ) ){
// Create REQ01
requirement = new Requirement();
requirement.setInstanceShape(featureInstanceShape.getAbout());
requirement.setTitle("Req01");
Comments
Hi Nong, thanks for your prompt response.
Above method only guarantee that requirement "Artifact Type" value is set correctly.
What i am interested is in how to set value of " Artifact Format".
By default sample code set the value of "" Artifact Format" to "Text".
I tried putting following code but no luck.
URI formatURI=URI.create("https://server:port/rm/types/_s8WhgWynEeWNWa-3-YEVeg#Storyboard");
requirement.getExtendedProperties().put(RMConstant.PROPERTY_ARTIFACT_FORMAT,formatURI);
but this value not getting persisted.
Oh sorry, must have misread what was required. When using OSLC, I think you can only use the "TEXT" Artifact Format, no? "Storyboard" (and other similar types) artifacts are graphical artifacts, and you can only create a placeholder at best. Or is this exactly what you are trying to do?
Hi Nong ,
We do have use case to create requirement with correct value of Artifact Format through lyo java client.Is this the limitation with OSLC ?. if so then do we have any other rest API available which will help me to populate artifact format value other then default.