Repository navigation
Improved RDF loading options - #1850
Merged
Merged
Conversation
niklasl
requested review from
andersju,
branchedelac,
jannistsiroyannis,
kwahlin and
olovy
October 5, 2026 08:53
niklasl
force-pushed
the
feature/load-rdf-options
branch
from
October 5, 2026 09:38
3e5aa25 to
9084ca4
Compare
Also: - Factor out shared JSON-LD calls to JsonLdShapes - Use flatten and compactWithEmbeddedBlanks to ensure normalized result - Add example record with some oddities that are normalized by this - Write TrigToJsonLdParser in proper java
Useful for loading larger RDF/XML files by iterating on each description. This is a rather idiosyncratic approach, but worth testing (with system librarians) for importing transformed XML.
Also: - Let reCompact only expand and compact, whereas reCompactWithEmbeddedBlanks expands, flattens, compacts, then re-embeds blank nodes. - Let these two be the only public JsonLdShapes functions.
Also: - Fixes passed format to Jena - Adjust some class and method access modifiers - Only re-compact in TrigToJsonLdParser if a context is passed
since re-compaction is performed in a following step. (Even though parse now only re-compacts if a context is provided, this is a more clear invocation. Also, previously, expansion happened unconditionally, resulting in an expanded form, which made the following context introspection silently do nothing.)
and factor out a complicated piece as checkedSystemShaped.
niklasl
force-pushed
the
feature/load-rdf-options
branch
from
October 7, 2026 13:55
b39bee7 to
1d121ba
Compare
olovy
approved these changes
Oct 7, 2026
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.
Support referencing system context in RdfReader.
This change included:
Add whelktool script for loading each RDF file in a nested directory structure
This can be used to load the SMDB dump, and/or incorporated into DatasetImporter to load it as a dataset (depending on update routine).
Add XmlIterParser and example whelktool script
Useful for loading larger RDF/XML files by iterating on each description. This is a rather idiosyncratic approach, but worth testing (with system librarians) for importing transformed XML (e.g. ONIX).
Add
rdfDirToJsonLinescommand to xlimporter (ImporterMain)A simple starting point for creating dataset import files. (Could to with parallelization for speed though!)