Creation of custom links in DNG [message #1739030] |
Wed, 27 July 2016 05:22 |
Eclipse User |
|
|
|
How can I create a custom link in DNG using Eclipse Lyo, I tried extending my class from Requirement class, and implementing a link as it is done in Requirement class using necessary annotations , but I am facing with a ClassCast Exception, is there any other way in which I can create or implement a custom link in DNG using Lyo? The code giving me a ClassCast Exception is as follows:
Requirement otherRequirement = new MyRequirements();
otherRequirement = getResponse.getEntity(Requirement.class);
((MyRequirements)otherRequirement).addCRSSatisfiedBySysRS(new Link(new URI("Some Url")));
But at the time of downcasting using the below line :
((MyRequirements)otherRequirement).addCRSSatisfiedBySysRS(new Link(new URI("Some Url")));
I get org.eclipse.lyo.client.oslc.resources.Requirement cannot be cast to org.XXX.samples.MyRequirements,
MyRequirements here is my sub class that extends the Requirement class.
|
|
|
Powered by
FUDForum. Page generated in 0.02827 seconds