How to read rtc work item's resource's attributes using lyo for java?

Hi,
I am using lyo in a java project, and I want to read the values of attributes which are resources (the work item includes the URI and I want to do a request on this URI and get other attributes. e.g. plannedFor attribute).
I tried to define a new class to hols the attributes I need but getEntity() return null:
ClientResponse plannedForResponse = client.getResource(plannedFor.toString());
plannedForAttribute plannedForAttr = plannedForResponse.getEntity(plannedForAttribute.class);
I saw similar question here:
https://jazz.net/forum/questions/216079/how-to-define-custom-resource-class-for-requirement-folder
it helped progress, but still I get the null.
I think I lack some knowledge to be able to do it properly. Is anyone aware of any tutorial or good example of how to do it?
Thanks!
Tali
Accepted answer

Eclipse/Lyo, maven project oslc-java-samples (folder org.eclipse.lyo.client.java.sample) in The org.eclipse.lyo.client repo has a number of sample java client applications including RTCFormSample.java. Note that the simple resource classes in org.eclipse.lyo.client.oslc.resources may not have the extended Jazz properties. You can however use the Toolchain Modeler and Code Generator to generate a web application that supports extended properties on domain classes.
4 other answers

Hello,

If you're using Lyo, you are coding Java. If you're coding Java, you should use the Team Concert client API. Lyo is a great API for accessing DOORs data, not for Team Concert.
What API’s are Available for RTC and What Can You Extend?

It has been a long time since I last tested with Lyo. IIRC, you need to extend quite a few classes for this to happen. If you use the sample code, you will see that when you first parse the RDF/XML response to a Java class, many attributes are lost since they are defined in the class. If you try to retrieve such attributes after that, you will get null value.

The Java classes in eclipse/Lyo Java client that represent OSLC domain resources are intentionally simple and reflect what was defined in the OSLC 2.0 domain specifications.