Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass name for default graph to the parser #13

Open
elf-pavlik opened this issue Mar 18, 2019 · 3 comments
Open

pass name for default graph to the parser #13

elf-pavlik opened this issue Mar 18, 2019 · 3 comments

Comments

@elf-pavlik
Copy link
Member

This could work similar as still pending PR #10

Inspired by comment in rdfjs/data-model-spec#144 (comment)

@namedgraph: I think a more relevant experiment is reading such data, then taking it from the default graph and storing it into named graph, which name is most likely the URI the data was read from.
Am I supposed to iterate the quads to change the graph component to do that?

@elf-pavlik: or it would make sense in a similar way as one can give baseIRI to the parser to also provide some kind of nameForDefaultGraph. This way quads could have that IRI instead the default graph from the begging.

I mentioned quad immutability in linked issue, here I would just like to gather feedback on providing an option similar to baseIRI to set name for default graph in parsers.

@rubensworks
Copy link
Member

This is definitely a useful feature.
I also do this in my JSON-LD and RDF/XML parsers using the defaultGraph constructor option, see https://github.com/rubensworks/jsonld-streaming-parser.js#configuration

@blake-regalia
Copy link

What would this mean for quad formats?

@elf-pavlik
Copy link
Member Author

I think it would just affect the default graph of the dataset and have not impact on any of named graphs already existing in it. Only edge case I can think of would come if dataset has a default graph and existing named graph named with IRI one would want to use for default graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants