How to get enumeration value
![]() I am writing program to get enumeration values by http client using OSLC-CM 2.0.
I want to know how I can get all id and name of enumeration by OSLC-CM 2.0 in java api.
For example:
<enumeration attributeTypeId="bugtype" name="bugproblemtype">
</enumeration>
1. I want to get a map <id, name> of enumeration. AttributeTypeId ="bugtype" or name ="bugproblemtype" as argument. I want to get the map as below: <bugtype.literal.l1, CA-用例缺陷>, <bugtype.literal.l2, DOC-文档错误>, <bugtype.literal.l3, EC-编码错误>
2. I want to get a id by name Input CA-用例缺陷 as argument, the id bugtype.literal.l1 will be return.
Please give me an advise.
|