Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » Provider Link Modifications
Provider Link Modifications [message #1439114] Mon, 06 October 2014 22:15 Go to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Are there any examples for updating an existing link on the provider side? Also, are there any examples demonstrating how to delete an existing link?

For example, create a references link in DOORS/DWA via Lyo. Now update the existing link's name || description || uri. Maybe later delete the link.

Thanks,
Matt
Re: Provider Link Modifications [message #1439784 is a reply to message #1439114] Tue, 07 October 2014 14:01 Go to previous messageGo to next message
Samuel Padgett is currently offline Samuel PadgettFriend
Messages: 30
Registered: July 2009
Member
Matt,

Lyo has a Link class that holds the link URI and a label. If you use the Lyo client Requirement class, it should work out of the box.

/org.eclipse.lyo.client.java/src/main/java/org/eclipse/lyo/client/oslc/resources/Requirement.java

You might know, but there is a sample that works with DOORS showing how to update a Requirement.

/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/DoorsOauthSample.java

The sample creates a link, but modifying an existing link works the same way. Removing a link from the set should delete the link.

Good luck,
Sam
Re: Provider Link Modifications [message #1440240 is a reply to message #1439784] Wed, 08 October 2014 05:35 Go to previous messageGo to next message
Matt Stone is currently offline Matt StoneFriend
Messages: 46
Registered: August 2014
Member
Sam,

Thanks for the reply. That makes sense. I was still using the DoorsOauthSample code which works around the DOORS related Lyo bug 438163 by using Jena directly.

I know there are a couple ways to work around the strict data type enforcement but nothing which is provider specific. For example, I know I can modify the JenaModelHelper to use getString() instead of getValue() to avoid the Date format exception. Or set the "org.eclipse.lyo.oslc4j.strictDatatypes" system's property to false. The problem is these are global changes that can impact the validation of data types when consuming other providers within the same runtime.

What do you think of making the "org.eclipse.lyo.oslc4j.strictDatatypes" property a Thread based value which can be toggled at runtime? That way the consumer application can specify when to enforce the strictness of the data type values based on the providers they're connecting to.

Thanks again,
Matt
Re: Provider Link Modifications [message #1440562 is a reply to message #1440240] Wed, 08 October 2014 14:19 Go to previous message
Samuel Padgett is currently offline Samuel PadgettFriend
Messages: 30
Registered: July 2009
Member
Hey, Matt. The sample has been updated to work with Requirement class again, working around the date problem. You might git pull for the latest.

It's reasonable to limit the strict datatypes property to a thread or a request, although I'd have to think about how to do it. Note you should be able to turn it on and off using System.setProperty(), but it affects all threads.

Sam
Previous Topic:DOORS NG OAuth Dance
Next Topic:Exception in oslcClient.lookupServiceProviderUrl
Goto Forum:
  


Current Time: Tue Mar 19 09:00:41 GMT 2024

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

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

Back to the top