It's all about the answers!

Ask a question

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

Dinyo Dinev (31231) | asked Aug 19 '15, 7:42 a.m.
edited Aug 19 '15, 7:46 a.m.
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:
Accept: application/rdf+xml

And the result:
                        <oslc:resourceType rdf:resource=""/>
                        <oslc:resourceType rdf:resource=""/>
                        <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=""
            >Query Capability</dcterms:title>

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.4k313) | 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".

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.