It's all about the answers!

Ask a question

Rational DOORS Web Access Custom Type Read Only


1
1
Sin Ly (2157) | asked Jun 12 '15, 5:52 a.m.
I have been successful in accessing my modules using the querybase link. But I can not access my custom types, they are all readonly=false. 

I can see in Rational Doors Client, that they can all be read in the access rights. 

2 answers



permanent link
Dinyo Dinev (311234) | answered Oct 20 '16, 3:52 a.m.
 So I do not know if it is the best desiction but you can extract the resource shape for the formal module. For example
 I have requirement with enum attribute
 <rm_property:attrDef-1004 rdf:parseType="Literal">HEADING</rm_property:attrDef-1004>

So what is the real name. I request the resourceShape for the module

<oslc:property>
      <oslc:Property>
        <dcterms:title rdf:parseType="Literal">_TextType</dcterms:title>
        <oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >attrDef-1004</oslc:name>
        <oslc:allowedValue>
          <rdf:Description rdf:about="http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-1004#4">
            <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >4</dcterms:identifier>
            <oslc:label rdf:parseType="Literal">RECOMMENDATION</oslc:label>
          </rdf:Description>
        </oslc:allowedValue>
        <oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
        >false</oslc:readOnly>
        <oslc:allowedValue>
          <rdf:Description rdf:about="http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-1004#1">
            <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >1</dcterms:identifier>
            <oslc:label rdf:parseType="Literal">HEADING</oslc:label>
          </rdf:Description>
        </oslc:allowedValue>
        <oslc:propertyDefinition rdf:resource="http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-1004"/>
        <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
        <oslc:allowedValue>
          <rdf:Description rdf:about="http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-1004#2">
            <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >2</dcterms:identifier>
            <oslc:label rdf:parseType="Literal">DEFINITION</oslc:label>
          </rdf:Description>
        </oslc:allowedValue>
        <oslc:allowedValue>
          <rdf:Description rdf:about="http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-1004#3">
            <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
            >3</dcterms:identifier>
            <oslc:label rdf:parseType="Literal">INFORMATION</oslc:label>
          </rdf:Description>
        </oslc:allowedValue>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
      </oslc:Property>
    </oslc:property>

So here you can see the allowed values as well as the real name of the attribute _TextType.

permanent link
Sudarshan Rao (1963) | answered Jun 12 '15, 7:51 a.m.
If you are looking at accessing value of a custom attribute, then it is accessible.
If you do a GET on any object URI directly (with Accept and OSLC-Core-Version headers), you'll find the complete representation of the object including custom types - provided you have access to it in GUI.
If you want to access the custom attribute values using queryBase and oslc.select, then you'll likely need to use rm_property:attrDef-xxxx. You can find what the name is (attrDef-xxxx) by looking up the resourceShape.
For example, try something like this:
https://<server>:<port>/dwa/rm/oslc/query/urn:rational::1-55718b4938b21a1e-M-00000020?oslc.where=dcterms:creator="User 1"&oslc.select=dcterms:title,rm_property:attrDef-1002

Hope that helps.

Comments
Sin Ly commented Jun 12 '15, 8:28 a.m. | edited Jun 12 '15, 8:28 a.m.

Sin Ly commented Jun 12 '15, 8:30 a.m.

In addition, I have access to these values in DOORS Web Access.


Sudarshan Rao commented Jun 12 '15, 8:56 a.m.

Is that an enumerated attribute? If that's the case, you'll probably find the values in terms of links appended with #1, #2 and so on representing different values.. For example, one of the rdfs:member is as below:
<rdfs:member>
      <oslc_rm:Requirement rdf:about="https://<server>:<port>/dwa/rm/urn:rational::1-55718b4938b21a1e-O-19-00000020">;
        <rm_property:attrDef-1003 rdf:resource="https://<server>:<port>/dwa/rm/urn:rational::1-55718b4938b21a1e-M-00000020/types/attrDef-1003#2"/>;
        <dcterms:title rdf:parseType="Literal">19: Computer hardware resource utilization requirements</dcterms:title>
      </oslc_rm:Requirement>
</rdfs:member>

Are you not getting even this? If so, its probably worth pursuing this via PMR..
If you are getting link representation, you can use "useEnumLabel=true" in the query, to get the actual value of enumerated attribute (instead of link representation as shown above).


Sin Ly commented Jun 15 '15, 4:28 a.m.

 Thanks a lot, that worked. I can now see the values of my custom types that are enumerations. 


I find it kinda weird that they do not appear when I do an oslc.select=*. I just get this:

<rm_property:attrDef-1005 rdf:parseType="Literal"/>;
<rm_property:attrDef-1001 rdf:parseType="Literal"/>;

Is this expected behavior?

Also... what is the reasoning behind having the "readonly"=false for the enumerations, if I can actually read them by using "useEnumLabel=true"?


Sudarshan Rao commented Jun 15 '15, 5:11 a.m.

Not sure what's going wrong with your query.. I'm able to get all properties using oslc.select=*
And, "readonly"=false - states if the attribute is read-only or not. For example, Absolute Number is a read-only attribute of an object - so that property will have this flag set to true. All user created attributes will be set as false - since they can be updated.
It is not dependent on ACL set on attributes for the currently logged in user (that's my guess, I've not checked).

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.