Andrii, I agree with you
that Bags are useless, and I've seen also solutions where an extra
property is added to the model in order to keep the order, however
sometimes it may be useful to leave the order concerns to the
Jena/List themselves. Currently I'm working in a model where an
entity is related sometimes with
0..* entities of the same type and the order
matters:
class Entity {
List<Entity> children;
}
Adding an extra property
to keep the order...
class Entity {
int index;
List<Entity>
children;
}
has the inconvenient of
you having to sort the elements by yourself once deserialized by
JMH, not to mention that a model with a property that is used only
if the instance is part of a collection is not so good... this
also hits performance, if you have a complex hierarchy of
parent/children, the sorting algorithm will have to run once per
children list, it would be better if the children get sorted since
the deserialization
process.
Regarding rdf:Seq are unqueryable in SPARQL,
does this have to do with the fact that they are stored as blank
nodes? If so, I think we can modify JMH to correct that, actually
in this moment I have a copy with such changes and it is working
quite well.
I think that, in general, if OSLC lyo
library has an @OslcRdfCollectionType annotation that
accepts @OslcRdfCollectionType(collectionType = "Seq"), it is
worth that these changes be applied, they do not impact other
parts of the code. I'll work in a Gerrit patch to show it you all
and you can considere it.