/** * Returns a new blank node with a globally unique blank node ID based on a * {@link UUID}. * <p> * Note: Since the blank node IDs are random, they tend to be uniformly * distributed across the index partition(s). More efficient ordered writes * may be realized using {@link #newBNodeContext()} to obtain a derived * {@link BigdataValueFactory} instance that is specific to a document that * is being loaded into the RDF DB. * * @see #newBNodeContext() */ @Override public BigdataBNodeImpl createBNode() { return createBNode(nextID()); }
/** * Returns a new blank node with a globally unique blank node ID based on a * {@link UUID}. * <p> * Note: Since the blank node IDs are random, they tend to be uniformly * distributed across the index partition(s). More efficient ordered writes * may be realized using {@link #newBNodeContext()} to obtain a derived * {@link BigdataValueFactory} instance that is specific to a document that * is being loaded into the RDF DB. * * @see #newBNodeContext() */ @Override public BigdataBNodeImpl createBNode() { return createBNode(nextID()); }
@Override public BigdataBNodeImpl createBNode(final BigdataStatement stmt) { // Subject, predicate, object and context should be processed to use the target value factory // See https://jira.blazegraph.com/browse/BLZG-1875 final BigdataResource originalS = stmt.getSubject(); final BigdataURI originalP = stmt.getPredicate(); final BigdataValue originalO = stmt.getObject(); final BigdataResource originalC = stmt.getContext(); final BigdataResource s = asValue(originalS); final BigdataURI p = asValue(originalP); final BigdataValue o = asValue(originalO); final BigdataResource c = asValue(originalC); final BigdataStatement effectiveStmt; if (originalS != s || originalP != p || originalO != o || originalC != c) { effectiveStmt = new BigdataStatementImpl(s, p, o, c, stmt.getStatementType(), stmt.getUserFlag()); } else { effectiveStmt = stmt; } return new BigdataBNodeImpl(this, nextID(), effectiveStmt); }
@Override public BigdataBNodeImpl createBNode(final BigdataStatement stmt) { // Subject, predicate, object and context should be processed to use the target value factory // See https://jira.blazegraph.com/browse/BLZG-1875 final BigdataResource originalS = stmt.getSubject(); final BigdataURI originalP = stmt.getPredicate(); final BigdataValue originalO = stmt.getObject(); final BigdataResource originalC = stmt.getContext(); final BigdataResource s = asValue(originalS); final BigdataURI p = asValue(originalP); final BigdataValue o = asValue(originalO); final BigdataResource c = asValue(originalC); final BigdataStatement effectiveStmt; if (originalS != s || originalP != p || originalO != o || originalC != c) { effectiveStmt = new BigdataStatementImpl(s, p, o, c, stmt.getStatementType(), stmt.getUserFlag()); } else { effectiveStmt = stmt; } return new BigdataBNodeImpl(this, nextID(), effectiveStmt); }