/** * Get the simple type ID for the given node identity. * * @param identity The node identity. * * @return The simple type ID, or DTM.NULL. */ protected short _type(int identity) { int info = _exptype(identity); if (NULL != info) return m_expandedNameTable.getType(info); else return NULL; }
/** * Given a node handle, return an ID that represents the node's expanded name. * * @param nodeHandle The handle to the node in question. * * @return the expanded-name id of the node. */ public int getExpandedTypeID(int nodeHandle) { // %REVIEW% This _should_ only be null if someone asked the wrong DTM about the node... // which one would hope would never happen... int id=makeNodeIdentity(nodeHandle); if(id==NULL) return NULL; return _exptype(id); }
/** * Get the simple type ID for the given node identity. * * @param identity The node identity. * * @return The simple type ID, or DTM.NULL. */ protected short _type(int identity) { int info = _exptype(identity); if (NULL != info) return m_expandedNameTable.getType(info); else return NULL; }
/** * Given a node handle, return an ID that represents the node's expanded name. * * @param nodeHandle The handle to the node in question. * * @return the expanded-name id of the node. */ public int getExpandedTypeID(int nodeHandle) { // %REVIEW% This _should_ only be null if someone asked the wrong DTM about the node... // which one would hope would never happen... int id=makeNodeIdentity(nodeHandle); if(id==NULL) return NULL; return _exptype(id); }
/** * Returns the namespace type of a specific node * @param nodeHandle the id of the node. * @return the ID of the namespace. */ public int getNamespaceType(final int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); int expandedNameID = _exptype(identity); return m_expandedNameTable.getNamespaceID(expandedNameID); }
/** * Returns the namespace type of a specific node * @param nodeHandle the id of the node. * @return the ID of the namespace. */ public int getNamespaceType(final int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); int expandedNameID = _exptype(identity); return m_expandedNameTable.getNamespaceID(expandedNameID); }
/** * Given a node handle, return its DOM-style node type. * <p> * %REVIEW% Generally, returning short is false economy. Return int? * %REVIEW% Make assumption that node has already arrived. Is OK? * * @param nodeHandle The node id. * @return int Node type, as per the DOM's Node._NODE constants. */ public short getNodeType(int nodeHandle) { if (nodeHandle == DTM.NULL) return DTM.NULL; return m_expandedNameTable.getType(_exptype(makeNodeIdentity(nodeHandle))); }
/** * Given a node handle, return its DOM-style node type. * <p> * %REVIEW% Generally, returning short is false economy. Return int? * %REVIEW% Make assumption that node has already arrived. Is OK? * * @param nodeHandle The node id. * @return int Node type, as per the DOM's Node._NODE constants. */ public short getNodeType(int nodeHandle) { if (nodeHandle == DTM.NULL) return DTM.NULL; return m_expandedNameTable.getType(_exptype(makeNodeIdentity(nodeHandle))); }
ps.println("Prefix: " + getPrefix(i)); int exTypeID = _exptype(index);
/** * Given a node handle, advance to its next sibling. * If not yet resolved, waits for more nodes to be added to the document and * tries again. * @param nodeHandle int Handle of the node. * @return int Node-number of next sibling, * or DTM.NULL to indicate none exists. */ public int getTypedNextSibling(int nodeHandle, int nodeType) { if (nodeHandle == DTM.NULL) return DTM.NULL; int node = makeNodeIdentity(nodeHandle); int eType; while ((node = _nextsib(node)) != DTM.NULL && ((eType = _exptype(node)) != nodeType && m_expandedNameTable.getType(eType)!= nodeType)); //_type(node) != nodeType)); return (node == DTM.NULL ? DTM.NULL : makeNodeHandle(node)); }
ps.println("Prefix: " + getPrefix(i)); int exTypeID = _exptype(index);
/** * Given a node handle, advance to its next sibling. * If not yet resolved, waits for more nodes to be added to the document and * tries again. * @param nodeHandle int Handle of the node. * @return int Node-number of next sibling, * or DTM.NULL to indicate none exists. */ public int getTypedNextSibling(int nodeHandle, int nodeType) { if (nodeHandle == DTM.NULL) return DTM.NULL; int node = makeNodeIdentity(nodeHandle); int eType; while ((node = _nextsib(node)) != DTM.NULL && ((eType = _exptype(node)) != nodeType && m_expandedNameTable.getType(eType)!= nodeType)); //_type(node) != nodeType)); return (node == DTM.NULL ? DTM.NULL : makeNodeHandle(node)); }
/** * Given a node handle and an expanded type ID, get the index of the node's * attribute of that type, if any. * * @param nodeHandle int Handle of the node. * @param attType int expanded type ID of the required attribute. * @return Handle of attribute of the required type, or DTM.NULL to indicate * none exists. */ protected int getTypedAttribute(int nodeHandle, int attType) { int type = getNodeType(nodeHandle); if (DTM.ELEMENT_NODE == type) { int identity = makeNodeIdentity(nodeHandle); while (DTM.NULL != (identity = getNextNodeIdentity(identity))) { type = _type(identity); if (type == DTM.ATTRIBUTE_NODE) { if (_exptype(identity) == attType) return makeNodeHandle(identity); } else if (DTM.NAMESPACE_NODE != type) { break; } } } return DTM.NULL; }
/** * Given a node handle and an expanded type ID, get the index of the node's * attribute of that type, if any. * * @param nodeHandle int Handle of the node. * @param attType int expanded type ID of the required attribute. * @return Handle of attribute of the required type, or DTM.NULL to indicate * none exists. */ protected int getTypedAttribute(int nodeHandle, int attType) { int type = getNodeType(nodeHandle); if (DTM.ELEMENT_NODE == type) { int identity = makeNodeIdentity(nodeHandle); while (DTM.NULL != (identity = getNextNodeIdentity(identity))) { type = _type(identity); if (type == DTM.ATTRIBUTE_NODE) { if (_exptype(identity) == attType) return makeNodeHandle(identity); } else if (DTM.NAMESPACE_NODE != type) { break; } } } return DTM.NULL; }
int newEType=_exptype(namespaceNodeIndex);
int newEType=_exptype(namespaceNodeIndex);
/** * Returns the namespace type of a specific node * @param nodeHandle the id of the node. * @return the ID of the namespace. */ public int getNamespaceType(final int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); int expandedNameID = _exptype(identity); return m_expandedNameTable.getNamespaceID(expandedNameID); }
/** * Returns the namespace type of a specific node * @param nodeHandle the id of the node. * @return the ID of the namespace. */ public int getNamespaceType(final int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); int expandedNameID = _exptype(identity); return m_expandedNameTable.getNamespaceID(expandedNameID); }