It's all about the answers!

Ask a question

Is there any way to get the name of the Shape (Artifact Type) in RRC from Shape URI ?

Samanwita Majumdar (5033639) | asked Sep 11 '12, 8:22 a.m.
We have obtained the shape URI through and it returns a URI as Resource Shape URI->>, is there any way by which we can get the name of the shape?

The code snippet I am using to get the shape is as follows..

NodeList paNode = (NodeList)(xpath.evaluate(requirementfactoryShapes, doc, XPathConstants.NODESET));
        for (int i = 0; i < paNode.getLength(); i++) {
            //These all correspond to an artifact type URI in RRC
            System.out.println("Resource Shape URI->> " + paNode.item(i).getTextContent());

3 answers

permanent link
Gabriel Ruelas (1.1k13) | answered Sep 11 '12, 10:51 a.m.
The name of the shape is exposed in the response as :

<dc:title rdf:parseType="Literal">Feature</dc:title>

It is not part of a property within the response, it is an attribute of it.

permanent link
liesa pugsley (311) | answered Oct 19 '12, 12:22 a.m.
Is it possible to use the resource shape (ie requirement type) in the querycapabilityURI -so that I could select all requirements that were 'Business Requirement' artifact type?

permanent link
Gabriel Ruelas (1.1k13) | answered Oct 22 '12, 10:05 a.m.
Yes. but it must be specified as rm:ofType.

Here is an example :
"....   &oslc.where=rm:ofType=<>   ...."

Your answer

Register or to post your answer.