Add 'generalized statements' option inference based on format#164
Merged
niegrzybkowski merged 5 commits intomainfrom Jul 21, 2025
Merged
Add 'generalized statements' option inference based on format#164niegrzybkowski merged 5 commits intomainfrom
niegrzybkowski merged 5 commits intomainfrom
Conversation
Ostrzyciel
reviewed
Jul 18, 2025
Member
Ostrzyciel
left a comment
There was a problem hiding this comment.
The simplest would be to set the inference to allow generalized RDF
This is a valid solution.
but I feel like the better solution would be to validate whether we're not receiving generalized statements as part of the input and emit a warning if an invalid jelly file was produced.
Unless you have a crystal ball, that's impossible :) this is a streaming algorithm, so we don't know what's coming, and we cannot peek ahead. The stream may be infinite, but your memory is finite.
Ostrzyciel
requested changes
Jul 18, 2025
src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfFormat.scala
Outdated
Show resolved
Hide resolved
src/main/scala/eu/neverblink/jelly/cli/command/rdf/util/RdfJellySerializationOptions.scala
Outdated
Show resolved
Hide resolved
Ostrzyciel
approved these changes
Jul 21, 2025
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.
Closes #155
I'm not sure how to handle NTriples and NQuads, since we have our own parser that supports generalized rdf. I pushed a failing test to demonstrate ("when input stream to output stream, generalized RDF (N-Quads)").
The simplest would be to set the inference to allow generalized RDF, but I feel like the better solution would be to validate whether we're not receiving generalized statements as part of the input and emit a warning if an invalid jelly file was produced.
The test for jelly-text option copying needs to call testMode otherwise the input stream is overwritten with an empty one. I have no idea why that happens, and why it doesn't happen anywhere else.