How to de-serialize Apache wink ClientResponse response object dynamically in lyo client project
![]()
Hi,
I have a oslc resource : https://server:port/rm/resources/_7UpQQ5zMEeWqXIur94EOpA.
I plan to perform GET on this URI in following way.
ClientResponse response = client.getResource(resultsUrl, OSLCConstants.CT_RDF);
Requirement req = response.getEntity(Requirement.class);
But my problem is that above mentioned resource URI can be of type Requirement or RequirementCollection. So how should I inspect response for rdf:type and based on its value,I should use either response.getEntity(Requirement.class) or response.getEntity(RequirementCollection.class);
I am new to APACHE WINK so kindly guide me on this issue.
Thanks in advance.
|
One answer
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.