/** * Return the cache key for the BNode passed as argument. * * @param node a Sesame BNode for which to create a cache key * @return a string that can be used as cache key */ public static String createCacheKey(BNode node) { return node.getID(); }
protected void writeBNode(BNode bNode) throws IOException { writer.write("_:"); writer.write(bNode.getID()); }
protected void writeBNode(BNode bNode) throws IOException { writer.write("_:"); writer.write(bNode.getID()); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof BNode) { BNode otherNode = (BNode)o; return this.getID().equals(otherNode.getID()); } return false; }
private void writeBNode(BNode bnode) throws IOException { out.writeByte(BNODE_VALUE); writeString(bnode.getID()); }
public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof BNode) { BNode otherNode = (BNode)o; return this.getID().equals(otherNode.getID()); } return false; }
@Override public BID getBID(BNode bnode) { BID bid = bidCache.get(bnode); if (bid == null) { bid = new BID(bnode.getID()); bidCache.put(bnode, bid); bnodeCache.put(bid, bnode); } return bid; }
@Override public BID getBID(BNode bnode) { BID bid = bidCache.get(bnode); if (bid == null) { bid = new BID(bnode.getID()); bidCache.put(bnode, bid); bnodeCache.put(bid, bnode); } return bid; }
@Override public BID getBID(BNode bnode) { BID bid = bidCache.get(bnode); if (bid == null) { bid = new BID(bnode.getID()); bidCache.put(bnode, bid); bnodeCache.put(bid, bnode); } return bid; }
private void _writeBNode(BNode bNode) throws IOException { _xmlWriter.textElement("bNode", bNode.getID()); }
private byte[] _bnode2data(BNode bNode, boolean dirtyReads, boolean create) throws IOException { byte[] idData = bNode.getID().getBytes("UTF-8"); byte[] bNodeData = new byte[1 + idData.length]; bNodeData[0] = BNODE_VALUE; ByteArrayUtil.put(idData, bNodeData, 1); return bNodeData; }
private void emitBNode(final BNode bnode) throws IOException { this.writer.append("\"_:"); emitString(bnode.getID()); this.writer.append('\"'); }
/** * Implements {@link BNode#getID()}. */ public String getID() { if (!isBNode()) throw new ClassCastException(); return ((BNode) getValue()).getID(); }
/** * Implements {@link BNode#getID()}. */ public String getID() { if (!isBNode()) throw new ClassCastException(); return ((BNode) getValue()).getID(); }
public static RyaURI convertResource(Resource subject) { if(subject == null) return null; if (subject instanceof BNode) { return new RyaURI(RyaSchema.BNODE_NAMESPACE + ((BNode) subject).getID()); } return convertURI((URI) subject); }
private void _writeBNode(BNode bNode) throws IOException { _xmlWriter.setAttribute("rdf:nodeID", bNode.getID()); _xmlWriter.emptyElement("rs:value"); }
protected void serialize(BNode bnode, XMLWriter xmlWriter) throws IOException { if (bnode != null) { xmlWriter.textElement(TransactionXMLConstants.BNODE_TAG, bnode.getID()); } else { serializeNull(xmlWriter); } }
public void handleBlankNode(int indent, URI pred, BNode node) throws IOException { String span = tagName(pred, "span"); writer.indent(indent); writer.openStartTag(XHTML, span); writer.curie(XHTML, "rel", VOCAB, pred); writer.attribute(XHTML, "resource", "[_:" + node.getID() + "]"); writer.closeStartTag(); writer.data(node.toString()); writer.endTag(XHTML, span); }
public void startBlankNode(int indent, BNode bnode, Set<URI> types) throws IOException { writer.indent(indent); writer.openStartTag(XHTML, tagName(types, "div")); writer.attribute(XHTML, "about", "[_:" + bnode.getID() + "]"); writer.curie(XHTML, "typeof", VOCAB, types); writer.closeStartTag(); writer.newLine(); }