How to read the details of all the Atribute Types in any Project Area ?
2 answers
Not quite sure why you need all the attribute types in "any" project area. Getting the type definition should be very straightforward.
When you GET the details of a requirement, you will get <oslc:instanceShape>, which I believe you have already known that. Follow the instance shape URI, you should then have some <rm:hasSystemAttribute> and <rm:hasAttribute> attributes. And finally follow the URI in these attributes, you can get the details of each individual attribute, with <dcterms:title> being the attribute name.
Do I misunderstand what you are trying to do?
Comments
Hi,
I found the code that will do the job:
ClientResponse clientResponseAttribute = client.getResource(requirement.getInstanceShape().toString(), OSLCConstants.CT_RDF);
ResourceShape resourceShape = clientResponseAttribute.getEntity(ResourceShape.class);
artifactType = resourceShape.getTitle();
Thanks
Vaibhav