/** * Get a character string that uniquely identifies this node. * Note: a.isSameNode(b) if and only if generateId(a)==generateId(b) * * @param buffer a buffer to contain a string that uniquely identifies this node, across all * documents */ public void generateId(FastStringBuffer buffer) { Navigator.appendSequentialKey(this, buffer, true); }
/** * Get a character string that uniquely identifies this node. * Note: a.isSameNode(b) if and only if generateId(a)==generateId(b) * * @param buffer a buffer to contain a string that uniquely identifies this node, across all * documents */ public void generateId(FastStringBuffer buffer) { Navigator.appendSequentialKey(this, buffer, true); }
/** * Get a character string that uniquely identifies this node. Note: * a.isSameNode(b) if and only if generateId(a)==generateId(b) * * @param buffer a buffer to contain a string that uniquely identifies this node, across all documents */ public void generateId(FastStringBuffer buffer) { Navigator.appendSequentialKey(this, buffer, true); //buffer.append(Navigator.getSequentialKey(this)); }
/** * Get a character string that uniquely identifies this node. Note: * a.isSameNode(b) if and only if generateId(a)==generateId(b) * * @param buffer a buffer to contain a string that uniquely identifies this node, across all documents */ public void generateId(FastStringBuffer buffer) { Navigator.appendSequentialKey(this, buffer, true); //buffer.append(Navigator.getSequentialKey(this)); }
/** * Get a character string that uniquely identifies this node. Note: * a.isSameNode(b) if and only if generateId(a)==generateId(b) * * @param buffer a buffer to contain a string that uniquely identifies this node, across all documents */ public void generateId(FastStringBuffer buffer) { Navigator.appendSequentialKey(this, buffer, true); //buffer.append(Navigator.getSequentialKey(this)); }
/** * Get a character string that uniquely identifies this node and that collates nodes * into document order * * @param node the node whose unique identifier is reuqired * @param sb a buffer to which the unique identifier will be appended * @param addDocNr true if a unique document number is to be included in the information */ public static void appendSequentialKey(/*@NotNull*/ SiblingCountingNode node, /*@NotNull*/ FastStringBuffer sb, boolean addDocNr) { if (addDocNr) { sb.append('w'); sb.append(Long.toString(node.getTreeInfo().getDocumentNumber())); } if (node.getNodeKind() != Type.DOCUMENT) { NodeInfo parent = node.getParent(); if (parent != null) { appendSequentialKey((SiblingCountingNode) parent, sb, false); } if (node.getNodeKind() == Type.ATTRIBUTE) { sb.append('A'); } } sb.append(alphaKey(node.getSiblingPosition())); }
/** * Get a character string that uniquely identifies this node and that collates nodes * into document order * * @param node the node whose unique identifier is reuqired * @param sb a buffer to which the unique identifier will be appended * @param addDocNr true if a unique document number is to be included in the information */ public static void appendSequentialKey(/*@NotNull*/ SiblingCountingNode node, /*@NotNull*/ FastStringBuffer sb, boolean addDocNr) { if (addDocNr) { sb.append('w'); sb.append(Long.toString(node.getTreeInfo().getDocumentNumber())); } if (node.getNodeKind() != Type.DOCUMENT) { NodeInfo parent = node.getParent(); if (parent != null) { appendSequentialKey((SiblingCountingNode) parent, sb, false); } if (node.getNodeKind() == Type.ATTRIBUTE) { sb.append('A'); } } sb.append(alphaKey(node.getSiblingPosition())); }