It's all about the answers!

Ask a question

How to get queryCapability's ResourceShape in Doors Next Generation ?


Dinyo Dinev (311034) | asked Aug 19 '15, 7:42 a.m.
edited Aug 19 '15, 7:46 a.m.
 Hi, 
in my company we are using Doors Next generation version 6.0.1 M2.
We want to get ResourseShape for our QueryCapability, but it is not returned.
I make call to:
Headers:
Accept: application/rdf+xml
GEThttps://<ip>:<port>/rm/oslc_rm/_Agw1YEA_EeW9sdfabXRPPL/services.xml

And the result:
  <oslc:queryCapability>
                    <oslc:QueryCapability>
                        <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
                        <oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
                        <oslc:queryBase rdf:resource="<ip:port>/rm/views?oslc.query=true&amp;projectURL=https%3A%2F%2F<ip>%3A<port>%2Frm%2Fprocess%2Fproject-areas%2F_Agw1YEA_EeW98vRsdfRPEQ"/>
                        <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >Query Capability</dcterms:title>
   </oslc:QueryCapability>

As you can see oslc:queryBase URI is returned but there is not resourceShape for the QueryCapability? My question is why and how to get one?


One answer



permanent link
Donald Nong (14.5k414) | answered Aug 19 '15, 11:03 p.m.
I don't recall ever seeing "resourceShape" in the "queryCapability" returned by RDNG, and I believe it is not implemented that way. In other words, you cannot get it at all. According to OSLC-RM V2 specification, oslc:ResourceShape SHOULD (not MUST) be returned on oslc:QueryCapability. And it also says

Where oslc:ResourceShape is not supported by the Query Capability, providers SHOULD use the following guidance to represent query results:

This is exactly what RDNG does.
I believe the reason behind it is that the query can return two types of resources - oslc_rm:Requirement and oslc_rm:RequirementCollection, and apparently they have different "shapes".

Comments
Dinyo Dinev commented Aug 20 '15, 4:12 a.m.

OK. We use the sample DB for Water Meter Project from the workshop:


In Doors 9.5. in the QueryCapability there was resourceShape but in DoorsNG 6.0 with the same data the response was very different.

So now when I request the queryBase URL, the result contains as expected:
<oslc_rm:Requirement rdf:about="https://<ip>:<port>/rm/resources/-037a32e9aba74d6casd329a27f111b3">; <oslc_rm:RequirementCollection rdf:about="https://<ip>:<port>/rm/resources/_iLeAwUDUasd98vRabXRPEQ">
And accessing the requirement I can see instanceShape of the requirement. Is it the right way to get the shape?

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.