It's all about the answers!

Ask a question

How can I get allowed values for an RTC enumeration list attribute using web APIs


Myles F (145) | asked Feb 23 '15, 6:32 p.m.
edited Feb 24 '15, 3:47 a.m. by Ralph Schoon (63.1k33645)
Hello,
I have an 'Enumeration list' (multiple selection) field, but I cannot get the enumeration values for it.

When I get the resource shape, the field looks like:

<rdf:Description rdf:about="https://my.rtc:9443/ccm/oslc/context/_0u1_QV7hEeSPi_AaoZ4IKA/shapes/workitems/task/property/customMultiSelect">
        <rdf:type rdf:resource="http://open-services.net/ns/core#Property"/>
        <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/>
        <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/>
        <oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:readOnly>
        <oslc:propertyDefinition rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/customMultiSelect"/>
        <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-many"/>
        <oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">customMultiSelect</oslc:name>
        <oslc:defaultValue>[]</oslc:defaultValue>
        <dcterms:title rdf:parseType="Literal">Custom Multi Select</dcterms:title>
</rdf:Description>

Enumeration fields (single selection) also have an <oslc:allowedValues> element, that provides an enumeration that can be looked up, but enumeration lists don't seem to have this.

If I retrieve a work item, the field doesn't show up unless it has a value set, so I can't get the possible enumerations from that either. 

How can I get the options for my attribute?

Thanks.

One answer



permanent link
F R (132) | answered Feb 10 '17, 6:44 a.m.

You can get the full definition of the enumerated values using GET on the property definition. There you can get the full mapping between the numerical values (rdf:value) and the string labels (rdfs:label).

Your answer


Register or to post your answer.