Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] preserving the order of properties in JenaModelHelper

Hi,

Thanks for the quick reply. The link to the RDF primer was useful too.

I use Link exactly for that reason that it has a label -- a neat feature when I need to display a human-friendly link in HTML without looking up the actual resource it is pointing to. Moreover, I can customize the label based on a context (the owning resource). In principle, it does not contain any additional semantic information (it's more like caching information about the remote resource, like a title), so maybe it should not be stored as Link in the first place.
For now, I just resorted to a workaround to sort the links by numbers embedded into labels.

Thanks again,
Marius


2013/10/18 Samuel Padgett <spadgett@xxxxxxxxxx>

Hi, Marius. As you've found, arrays are modeled as multi-valued properties in RDF by Lyo, which doesn't guarantee ordering.

You're on the right track with OslcRdfCollectionType, but Link is not currently supported. I believe it's just a point-in-time limitation and could be implemented later on. Do you need the Link class or is URI sufficient? Link is there so you can give the URI a label, usually for when you want to display it in a UI.

For List and Seq, have a look at the RDF primer section on collections:

http://www.w3.org/2007/02/turtle/primer/#L2986

The primary difference is that List says these are all the members and there can be no others. Seq is an ordered group, but not necessarily all-inclusive.

--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx
Eclipse Lyo: Enabling tool integration with OSLC


Back to the top