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

What does Dataset.identifier identify? #2537

Open
aucampia opened this issue Aug 22, 2023 · 1 comment
Open

What does Dataset.identifier identify? #2537

aucampia opened this issue Aug 22, 2023 · 1 comment

Comments

@aucampia
Copy link
Member

It's not clear that it identifies anything sensible, porbably it just an artifact that the inheritance tree is not optiomal and that Dataset should not inherit from ConjunctiveGraph

aucampia added a commit to aucampia/rdflib that referenced this issue Aug 26, 2023
`Store.query` and `Store.update` have a parameter `queryGraph`, which
presumably specifies the initial [active
graph](https://www.w3.org/TR/sparql11-query/#sparqlDataset).

When SPARQL is evaluated against a `Dataset`, the initial active graph
should be the default graph
[[ref](https://www.w3.org/TR/sparql11-query/#sparqlAlgebraEval)],
however, when calling `rdflib.graph.Graph.query` or
`rdflib.graph.Graph.update`, they were passing
`rdflib.graph.Dataset.identifier` as the value of `queryGraph` to
`Store.query` and `Store.update`. The passed value would not have been
the identifier of the default graph of the Dataset, and would instead
have been an identifier that has really no meaning whatsoever (see
<RDFLib#2537>).

This change fixes the selection of the initial active graph by passing
`ConjunctiveGraph.default_context.identifier` if the `Graph.query` or
`Graph.update` method is called on a `ConjunctiveGraph` and
`ConjunctiveGraph.default_union` is `False`.
aucampia added a commit to aucampia/rdflib that referenced this issue Aug 26, 2023
`Store.query` and `Store.update` have a parameter `queryGraph`, which
presumably specifies the initial [active
graph](https://www.w3.org/TR/sparql11-query/#sparqlDataset).

When SPARQL is evaluated against a `Dataset`, the initial active graph
should be the default graph
[[ref](https://www.w3.org/TR/sparql11-query/#sparqlAlgebraEval)],
however, when calling `rdflib.graph.Graph.query` or
`rdflib.graph.Graph.update`, they were passing
`rdflib.graph.Dataset.identifier` as the value of `queryGraph` to
`Store.query` and `Store.update`. The passed value would not have been
the identifier of the default graph of the Dataset, and would instead
have been an identifier that has really no meaning whatsoever (see
<RDFLib#2537>).

This change fixes the selection of the initial active graph by passing
`ConjunctiveGraph.default_context.identifier` if the `Graph.query` or
`Graph.update` method is called on a `ConjunctiveGraph` and
`ConjunctiveGraph.default_union` is `False`.

Related issues:
- Fixes <RDFLib#2538>.
aucampia added a commit to aucampia/rdflib that referenced this issue Aug 26, 2023
`Store.query` and `Store.update` have a parameter `queryGraph`, which
presumably specifies the initial [active
graph](https://www.w3.org/TR/sparql11-query/#sparqlDataset).

When SPARQL is evaluated against a `Dataset`, the initial active graph
should be the default graph
[[ref](https://www.w3.org/TR/sparql11-query/#sparqlAlgebraEval)],
however, when calling `rdflib.graph.Graph.query` or
`rdflib.graph.Graph.update`, they were passing
`rdflib.graph.Dataset.identifier` as the value of `queryGraph` to
`Store.query` and `Store.update`. The passed value would not have been
the identifier of the default graph of the Dataset, and would instead
have been an identifier that has really no meaning whatsoever (see
<RDFLib#2537>).

This change fixes the selection of the initial active graph by passing
`ConjunctiveGraph.default_context.identifier` if the `Graph.query` or
`Graph.update` method is called on a `ConjunctiveGraph` and
`ConjunctiveGraph.default_union` is `False`.

Related issues:
- Fixes <RDFLib#2538>.
aucampia added a commit to aucampia/rdflib that referenced this issue Aug 26, 2023
`Store.query` and `Store.update` have a parameter `queryGraph`, which
presumably specifies the initial [active
graph](https://www.w3.org/TR/sparql11-query/#sparqlDataset).

When SPARQL is evaluated against a `Dataset`, the initial active graph
should be the default graph
[[ref](https://www.w3.org/TR/sparql11-query/#sparqlAlgebraEval)],
however, when calling `rdflib.graph.Graph.query` or
`rdflib.graph.Graph.update`, they were passing
`rdflib.graph.Dataset.identifier` as the value of `queryGraph` to
`Store.query` and `Store.update`. The passed value would not have been
the identifier of the default graph of the Dataset, and would instead
have been an identifier that has really no meaning whatsoever (see
<RDFLib#2537>).

This change fixes the selection of the initial active graph by passing
`ConjunctiveGraph.default_context.identifier` if the `Graph.query` or
`Graph.update` method is called on a `ConjunctiveGraph` and
`ConjunctiveGraph.default_union` is `False`.

Related issues:
- Fixes <RDFLib#2538>.
aucampia added a commit that referenced this issue Aug 29, 2023
`Store.query` and `Store.update` have a parameter `queryGraph`, which
presumably specifies the initial [active
graph](https://www.w3.org/TR/sparql11-query/#sparqlDataset).

When SPARQL is evaluated against a `Dataset`, the initial active graph
should be the default graph
[[ref](https://www.w3.org/TR/sparql11-query/#sparqlAlgebraEval)],
however, when calling `rdflib.graph.Graph.query` or
`rdflib.graph.Graph.update`, they were passing
`rdflib.graph.Dataset.identifier` as the value of `queryGraph` to
`Store.query` and `Store.update`. The passed value would not have been
the identifier of the default graph of the Dataset, and would instead
have been an identifier that has really no meaning whatsoever (see
<#2537>).

This change fixes the selection of the initial active graph by passing
`ConjunctiveGraph.default_context.identifier` if the `Graph.query` or
`Graph.update` method is called on a `ConjunctiveGraph` and
`ConjunctiveGraph.default_union` is `False`.

Related issues:
- Fixes <#2538>.
@namedgraph
Copy link

Randomly found some ancient but maybe relevant discussion :)
https://code.alcidesfonseca.com/docs/rdflib/graphs_bnodes.html

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

2 participants