Hello Andy, Thank you for the pointer to ReifierStd, it seems to do the job as expected [1]. I hope we are using the new API correctly (I would be very thankful for any feedback).
While working on the changes, I re-discovered that Model.getResource() only accepts Strings and simply passing "node.getURI()" fails on blank nodes. I found that [2] from SPDX tools implements the logic I expect. Would such method make sense on a Jena Model (as in, to be added to the org.apache.jena.rdf.model.Model API)? And I would like to thank you for your help and continued work on the Jena project! –Andrew. [1]: https://github.com/eclipse/lyo/pull/389/files?diff=split&w=1#diff-0fd9d8b08e29abbd461bbfb2cf63649a4c027397fb7f4161e8932a282ad42afcL952-R1014 [2]: https://github.com/spdx/tools/blob/bc35e25dacb728bf8332b82b509bb3efacd6c64e/src/org/spdx/rdfparser/SPDXDocument.java#L1225-L1235 On 16 Aug 2023, at 18:18, Andrii Berezovskyi <[email protected]> wrote: Thanks Andy, On 15 Aug 2023, at 10:12, Andy Seaborne <[email protected]> wrote: That's quite a long method! Yes, not proudest part of Lyo. To my shame, I was reluctant to refactor it since I took over the project. Looks like you are providing us with a necessary push. What is reification used for in Lyo? Do quoted triples provide the same capability? Lyo provides support for implementing OASIS OSLC standards. To be brief, OSLC (Core) is both a predecessor and a superset to the W3C LDP. OSLC allows metadata to be placed on link triples using RDF 1.1 reification [1]. Assuming that by quoted triples you refer to RDF-star, yes, they provide the same capability and would fully cover OSLC needs. However, Lyo still needs to support what is standardized in OSLC. Additionally, I was under impression that RDF-star haven't reached W3C Recommendation status and OASIS discourages citing documents that haven't reached the standard/recommendation status in its standards-track specs. Regardless, OSLC standards try to maintain backwards compat, which means the committee will only vote to add RDF-star support to the standard (e.g., via a SHOULD clause) but not remove RDF 1.1 reification for backwards compatibility reasons. Reification support is all calculation library code - it's a way to present reification. It does not affect storage. Jena2 had variations of reification which did impact storage - these have not existed in releases for a long time. The library that backs the reification support is ReifierStd and it will be available in jena5. ReifierStd works on graphs, not models. Writing companion code to provide the functionality for the Model API equivalents would be possible. Contributions welcome. RSIterator isn't necessary. It's a "typed next()" iterator that came about in the pre-generics times. I am not quite sure I understand the impact of the change. Do we need to implement any support if we need RDF 1.1 reification and are ready to switch to Graph and ReifierStd APIs, and drop the use of RSIterator? To be clear : this is not RDF-star quoted triples. To be clear from our side too, we are certainly interested in adopting RDF-star quoted triples in the future. We are not ready to drop RDF 1.1 reification until/unless RDF 1.2 drops it (when it reaches W3C Rec). Also, do I understand correctly that the removal is planned for Jena 5.x after JDK 21 release? Yes, sometime after Java21. Jena5 will require Java17, in line with supporting two LTS versions of Java. Jena is already built and tested on Java17 as part of our CI. Users can switch to java17 in deployments now. It is a bit faster and has Java improvements and fixes not backported to Java11. We've been testing Lyo on JDK 11, 17, 20, and 21-ea. We are ready for the JDK 17 migration, it's just that some of the Lyo users use it in legacy environments, but we've communicated to them that Lyo will drop JDK 11 support when Jena does. –Andrew. [1]: https://oslc-op.github.io/oslc-specs/notes/link-guidance.html#Anchor
