Skip to content

GraphDump operation does not dump the content of all named graphs #29

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

Open
AuPath opened this issue Jan 10, 2025 · 0 comments
Open

GraphDump operation does not dump the content of all named graphs #29

AuPath opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AuPath
Copy link
Collaborator

AuPath commented Jan 10, 2025

private static void graphDump(OperationParams params, Exchange exchange) throws IOException {
try(RepositoryConnection con = params.graph().getRepository().getConnection()) {
RepositoryResult<Statement> dump;
dump = con.getStatements(null, null, null);
Model dumpModel = QueryResults.asModel(dump);

After #20, a graph may have more than one namedGraph, line

dump = con.getStatements(null, null, null);
does not take this into account and thus does not correctly dump all namedGraphs and just dumps the default graph.

A possible solution would be to iterate over all the namedGraphs for the input graph and dump all the statements from these namedGraphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant