Lyo OSLC does not retrieve all DOORS attribute
I need to retrieve requirements data from DOORS by URL, I am using the following code for that
ClientResponse response = client.getResource(url, OslcMediaType.APPLICATION_RDF_XML);
System.setProperty(AbstractOslcRdfXmlProvider.OSLC4J_STRICT_DATATYPES, "false");
Requirement requirement = new Requirement();
requirement = response.getEntity(Requirement.class);
The response (even the raw rdf XML) contains only some of the requirement attribute (the ones that exist by default when creating a new DOORS module, like id and text) but the rest of attributes are not returned.
I thought of making query, I am not sure it will work, but the provided example by lyo query the whole project area, I do not know how to query a specific requirements object
4 answers
Hello,
Requirement inherits from AbstractResource.
All the unknown properties are stored in extendedProperties. Try the method getExtendedProperties() on the class Requirement. Find out more at https://github.com/eclipse/lyo.core/blob/master/org.eclipse.lyo.oslc4j.core/src/main/java/org/eclipse/lyo/oslc4j/core/model/AbstractResource.java .
I hope it helps.
You can perform the same calls with a REST client to get to know the exact document sent by DOORS. Maybe, DOORS does not expose them all.
Comments
showing 5 of 7
show 2 more comments
This issue is that the Requirement class in the OSLC4J java client class reflects the implementation of the OSLC standard at the time it was developed. This is not the same as a DNG requirement which has application specific extensions.
the best thing to do would be to create subclass of Requirement that included the DNG properties. Optionally the DNG properties may be included in the Requirement's extended properties. Try that.
See this example: RRCFormSample.java