eclipse-rdf4j / rdf4j

Eclipse RDF4J: scalable RDF for Java
https://rdf4j.org/
BSD 3-Clause "New" or "Revised" License
361 stars 163 forks source link

Move format-specific Rio settings to parser/writer package #1755

Open barthanssens opened 4 years ago

barthanssens commented 4 years ago

Currently the format-specific (RDF/XML, JSON-LD... ) are all part of the org.eclipse.rdf4j.rio.helpers package, which means that format-specific (extra) dependencies are sometimes required in the pom.xml.

A cleaner separation would be better, having only abstract / format-agnostic settings in rio.helpers and moving format-specific setting to the parser/writer package (e.g. org.eclipse.rdf4j.rio.jsonld)

abrokenjester commented 2 years ago

I'm taking a look at this, but for N-Triples in particular this is difficult to do cleanly, as there are generic utilities that reuse N-Triples settings and N-Triples utilities under the hood.

For the JSON-based and XML-based settings, the problem is that some of them are shared among multiple parser implementations.

I'll put up a draft PR with what we can easily move, but I'm not convinced we're really winning much by it.

abrokenjester commented 2 years ago

If this is something we want to pick up for 5.0, we should make it a priority to put deprecation notices in for the stuff we intend to move, in the next 4.x release.

barthanssens commented 1 year ago

Working on a branch to deprecate the current org.eclipse.rdf4j.rio.helpers; classes in 4.3.0 (except the "Basic" settings and perhaps the generic - non-LD - JSON settings) and create class(es) per parser package

barthanssens commented 1 year ago

A benefit is that removing the deprecated classes in e.g. 5.0 will also remove the jsonld-java dependency from the helper package

barthanssens commented 1 year ago

Removing the classes in helper package to be scheduled in 5.0 ?