apache / jena

Apache Jena
https://jena.apache.org/
Apache License 2.0
1.12k stars 653 forks source link

Replacement for `RecursiveElementVisitor` #1887

Closed lolgab closed 1 year ago

lolgab commented 1 year ago

Version

4.8.0

Question

I saw that RecursiveElementVisitor was removed in https://github.com/apache/jena/pull/1631 I wanted to ask you what should I use as a replacement. I wanted to update https://github.com/TopQuadrant/shacl to the latest version of Jena and it was using it.

afs commented 1 year ago

RecursiveElementVisitor is a do-nothing class that wasn't being used in Jena. The contract wasn't getting maintained.

Ideally, use a regular ElementVisitor. The SHACL code is all "startElement" calls so it looks like ElementVisitor.visit will work.

Otherwise, take a copy of the code.