@Override public BigdataBNode createBNode(String id) { return valueFactory.createBNode(id); }
@Override public BigdataBNode createBNode(BigdataStatement stmt) { return valueFactory.createBNode(stmt); }
@Override public BigdataBNode createBNode(String id) { return valueFactory.createBNode(id); }
@Override public BigdataBNode createBNode(BigdataStatement stmt) { return valueFactory.createBNode(stmt); }
public BigdataBNode createBNode() { return valueFactory.createBNode(nextID()); }
public BigdataBNode createBNode() { return valueFactory.createBNode(nextID()); }
/** * Scope the bnode ID to the solution. The same ID in each solution is * mapped to the same bnode. The same ID in a new solution is mapped to a * new BNode. */ private BigdataBNode getBNode(final String id, final Map<String, BigdataBNode> bnodes) { final BigdataBNode tmp = bnodes.get(id); if (tmp != null) { // We've already seen this ID for this solution. return tmp; } /* * This is the first time we have seen this ID for this solution. We * create a new blank node with an identifier which will be unique * across the solutions. */ // new bnode, which will be scoped by the bnodes map (that is, to // the solution for CONSTRUCT and to the graph for DESCRIBE). final BigdataBNode bnode = f.createBNode("b" + Integer.valueOf(bnodeIdFactory++).toString()); // put into the per-solution cache. bnodes.put(id, bnode); return bnode; }
/** * Scope the bnode ID to the solution. The same ID in each solution is * mapped to the same bnode. The same ID in a new solution is mapped to a * new BNode. */ private BigdataBNode getBNode(final String id, final Map<String, BigdataBNode> bnodes) { final BigdataBNode tmp = bnodes.get(id); if (tmp != null) { // We've already seen this ID for this solution. return tmp; } /* * This is the first time we have seen this ID for this solution. We * create a new blank node with an identifier which will be unique * across the solutions. */ // new bnode, which will be scoped by the bnodes map (that is, to // the solution for CONSTRUCT and to the graph for DESCRIBE). final BigdataBNode bnode = f.createBNode("b" + Integer.valueOf(bnodeIdFactory++).toString()); // put into the per-solution cache. bnodes.put(id, bnode); return bnode; }
final BigdataBNode id = m_valueFactory.createBNode(stmt.toString());
public IV get(final IBindingSet bs) throws SparqlTypeErrorException { if (arity() == 0) { return super.asIV(getValueFactory().createBNode(), bs); } final Literal lit = getAndCheckLiteralValue(0, bs); final URI dt = lit.getDatatype(); if (dt != null && !dt.stringValue().equals(XSD.STRING.stringValue())) throw new SparqlTypeErrorException(); final BigdataBNode bnode = getValueFactory().createBNode( "-bnode-func-" + lit.getLabel()); return super.asIV(bnode, bs); }
final BigdataBNode id = m_valueFactory.createBNode(stmt.toString());
public IV get(final IBindingSet bs) throws SparqlTypeErrorException { if (arity() == 0) { return super.asIV(getValueFactory().createBNode(), bs); } final Literal lit = getAndCheckLiteralValue(0, bs); final URI dt = lit.getDatatype(); if (dt != null && !dt.stringValue().equals(XSD.STRING.stringValue())) throw new SparqlTypeErrorException(); final BigdataBNode bnode = getValueFactory().createBNode( "-bnode-func-" + lit.getLabel()); return super.asIV(bnode, bs); }
/** * Convert the {@link TermNode} to a {@link BigdataValue}. IFF the * {@link TermNode} is an anonymous variable, then it is converted into a * blank node whose ID is the name of that anonymous variable. This is used * to turn anonymous variables back into blank nodes for INSERT DATA (DELETE * DATA does not allow blank nodes). * * @param t * The {@link TermNode}. * * @return The {@link BigdataValue}. * * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/573"> * NullPointerException when attempting to INSERT DATA containing a * blank node </a> */ private BigdataValue toValue(final TermNode t) { if (t.isVariable() && ((VarNode) t).isAnonymous()) { final BigdataBNode s = context.valueFactory.createBNode(t .getValueExpression().getName()); return s; } return t.getValue(); }
/** * Convert the {@link TermNode} to a {@link BigdataValue}. IFF the * {@link TermNode} is an anonymous variable, then it is converted into a * blank node whose ID is the name of that anonymous variable. This is used * to turn anonymous variables back into blank nodes for INSERT DATA (DELETE * DATA does not allow blank nodes). * * @param t * The {@link TermNode}. * * @return The {@link BigdataValue}. * * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/573"> * NullPointerException when attempting to INSERT DATA containing a * blank node </a> */ private BigdataValue toValue(final TermNode t) { if (t.isVariable() && ((VarNode) t).isAnonymous()) { final BigdataBNode s = context.valueFactory.createBNode(t .getValueExpression().getName()); return s; } return t.getValue(); }
final BigdataBNode bnode = valueFactory.createBNode("-anon-1");
/** * Returns the bnode representation of this IV, useful for serialization * formats such as RDF/XML. See {@link #bnodeId()}. */ @SuppressWarnings("unchecked") @Override public V asValue(final LexiconRelation lex) { if (bnode == null) { bnode = (V) lex.getValueFactory().createBNode(getID()); bnode.setIV(this); bnode.setStatementIdentifier(true); final BigdataResource c = spo.c() != null ? (BigdataResource) spo.c().asValue(lex) : null; bnode.setStatement(lex.getValueFactory().createStatement( (BigdataResource) spo.s().asValue(lex), (BigdataURI) spo.p().asValue(lex), (BigdataValue) spo.o().asValue(lex), c)); } return bnode; }
/** * Returns the bnode representation of this IV, useful for serialization * formats such as RDF/XML. See {@link #bnodeId()}. */ @SuppressWarnings("unchecked") @Override public V asValue(final LexiconRelation lex) { if (bnode == null) { bnode = (V) lex.getValueFactory().createBNode(getID()); bnode.setIV(this); bnode.setStatementIdentifier(true); final BigdataResource c = spo.c() != null ? (BigdataResource) spo.c().asValue(lex) : null; bnode.setStatement(lex.getValueFactory().createStatement( (BigdataResource) spo.s().asValue(lex), (BigdataURI) spo.p().asValue(lex), (BigdataValue) spo.o().asValue(lex), c)); } return bnode; }
final BigdataStatement stmt = vf.createStatement(s, p, o); final BigdataStatement stmt2 = vf.createStatement(s, p, bar); final BigdataBNode sid = vf.createBNode(stmt); final BigdataBNode sid2 = vf.createBNode(stmt2);
final Literal o = vf.createLiteral("foo"); final BigdataStatement stmt = vf.createStatement(s, p, o); final BigdataBNode sid = vf.createBNode(stmt);
final Literal o = vf.createLiteral("foo"); final BigdataStatement stmt = vf.createStatement(s, p, o); final BigdataBNode sid = vf.createBNode(stmt);