Hi all, when mapping data from RDF4J to the Stardog model implementation and vice versa, the methods used to convert Values seem to be modifying bNodes IDs. E.g.:
if (theValue instanceof com.stardog.stark.BNode) {
return SimpleValueFactory.getInstance().createBNode(theValue.toString());
}
If my initial value was a bNode with the ID _:b0
a new bNode with the ID _:_:b0
is created.
I encountered this behaviour in both the toSesameValue()
and toRDF4jValue()
methods.
I think a solution to this could be casting the value to a BNode to obtain its ID and then using that value to create the new instance. E.g.:
if ( theValue instanceof com.stardog.stark.BNode ) {
return SimpleValueFactory.getInstance().createBNode( ( (BNodeImpl) theValue ).id() );
}
I'm currently working with Stardog v6.1.2