OSLC DOORS/DWA get Requirement by URL
Hi,
I have a quite basic Use-Case.
I need to get the XML Representation of a Requirement and I want to find it by its link / urn:
e.g my input is: https://mydwa:myport/dwa/rm/urn:rational::1-5855s7436e7d0cbb-O-3-000000c0
Therefore I am using the Eclipse lyo and I am able to authenticate and to get Modules and so on.
Anyway I am still unable to get the correct endpoint for getting exactly this and only this Requirement.
Can somebody suggest how to do it with lyo or how the OSLC Endpoint must look like?
Thanks!
Accepted answer
If you already have the url of the requirement, next step, you perform a /GET on it to pull its RDF document that will contain all its attributes. Find out more at http://git.eclipse.org/c/lyo/org.eclipse.lyo.client.git/tree/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/DoorsOauthSample.java
ClientResponse getResponse = client.getResource(requirementURL,OslcMediaType.APPLICATION_RDF_XML);
4 other answers
Have you seen https://jazz.net/library/article/1382 ? It point to Eclipse Lyo samples which have one that talk to Doors 9...
Comments
I have started with the lyo sample but I didnt find any example on how to query the requirement by its link.
I made it now by simply invoking a get on the URL and set the accept type to XML but now I face another Issue which I am not yet able to resolve when reading the Entity:
com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2017-01-27' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2017-01-27' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '2017-01-27' is not a valid value for 'dateTime'.
Thanks for your help
I'm not familiar DOORS/DWA but it appears to me that the content from DWA is not compatible with Lyo. Check the below web page for the correct/expected syntax of the dateTime string.
https://wiki.xmldation.com/Support/Validator/cvc-datatype-valid-1-2-1
I guess if you cannot configure DWA to return the desired format, you may have to "hack" the response before putting it through Lyo.
Hello,
I guess you would like to select only the property URL where xxx (what)?
Comments
Hi,
basically I got a DOORS Requirement URL.
I want to use lyo to get this Requirement from DWA using OSLC.
As I said, I was able to authenticate and to apply some filters on my query, but I did not yet find a way to simply retrieve the XML+RDF/XML Representation of the Requirement by its ID.
I need something like
"Give me all attributes of requirement where requirement.url = xxx:xxx/uri:xxxxx"