Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » Creation of custom links in DNG
Creation of custom links in DNG [message #1739030] Wed, 27 July 2016 05:22
Anuraj Kurup is currently offline Anuraj KurupFriend
Messages: 2
Registered: July 2016
Junior Member
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.
Previous Topic:Creating Requirement with "Link From/To" in doors
Next Topic:Addition of multiple links
Goto Forum:
  


Current Time: Mon Nov 12 22:01:01 GMT 2018

Powered by FUDForum. Page generated in 0.01864 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top