Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] FW: [Bug 533213] New: rdf:Seq deserialization in JMH contains no elements

Sure, Ricardo,

 

If something is possible to implement with a rather limited effort, let’s do it. It is always great to be able to handle any RDF that comes from the outside!

 

/Andrew

 

Den 2018-05-08  18:42 skrev "lyo-dev-bounces@xxxxxxxxxxx på uppdrag av Ricardo Javier Herrera Ledesma" <lyo-dev-bounces@xxxxxxxxxxx på uppdrag av neormx@xxxxxxxxx> följande:

 

 

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.


Back to the top