Feature/io option refactoring#219
Merged
Merged
Conversation
abdessamad-abdoun
approved these changes
Oct 31, 2025
remiceres
approved these changes
Oct 31, 2025
Contributor
remiceres
left a comment
There was a problem hiding this comment.
Thanks for the diagrams and the reorganization. Just a few minor comments, it’s approved on my side.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While developing the RDFa parser, I came upon a problem with the options of the IO classes:
There are no dedicated classes for the options for most parsers, only for serializers.
So I tried to reorganize the classes and created a few placeholder option classes for parsers.
Before, the classes in the IO category looked like that:
--- config: class: hideEmptyMembersBox: true --- classDiagram IOOptions <-- AbstractIOOptions IOOptions <|-- RDFParserOptions IOOptions <|-- SerializationOption SerializationOption <-- AbstractSerializerOption AbstractSerializerOption <|-- Rdfc10Options AbstractSerializerOption <|-- AbstractNFamilyOption AbstractSerializerOption <|-- AbstractTFamilyOption AbstractSerializerOption <|-- XmlOption RDFParserOptions <|-- RDFParserBaseIRIOptions SerializationOption <-- TitaniumJSONLDProcessorOption RDFParserBaseIRIOptions <-- TitaniumJSONLDProcessorOption AbstractIOOptions <|-- TitaniumJSONLDProcessorOption RDFParserBaseIRIOptions <|-- ANTLRTurtleParser.BaseIRIOptions AbstractNFamilyOption <|-- NQuadsOption AbstractNFamilyOption <|-- NTriplesOption AbstractTFamilyOption <|-- TriGOption AbstractTFamilyOption <|-- TurtleOption AbstractSerializerOption <|-- Rdfc10Options class RDFSerializerBNPrefixOptionsNotably, an unused class for blank node prefixes and several inconsistencies in the inheritance of abstract and interfaces.
I tried to follow the following structure:
--- config: class: hideEmptyMembersBox: true --- classDiagram IOOptions <-- AbstractIOOptions AbstractIOOptions <|-- AbstractSerializerOptions AbstractSerializerOptions <|-- RDFC10Options AbstractSerializerOptions <|-- AbstractNFamilyOption AbstractSerializerOptions <|-- AbstractTFamilyOption AbstractSerializerOptions <|-- XMLSerializerOption AbstractSerializerOptions <|-- JSONLDSerializerOption AbstractNFamilyOption <|-- NQuadsSerializerOption AbstractNFamilyOption <|-- NTriplesSerializerOption AbstractTFamilyOption <|-- TriGSerializerOption AbstractTFamilyOption <|-- TurtleSerializerOption BaseIRIOptions <-- AbstractSerializerOptions BaseIRIOptions <-- JSONLDParserOption BaseIRIOptions <-- TriGParserOption BaseIRIOptions <-- TurtleParserOption BaseIRIOptions <-- XMLParserOption AbstractIOOptions <-- JSONLDParserOption AbstractIOOptions <-- TriGParserOption AbstractIOOptions <-- TurtleParserOption AbstractIOOptions <-- XMLParserOption AbstractIOOptions <-- NTriplesParserOption AbstractIOOptions <-- NQuadsParserOptionI also took the liberty of renaming classes for better consistency, and I removed from the JSON-LD and the Trig/Turtle/NTriples/NQuads classes any mention of the inner parser.