It's all about the answers!

Ask a question

How to get all the values for the multiple checkbox(Enumeration List).


Farheen Aslam (313) | asked Jun 05 '17, 1:33 a.m.

I can retrieve the values in the case if the Type for an attribute is Enumeration using oslc:allowedValues. But in case of Enumeration List I do not get the values as such.

Is there a way we can retrieve the values of EnumerationList or if we can get the Enumeration Id.

One answer



permanent link
Donald Nong (14.5k414) | answered Jun 05 '17, 3:47 a.m.

It should be the same as an attribute of Enumeration type. What do you get from the Resource Shape?


Comments
Farheen Aslam commented Jun 05 '17, 4:38 a.m. | edited Jun 06 '17, 12:14 a.m.

 Thank You but I do not get oslc:allowedValues tag in XML in case if it is enumerationList. It looks something like this.

<oslc: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:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-many"/>
<oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">test</oslc:name>
<oslc:defaultValue>[]</oslc:defaultValue>
<dcterms:title rdf:parseType="Literal">Test</dcterms:title>
</oslc:Property>
</oslc:property>


Donald Nong commented Jun 06 '17, 3:28 a.m.

No, you will not get <oslc:allowedValues>. Instead, you should get <oslc:range>, which is missing in your output above, for some reason. If you can get the <oslc:range> attribute, and access the resource URI within it, you will get all the allowed enumeration values.

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.