Hello everyone, we have the requirement to preserve the order of umbel:isLike resources and rdagr2:alternateIdentity literals in https://data.rism.info/id/rismauthorities/pe30077074?format=rdf . To my understanding, rdf:List would be a good choice. I followed the recommendation at http://patterns.dataincubator.org/book/ordered-list.html (data shortened for brevity here): <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:nodeID="genid5"> <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List"/> <rdf:li rdf:resource="http://digital.slub-dresden.de/id339704470"/> <rdf:li rdf:resource="http://digital.slub-dresden.de/id313540659"/> <rdf:li rdf:resource="http://digital.slub-dresden.de/id307035654"/> </rdf:Description> <rdf:Description rdf:about="http://data.rism.info/id/rismauthorities/pe30077074"> <umbel:isLike xmlns:umbel="http://umbel.org/umbel#" rdf:nodeID="genid5"/> </rdf:Description> </rdf:RDF>
Selecting this list via SimpleSelector and using Jena's RDFList fails because no rdf:first & rdf:rest are found: //node is the result of the SimpleSelector <http://data.rism.info/id/rismauthorities/pe30077074>, umbel:isLike, null. RDFList list = node.as(RDFList.class); boolean valid = list.isValid(); //returns false ExtendedIterator<RDFNode> items = list.iterator(); while (items.hasNext()) { Resource listItem = items.next().asResource(); //throws an exception ...} The only way of getting RDFList to work is adding rdf:parseType='Collection', but then more Blank Nodes are created and only one element is found in the iteration (and not necessarily the first). W3C's validator says, the above rdf:List is valid RDF/XML. Should I use another Java interface in Jena for this? Or do I have to implement the list with more low level Jena calls avoiding the RDFList interface? (e.g. iterating the _1, _2, _3, ...-Predicates with Selectors myself) Thanks & Best Regards Andreas P.S. My Jena dependency and version currently used: <dependency> <groupId>org.apache.jena</groupId> <artifactId>apache-jena</artifactId> <version>3.6.0</version> <type>pom</type> </dependency>
