Let me clarify a bit more as I dug up some notes. There are three places where ordering can be considered as far as OSLC Servers are concerned:
1) Usual GET/PUT OSLC requests (raw RDF inside the body).
2) OSLC Query results.
3) SPARQL results.
§1 Raw RDF does not have ordering guarantees on properties. Links:
"Information is represented by a set of RDF triples, often called a model. As it is a set, there is no ordering"
§2 The only place where we break RDF convention is the OSLC Query results, where the order of the returned results matters. The
actual
spec says in [query-50] that ordered resources
should come in the right order. However, it has been
proposed to change
that to express ordering explicitly but the current spec allows [query-51] to satisfy this. Jim may have a different viewpoint on this.
§3 SPARQL results return ordered set of rows. However, we don't expect SPARQL to be used anywhere by default and don't have special code to handle it.
Ideally, I would like to generate methods like
Set<IResource> getSomeProperty();
void setSomeProperty(Collection<IResource> resources);
But this would require an incompatible change to the API and we don't want to break compatibility for little or no reason.
--
/Andrew
Hello Guillaume,
Thank you for inspecting this issue carefully! May I ask you why are you expecting any order to be preserved? Are you aware that RDF treats multiple resources not as a List but as a Set?
Because I would suggest to switch to a HashSet to make sure order is not preserved.
Hello,
I am using an OSLC Requirement Server with OSLC. And I see that requirement uses URI don't keep the order from OSLC Server because it's store in a TreeSet.
TreeSet use natural order comparator to sort element. But natural order have no sens for URI.
So I propose to use LinkedHashSet which keep the order provide by OSLC Server.
Can I provide a PullRequest for this ?
If you are ok, which the best way to do the PR : gerrit or github ?
Regards
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/lyo-dev