Github user stain commented on the issue:
https://github.com/apache/incubator-commonsrdf/pull/19
Doing the [rdf4j
implementation](https://issues.apache.org/jira/browse/COMMONSRDF-35?) I noticed
that there a
[Statement](http://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/model/Statement.html)
has 0 or more contexts (e.g. graph names if assuming a Dataset) - however
these Statements are used both in "union Graph like" and "Dataset like"
settings and thus would have unclear equality semantics, in particular for
`.remove()` methods.
So I think with Commons RDF you would have to force either view on the
Statement rather than be a fuzzy hybrid. In fact from a single Statement you
would get a single Triple, but potentially multiple Quads with different
`getGraphName()`, which obviously should not be `.equals()` each-other even if
they are backed by the very same Statement.
Thus for rdf4j I would assume that a a `graph.remove(triple)` would remove
the `Statement` - removing it from the union graph would mean removing from all
contexts.
while I would expect `dataset.remove(quad)` would remove that quad from
only that context - that is the other quads from the other contexts would
remain in the dataset.
I don't think rdf4j supports such a "Statement-modifying" call and would
have to re-insert the `Statement` with the shrunk context list. Devil's in the
detail.. but I can see why formalizing this kind of semantics could be valuable
over "Look at the source code" for knowing what happens.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---