[
https://issues.apache.org/jira/browse/COMMONSRDF-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15244190#comment-15244190
]
ASF subversion and git services commented on COMMONSRDF-15:
-----------------------------------------------------------
Commit a06f6219a4458f5dda70cda3097b975b005db308 in incubator-commonsrdf's
branch refs/heads/master from [~stain]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-commonsrdf.git;h=a06f621 ]
Create our own BlankNode for testing
The test was improved to make the g1 and g2 with its own BlankNode instances -
each graph then having _:b1 and _:b2 - but with different uniqueReference().
This would also test that multiple graph.add(s,p,o) works with foreign
BlankNode instances, but without taking a stance on COMMONSRDF-15 - we don't
care how it does the mapping (if any) - and don't even require that they have
the same uniqueReference() after adding.
Iterating g1 and g2 to add to g3 should not assume those BlankNodes are the
same based on their triplesString() - but differ by their uniqueReference()
> Can foreign BlankNode impls be used with .contains() and .getTriples()?
> -----------------------------------------------------------------------
>
> Key: COMMONSRDF-15
> URL: https://issues.apache.org/jira/browse/COMMONSRDF-15
> Project: Apache Commons RDF
> Issue Type: Improvement
> Reporter: Stian Soiland-Reyes (old)
> Priority: Minor
>
> What happens if I add a 'foreign' `BlankNode` to a Graph (either directly
> with `Graph.add(s,t,o)` or within a foreign `Triple` to `Graph.add()` -- will
> I be able to match using that original blank node object "later" in other
> calls like `.contains()` and `.getTriples()`?
> This is of course straight-forward for IRI and Literal, but trickier for
> BlankNode.
> e.g. pseudocode:
> {code}
> impl1 = new Impl1TermFactory();
> b1 = impl1.createBlankNode();
> knows = impl1.createIRI("http://xmlns.com/foaf/0.1/knows");
> alice = impl1.createIRI("http://example.com/alice");
> impl2 = new Impl2TermFactory();
> g2 = impl2.createGraph();
> g2.add(b1, knows, alice);
> assertTrue(g2.contains(b1, knows, alice));
> {code}
> As discussed under COMMONSRDF-8 and pull request 7
> https://github.com/apache/incubator-commonsrdf/pull/7
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)