code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 844
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
_currentNode = getFirstNamespaceNode(node, true);
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| NamespaceIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node = _currentNode;
if (DTM.NULL != node)
_currentNode = getNextNamespaceNode(_startNode, node, true);
return returnNode(node);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| NamespaceIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedNamespaceIterator(int nodeType)
{
super();
_nodeType = nodeType;
} |
Constructor TypedNamespaceIterator
@param nodeType The extended type ID being requested.
| TypedNamespaceIterator::TypedNamespaceIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node;
for (node = _currentNode;
node != END;
node = getNextNamespaceNode(_startNode, node, true)) {
if (getExpandedTypeID(node) == _nodeType
|| getNodeType(node) == _nodeType
|| getNamespaceType(node) == _nodeType) {
_currentNode = node;
return returnNode(node);
}
}
return (_currentNode =END);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedNamespaceIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public RootIterator()
{
super();
} |
Constructor RootIterator
| RootIterator::RootIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
if (_isRestartable)
{
_startNode = getDocumentRoot(node);
_currentNode = NULL;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| RootIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
if(_startNode == _currentNode)
return NULL;
_currentNode = _startNode;
return returnNode(_startNode);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| RootIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedRootIterator(int nodeType)
{
super();
_nodeType = nodeType;
} |
Constructor TypedRootIterator
@param nodeType The extended type ID being requested.
| TypedRootIterator::TypedRootIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
if(_startNode == _currentNode)
return NULL;
int nodeType = _nodeType;
int node = _startNode;
int expType = getExpandedTypeID(node);
_currentNode = node;
if (nodeType >= DTM.NTYPES) {
if (nodeType == expType) {
return returnNode(node);
}
} else {
if (expType < DTM.NTYPES) {
if (expType == nodeType) {
return returnNode(node);
}
} else {
if (m_expandedNameTable.getType(expType) == nodeType) {
return returnNode(node);
}
}
}
return END;
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedRootIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public NamespaceAttributeIterator(int nsType)
{
super();
_nsType = nsType;
} |
Constructor NamespaceAttributeIterator
@param nsType The extended type ID being requested.
| NamespaceAttributeIterator::NamespaceAttributeIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
_currentNode = getFirstNamespaceNode(node, false);
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| NamespaceAttributeIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node = _currentNode;
if (DTM.NULL != node)
_currentNode = getNextNamespaceNode(_startNode, node, false);
return returnNode(node);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| NamespaceAttributeIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
_currentNode = makeNodeIdentity(node);
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| FollowingSiblingIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
_currentNode = (_currentNode == DTM.NULL) ? DTM.NULL
: _nextsib(_currentNode);
return returnNode(makeNodeHandle(_currentNode));
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| FollowingSiblingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedFollowingSiblingIterator(int type)
{
_nodeType = type;
} |
Constructor TypedFollowingSiblingIterator
@param type The extended type ID being requested.
| TypedFollowingSiblingIterator::TypedFollowingSiblingIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
if (_currentNode == DTM.NULL) {
return DTM.NULL;
}
int node = _currentNode;
int eType;
int nodeType = _nodeType;
if (nodeType >= DTM.NTYPES) {
do {
node = _nextsib(node);
} while (node != DTM.NULL && _exptype(node) != nodeType);
} else {
while ((node = _nextsib(node)) != DTM.NULL) {
eType = _exptype(node);
if (eType < DTM.NTYPES) {
if (eType == nodeType) {
break;
}
} else if (m_expandedNameTable.getType(eType) == nodeType) {
break;
}
}
}
_currentNode = node;
return (_currentNode == DTM.NULL)
? DTM.NULL
: returnNode(makeNodeHandle(_currentNode));
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedFollowingSiblingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
_currentNode = getFirstAttributeIdentity(makeNodeIdentity(node));
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| AttributeIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
final int node = _currentNode;
if (node != NULL) {
_currentNode = getNextAttributeIdentity(node);
return returnNode(makeNodeHandle(node));
}
return NULL;
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| AttributeIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedAttributeIterator(int nodeType)
{
_nodeType = nodeType;
} |
Constructor TypedAttributeIterator
@param nodeType The extended type ID that is requested.
| TypedAttributeIterator::TypedAttributeIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
if (_isRestartable)
{
_startNode = node;
_currentNode = getTypedAttribute(node, _nodeType);
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| TypedAttributeIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
final int node = _currentNode;
// singleton iterator, since there can only be one attribute of
// a given type.
_currentNode = NULL;
return returnNode(node);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedAttributeIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public boolean isReverse()
{
return true;
} |
True if this iterator has a reversed axis.
@return true.
| PrecedingSiblingIterator::isReverse | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
node = _startNodeID = makeNodeIdentity(node);
if(node == NULL)
{
_currentNode = node;
return resetPosition();
}
int type = m_expandedNameTable.getType(_exptype(node));
if(ExpandedNameTable.ATTRIBUTE == type
|| ExpandedNameTable.NAMESPACE == type )
{
_currentNode = node;
}
else
{
// Be careful to handle the Document node properly
_currentNode = _parent(node);
if(NULL!=_currentNode)
_currentNode = _firstch(_currentNode);
else
_currentNode = node;
}
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| PrecedingSiblingIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
if (_currentNode == _startNodeID || _currentNode == DTM.NULL)
{
return NULL;
}
else
{
final int node = _currentNode;
_currentNode = _nextsib(node);
return returnNode(makeNodeHandle(node));
}
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| PrecedingSiblingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedPrecedingSiblingIterator(int type)
{
_nodeType = type;
} |
Constructor TypedPrecedingSiblingIterator
@param type The extended type ID being requested.
| TypedPrecedingSiblingIterator::TypedPrecedingSiblingIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node = _currentNode;
int expType;
int nodeType = _nodeType;
int startID = _startNodeID;
if (nodeType >= DTM.NTYPES) {
while (node != NULL && node != startID && _exptype(node) != nodeType) {
node = _nextsib(node);
}
} else {
while (node != NULL && node != startID) {
expType = _exptype(node);
if (expType < DTM.NTYPES) {
if (expType == nodeType) {
break;
}
} else {
if (m_expandedNameTable.getType(expType) == nodeType) {
break;
}
}
node = _nextsib(node);
}
}
if (node == DTM.NULL || node == _startNodeID) {
_currentNode = NULL;
return NULL;
} else {
_currentNode = _nextsib(node);
return returnNode(makeNodeHandle(node));
}
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedPrecedingSiblingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public boolean isReverse()
{
return true;
} |
True if this iterator has a reversed axis.
@return true since this iterator is a reversed axis.
| PrecedingIterator::isReverse | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator cloneIterator()
{
_isRestartable = false;
try
{
final PrecedingIterator clone = (PrecedingIterator) super.clone();
final int[] stackCopy = new int[_stack.length];
System.arraycopy(_stack, 0, stackCopy, 0, _stack.length);
clone._stack = stackCopy;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_ITERATOR_CLONE_NOT_SUPPORTED, null)); //"Iterator clone not supported.");
}
} |
Returns a deep copy of this iterator. The cloned iterator is not reset.
@return a deep copy of this iterator.
| PrecedingIterator::cloneIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
node = makeNodeIdentity(node);
// iterator is not a clone
int parent, index;
if (_type(node) == DTM.ATTRIBUTE_NODE)
node = _parent(node);
_startNode = node;
_stack[index = 0] = node;
parent=node;
while ((parent = _parent(parent)) != NULL)
{
if (++index == _stack.length)
{
final int[] stack = new int[index + 4];
System.arraycopy(_stack, 0, stack, 0, index);
_stack = stack;
}
_stack[index] = parent;
}
if(index>0)
--index; // Pop actual root node (if not start) back off the stack
_currentNode=_stack[index]; // Last parent before root node
_oldsp = _sp = index;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| PrecedingIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
// Bugzilla 8324: We were forgetting to skip Attrs and NS nodes.
// Also recoded the loop controls for clarity and to flatten out
// the tail-recursion.
for(++_currentNode;
_sp>=0;
++_currentNode)
{
if(_currentNode < _stack[_sp])
{
if(_type(_currentNode) != ATTRIBUTE_NODE &&
_type(_currentNode) != NAMESPACE_NODE)
return returnNode(makeNodeHandle(_currentNode));
}
else
--_sp;
}
return NULL;
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| PrecedingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator reset()
{
_sp = _oldsp;
return resetPosition();
} |
Resets the iterator to the last start node.
@return A DTMAxisIterator, which may or may not be the same as this
iterator.
| PrecedingIterator::reset | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedPrecedingIterator(int type)
{
_nodeType = type;
} |
Constructor TypedPrecedingIterator
@param type The extended type ID being requested.
| TypedPrecedingIterator::TypedPrecedingIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node = _currentNode;
int nodeType = _nodeType;
if (nodeType >= DTM.NTYPES) {
while (true) {
node = node + 1;
if (_sp < 0) {
node = NULL;
break;
} else if (node >= _stack[_sp]) {
if (--_sp < 0) {
node = NULL;
break;
}
} else if (_exptype(node) == nodeType) {
break;
}
}
} else {
int expType;
while (true) {
node = node + 1;
if (_sp < 0) {
node = NULL;
break;
} else if (node >= _stack[_sp]) {
if (--_sp < 0) {
node = NULL;
break;
}
} else {
expType = _exptype(node);
if (expType < DTM.NTYPES) {
if (expType == nodeType) {
break;
}
} else {
if (m_expandedNameTable.getType(expType) == nodeType) {
break;
}
}
}
}
}
_currentNode = node;
return (node == NULL) ? NULL : returnNode(makeNodeHandle(node));
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedPrecedingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
_startNode = node;
// ?? -sb
// find rightmost descendant (or self)
// int current;
// while ((node = getLastChild(current = node)) != NULL){}
// _currentNode = current;
_currentNode = m_traverser.first(node);
// _currentNode precedes possible following(node) nodes
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| FollowingIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node = _currentNode;
_currentNode = m_traverser.next(_startNode, _currentNode);
return returnNode(node);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| FollowingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedFollowingIterator(int type)
{
_nodeType = type;
} |
Constructor TypedFollowingIterator
@param type The extended type ID being requested.
| TypedFollowingIterator::TypedFollowingIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node;
do{
node = _currentNode;
_currentNode = m_traverser.next(_startNode, _currentNode);
}
while (node != DTM.NULL
&& (getExpandedTypeID(node) != _nodeType && getNodeType(node) != _nodeType));
return (node == DTM.NULL ? DTM.NULL :returnNode(node));
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedFollowingIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int getStartNode()
{
return m_realStartNode;
} |
Get start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@return The root node of the iteration.
| AncestorIterator::getStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public final boolean isReverse()
{
return true;
} |
True if this iterator has a reversed axis.
@return true since this iterator is a reversed axis.
| AncestorIterator::isReverse | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator cloneIterator()
{
_isRestartable = false; // must set to false for any clone
try
{
final AncestorIterator clone = (AncestorIterator) super.clone();
clone._startNode = _startNode;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_ITERATOR_CLONE_NOT_SUPPORTED, null)); //"Iterator clone not supported.");
}
} |
Returns a deep copy of this iterator. The cloned iterator is not reset.
@return a deep copy of this iterator.
| AncestorIterator::cloneIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
m_realStartNode = node;
if (_isRestartable)
{
int nodeID = makeNodeIdentity(node);
if (!_includeSelf && node != DTM.NULL) {
nodeID = _parent(nodeID);
node = makeNodeHandle(nodeID);
}
_startNode = node;
while (nodeID != END) {
m_ancestors.addElement(node);
nodeID = _parent(nodeID);
node = makeNodeHandle(nodeID);
}
m_ancestorsPos = m_ancestors.size()-1;
_currentNode = (m_ancestorsPos>=0)
? m_ancestors.elementAt(m_ancestorsPos)
: DTM.NULL;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| AncestorIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator reset()
{
m_ancestorsPos = m_ancestors.size()-1;
_currentNode = (m_ancestorsPos>=0) ? m_ancestors.elementAt(m_ancestorsPos)
: DTM.NULL;
return resetPosition();
} |
Resets the iterator to the last start node.
@return A DTMAxisIterator, which may or may not be the same as this
iterator.
| AncestorIterator::reset | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int next = _currentNode;
int pos = --m_ancestorsPos;
_currentNode = (pos >= 0) ? m_ancestors.elementAt(m_ancestorsPos)
: DTM.NULL;
return returnNode(next);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| AncestorIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedAncestorIterator(int type)
{
_nodeType = type;
} |
Constructor TypedAncestorIterator
@param type The extended type ID being requested.
| TypedAncestorIterator::TypedAncestorIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
m_realStartNode = node;
if (_isRestartable)
{
int nodeID = makeNodeIdentity(node);
int nodeType = _nodeType;
if (!_includeSelf && node != DTM.NULL) {
nodeID = _parent(nodeID);
}
_startNode = node;
if (nodeType >= DTM.NTYPES) {
while (nodeID != END) {
int eType = _exptype(nodeID);
if (eType == nodeType) {
m_ancestors.addElement(makeNodeHandle(nodeID));
}
nodeID = _parent(nodeID);
}
} else {
while (nodeID != END) {
int eType = _exptype(nodeID);
if ((eType >= DTM.NTYPES
&& m_expandedNameTable.getType(eType) == nodeType)
|| (eType < DTM.NTYPES && eType == nodeType)) {
m_ancestors.addElement(makeNodeHandle(nodeID));
}
nodeID = _parent(nodeID);
}
}
m_ancestorsPos = m_ancestors.size()-1;
_currentNode = (m_ancestorsPos>=0)
? m_ancestors.elementAt(m_ancestorsPos)
: DTM.NULL;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| TypedAncestorIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isRestartable)
{
node = makeNodeIdentity(node);
_startNode = node;
if (_includeSelf)
node--;
_currentNode = node;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| DescendantIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
protected boolean isDescendant(int identity)
{
return (_parent(identity) >= _startNode) || (_startNode == identity);
} |
Tell if this node identity is a descendant. Assumes that
the node info for the element has already been obtained.
This one-sided test works only if the parent has been
previously tested and is known to be a descendent. It fails if
the parent is the _startNode's next sibling, or indeed any node
that follows _startNode in document order. That may suffice
for this iterator, but it's not really an isDescendent() test.
%REVIEW% rename?
@param identity The index number of the node in question.
@return true if the index is a descendant of _startNode.
| DescendantIterator::isDescendant | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
if (_startNode == NULL) {
return NULL;
}
if (_includeSelf && (_currentNode + 1) == _startNode)
return returnNode(makeNodeHandle(++_currentNode)); // | m_dtmIdent);
int node = _currentNode;
int type;
do {
node++;
type = _type(node);
if (NULL == type ||!isDescendant(node)) {
_currentNode = NULL;
return END;
}
} while(ATTRIBUTE_NODE == type || TEXT_NODE == type
|| NAMESPACE_NODE == type);
_currentNode = node;
return returnNode(makeNodeHandle(node)); // make handle.
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| DescendantIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator reset()
{
final boolean temp = _isRestartable;
_isRestartable = true;
setStartNode(makeNodeHandle(_startNode));
_isRestartable = temp;
return this;
} |
Reset.
| DescendantIterator::reset | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedDescendantIterator(int nodeType)
{
_nodeType = nodeType;
} |
Constructor TypedDescendantIterator
@param nodeType Extended type ID being requested.
| TypedDescendantIterator::TypedDescendantIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
int node;
int type;
if (_startNode == NULL) {
return NULL;
}
node = _currentNode;
do
{
node++;
type = _type(node);
if (NULL == type ||!isDescendant(node)) {
_currentNode = NULL;
return END;
}
}
while (type != _nodeType && _exptype(node) != _nodeType);
_currentNode = node;
return returnNode(makeNodeHandle(node));
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedDescendantIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public NthDescendantIterator(int pos)
{
_pos = pos;
} |
Constructor NthDescendantIterator
@param pos The nth position being requested.
| NthDescendantIterator::NthDescendantIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
// I'm not exactly clear yet what this is doing... -sb
int node;
while ((node = super.next()) != END)
{
node = makeNodeIdentity(node);
int parent = _parent(node);
int child = _firstch(parent);
int pos = 0;
do
{
int type = _type(child);
if (ELEMENT_NODE == type)
pos++;
}
while ((pos < _pos) && (child = _nextsib(child)) != END);
if (node == child)
return node;
}
return (END);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| NthDescendantIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public SingletonIterator()
{
this(Integer.MIN_VALUE, false);
} |
Constructor SingletonIterator
| SingletonIterator::SingletonIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public SingletonIterator(int node)
{
this(node, false);
} |
Constructor SingletonIterator
@param node The node handle to return.
| SingletonIterator::SingletonIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public SingletonIterator(int node, boolean constant)
{
_currentNode = _startNode = node;
_isConstant = constant;
} |
Constructor SingletonIterator
@param node the node handle to return.
@param constant (Not sure what this is yet. -sb)
| SingletonIterator::SingletonIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator setStartNode(int node)
{
//%HZ%: Added reference to DTMDefaultBase.ROOTNODE back in, temporarily
if (node == DTMDefaultBase.ROOTNODE)
node = getDocument();
if (_isConstant)
{
_currentNode = _startNode;
return resetPosition();
}
else if (_isRestartable)
{
_currentNode = _startNode = node;
return resetPosition();
}
return this;
} |
Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
@param node Sets the root of the iteration.
@return A DTMAxisIterator set to the start of the iteration.
| SingletonIterator::setStartNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public DTMAxisIterator reset()
{
if (_isConstant)
{
_currentNode = _startNode;
return resetPosition();
}
else
{
final boolean temp = _isRestartable;
_isRestartable = true;
setStartNode(_startNode);
_isRestartable = temp;
}
return this;
} |
Resets the iterator to the last start node.
@return A DTMAxisIterator, which may or may not be the same as this
iterator.
| SingletonIterator::reset | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
final int result = _currentNode;
_currentNode = END;
return returnNode(result);
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| SingletonIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public TypedSingletonIterator(int nodeType)
{
_nodeType = nodeType;
} |
Constructor TypedSingletonIterator
@param nodeType The extended type ID being requested.
| TypedSingletonIterator::TypedSingletonIterator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public int next()
{
//final int result = super.next();
final int result = _currentNode;
int nodeType = _nodeType;
_currentNode = END;
if (nodeType >= DTM.NTYPES) {
if (getExpandedTypeID(result) == nodeType) {
return returnNode(result);
}
} else {
if (getNodeType(result) == nodeType) {
return returnNode(result);
}
}
return NULL;
} |
Get the next node in the iteration.
@return The next node handle in the iteration, or END.
| TypedSingletonIterator::next | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java | Apache-2.0 |
public ExtendedType (int nodetype, String namespace, String localName)
{
this.nodetype = nodetype;
this.namespace = namespace;
this.localName = localName;
this.hash = nodetype + namespace.hashCode() + localName.hashCode();
} |
Create an ExtendedType object from node type, namespace and local name.
The hash code is calculated from the node type, namespace and local name.
@param nodetype Type of the node
@param namespace Namespace of the node
@param localName Local name of the node
| ExtendedType::ExtendedType | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public ExtendedType (int nodetype, String namespace, String localName, int hash)
{
this.nodetype = nodetype;
this.namespace = namespace;
this.localName = localName;
this.hash = hash;
} |
Create an ExtendedType object from node type, namespace, local name
and a given hash code.
@param nodetype Type of the node
@param namespace Namespace of the node
@param localName Local name of the node
@param hash The given hash code
| ExtendedType::ExtendedType | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
protected void redefine(int nodetype, String namespace, String localName)
{
this.nodetype = nodetype;
this.namespace = namespace;
this.localName = localName;
this.hash = nodetype + namespace.hashCode() + localName.hashCode();
} |
Redefine this ExtendedType object to represent a different extended type.
This is intended to be used ONLY on the hashET object. Using it elsewhere
will mess up existing hashtable entries!
| ExtendedType::redefine | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
protected void redefine(int nodetype, String namespace, String localName, int hash)
{
this.nodetype = nodetype;
this.namespace = namespace;
this.localName = localName;
this.hash = hash;
} |
Redefine this ExtendedType object to represent a different extended type.
This is intended to be used ONLY on the hashET object. Using it elsewhere
will mess up existing hashtable entries!
| ExtendedType::redefine | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public int hashCode()
{
return hash;
} |
Override the hashCode() method in the Object class
| ExtendedType::hashCode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public boolean equals(ExtendedType other)
{
try
{
return other.nodetype == this.nodetype &&
other.localName.equals(this.localName) &&
other.namespace.equals(this.namespace);
}
catch(NullPointerException e)
{
return false;
}
} |
Test if this ExtendedType object is equal to the given ExtendedType.
@param other The other ExtendedType object to test for equality
@return true if the two ExtendedType objects are equal.
| ExtendedType::equals | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public int getNodeType()
{
return nodetype;
} |
Return the node type
| ExtendedType::getNodeType | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public String getLocalName()
{
return localName;
} |
Return the local name
| ExtendedType::getLocalName | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public String getNamespace()
{
return namespace;
} |
Return the namespace
| ExtendedType::getNamespace | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java | Apache-2.0 |
public DTMDefaultBase(DTMManager mgr, Source source, int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory, boolean doIndexing)
{
this(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
doIndexing, DEFAULT_BLOCKSIZE, true, false);
} |
Construct a DTMDefaultBase object using the default block size.
@param mgr The DTMManager who owns this DTM.
@param source The object that is used to specify the construction source.
@param dtmIdentity The DTM identity ID for this DTM.
@param whiteSpaceFilter The white space filter for this DTM, which may
be null.
@param xstringfactory The factory to use for creating XMLStrings.
@param doIndexing true if the caller considers it worth it to use
indexing schemes.
| DTMDefaultBase::DTMDefaultBase | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public DTMDefaultBase(DTMManager mgr, Source source, int dtmIdentity,
DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory, boolean doIndexing,
int blocksize, boolean usePrevsib,
boolean newNameTable)
{
// Use smaller sizes for the internal node arrays if the block size
// is small.
int numblocks;
if (blocksize <= 64)
{
numblocks = DEFAULT_NUMBLOCKS_SMALL;
m_dtmIdent= new SuballocatedIntVector(4, 1);
}
else
{
numblocks = DEFAULT_NUMBLOCKS;
m_dtmIdent= new SuballocatedIntVector(32);
}
m_exptype = new SuballocatedIntVector(blocksize, numblocks);
m_firstch = new SuballocatedIntVector(blocksize, numblocks);
m_nextsib = new SuballocatedIntVector(blocksize, numblocks);
m_parent = new SuballocatedIntVector(blocksize, numblocks);
// Only create the m_prevsib array if the usePrevsib flag is true.
// Some DTM implementations (e.g. SAXImpl) do not need this array.
// We can save the time to build it in those cases.
if (usePrevsib)
m_prevsib = new SuballocatedIntVector(blocksize, numblocks);
m_mgr = mgr;
if(mgr instanceof DTMManagerDefault)
m_mgrDefault=(DTMManagerDefault)mgr;
m_documentBaseURI = (null != source) ? source.getSystemId() : null;
m_dtmIdent.setElementAt(dtmIdentity,0);
m_wsfilter = whiteSpaceFilter;
m_xstrf = xstringfactory;
m_indexing = doIndexing;
if (doIndexing)
{
m_expandedNameTable = new ExpandedNameTable();
}
else
{
// Note that this fails if we aren't talking to an instance of
// DTMManagerDefault
m_expandedNameTable = m_mgrDefault.getExpandedNameTable(this);
}
if (null != whiteSpaceFilter)
{
m_shouldStripWhitespaceStack = new BoolStack();
pushShouldStripWhitespace(false);
}
} |
Construct a DTMDefaultBase object from a DOM node.
@param mgr The DTMManager who owns this DTM.
@param source The object that is used to specify the construction source.
@param dtmIdentity The DTM identity ID for this DTM.
@param whiteSpaceFilter The white space filter for this DTM, which may
be null.
@param xstringfactory The factory to use for creating XMLStrings.
@param doIndexing true if the caller considers it worth it to use
indexing schemes.
@param blocksize The block size of the DTM.
@param usePrevsib true if we want to build the previous sibling node array.
@param newNameTable true if we want to use a new ExpandedNameTable for this DTM.
| DTMDefaultBase::DTMDefaultBase | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected void ensureSizeOfIndex(int namespaceID, int LocalNameID)
{
if (null == m_elemIndexes)
{
m_elemIndexes = new int[namespaceID + 20][][];
}
else if (m_elemIndexes.length <= namespaceID)
{
int[][][] indexes = m_elemIndexes;
m_elemIndexes = new int[namespaceID + 20][][];
System.arraycopy(indexes, 0, m_elemIndexes, 0, indexes.length);
}
int[][] localNameIndex = m_elemIndexes[namespaceID];
if (null == localNameIndex)
{
localNameIndex = new int[LocalNameID + 100][];
m_elemIndexes[namespaceID] = localNameIndex;
}
else if (localNameIndex.length <= LocalNameID)
{
int[][] indexes = localNameIndex;
localNameIndex = new int[LocalNameID + 100][];
System.arraycopy(indexes, 0, localNameIndex, 0, indexes.length);
m_elemIndexes[namespaceID] = localNameIndex;
}
int[] elemHandles = localNameIndex[LocalNameID];
if (null == elemHandles)
{
elemHandles = new int[128];
localNameIndex[LocalNameID] = elemHandles;
elemHandles[0] = 1;
}
else if (elemHandles.length <= elemHandles[0] + 1)
{
int[] indexes = elemHandles;
elemHandles = new int[elemHandles[0] + 1024];
System.arraycopy(indexes, 0, elemHandles, 0, indexes.length);
localNameIndex[LocalNameID] = elemHandles;
}
} |
Ensure that the size of the element indexes can hold the information.
@param namespaceID Namespace ID index.
@param LocalNameID Local name ID.
| DTMDefaultBase::ensureSizeOfIndex | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected void indexNode(int expandedTypeID, int identity)
{
ExpandedNameTable ent = m_expandedNameTable;
short type = ent.getType(expandedTypeID);
if (DTM.ELEMENT_NODE == type)
{
int namespaceID = ent.getNamespaceID(expandedTypeID);
int localNameID = ent.getLocalNameID(expandedTypeID);
ensureSizeOfIndex(namespaceID, localNameID);
int[] index = m_elemIndexes[namespaceID][localNameID];
index[index[0]] = identity;
index[0]++;
}
} |
Add a node to the element indexes. The node will not be added unless
it's an element.
@param expandedTypeID The expanded type ID of the node.
@param identity The node identity index.
| DTMDefaultBase::indexNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int findGTE(int[] list, int start, int len, int value)
{
int low = start;
int high = start + (len - 1);
int end = high;
while (low <= high)
{
int mid = (low + high) / 2;
int c = list[mid];
if (c > value)
high = mid - 1;
else if (c < value)
low = mid + 1;
else
return mid;
}
return (low <= end && list[low] > value) ? low : -1;
} |
Find the first index that occurs in the list that is greater than or
equal to the given value.
@param list A list of integers.
@param start The start index to begin the search.
@param len The number of items to search.
@param value Find the slot that has a value that is greater than or
identical to this argument.
@return The index in the list of the slot that is higher or identical
to the identity argument, or -1 if no node is higher or equal.
| DTMDefaultBase::findGTE | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
int findElementFromIndex(int nsIndex, int lnIndex, int firstPotential)
{
int[][][] indexes = m_elemIndexes;
if (null != indexes && nsIndex < indexes.length)
{
int[][] lnIndexs = indexes[nsIndex];
if (null != lnIndexs && lnIndex < lnIndexs.length)
{
int[] elems = lnIndexs[lnIndex];
if (null != elems)
{
int pos = findGTE(elems, 1, elems[0], firstPotential);
if (pos > -1)
{
return elems[pos];
}
}
}
}
return NOTPROCESSED;
} |
Find the first matching element from the index at or after the
given node.
@param nsIndex The namespace index lookup.
@param lnIndex The local name index lookup.
@param firstPotential The first potential match that is worth looking at.
@return The first node that is greater than or equal to the
firstPotential argument, or DTM.NOTPROCESSED if not found.
| DTMDefaultBase::findElementFromIndex | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected short _type(int identity)
{
int info = _exptype(identity);
if (NULL != info)
return m_expandedNameTable.getType(info);
else
return NULL;
} |
Get the simple type ID for the given node identity.
@param identity The node identity.
@return The simple type ID, or DTM.NULL.
| DTMDefaultBase::_type | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _exptype(int identity)
{
if (identity == DTM.NULL)
return NULL;
// Reorganized test and loop into single flow
// Tiny performance improvement, saves a few bytes of code, clearer.
// %OPT% Other internal getters could be treated simliarly
while (identity>=m_size)
{
if (!nextNode() && identity >= m_size)
return NULL;
}
return m_exptype.elementAt(identity);
} |
Get the expanded type ID for the given node identity.
@param identity The node identity.
@return The expanded type ID, or DTM.NULL.
| DTMDefaultBase::_exptype | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _level(int identity)
{
while (identity>=m_size)
{
boolean isMore = nextNode();
if (!isMore && identity >= m_size)
return NULL;
}
int i=0;
while(NULL != (identity=_parent(identity)))
++i;
return i;
} |
Get the level in the tree for the given node identity.
@param identity The node identity.
@return The tree level, or DTM.NULL.
| DTMDefaultBase::_level | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _firstch(int identity)
{
// Boiler-plate code for each of the _xxx functions, except for the array.
int info = (identity >= m_size) ? NOTPROCESSED : m_firstch.elementAt(identity);
// Check to see if the information requested has been processed, and,
// if not, advance the iterator until we the information has been
// processed.
while (info == NOTPROCESSED)
{
boolean isMore = nextNode();
if (identity >= m_size &&!isMore)
return NULL;
else
{
info = m_firstch.elementAt(identity);
if(info == NOTPROCESSED && !isMore)
return NULL;
}
}
return info;
} |
Get the first child for the given node identity.
@param identity The node identity.
@return The first child identity, or DTM.NULL.
| DTMDefaultBase::_firstch | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _nextsib(int identity)
{
// Boiler-plate code for each of the _xxx functions, except for the array.
int info = (identity >= m_size) ? NOTPROCESSED : m_nextsib.elementAt(identity);
// Check to see if the information requested has been processed, and,
// if not, advance the iterator until we the information has been
// processed.
while (info == NOTPROCESSED)
{
boolean isMore = nextNode();
if (identity >= m_size &&!isMore)
return NULL;
else
{
info = m_nextsib.elementAt(identity);
if(info == NOTPROCESSED && !isMore)
return NULL;
}
}
return info;
} |
Get the next sibling for the given node identity.
@param identity The node identity.
@return The next sibling identity, or DTM.NULL.
| DTMDefaultBase::_nextsib | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _prevsib(int identity)
{
if (identity < m_size)
return m_prevsib.elementAt(identity);
// Check to see if the information requested has been processed, and,
// if not, advance the iterator until we the information has been
// processed.
while (true)
{
boolean isMore = nextNode();
if (identity >= m_size && !isMore)
return NULL;
else if (identity < m_size)
return m_prevsib.elementAt(identity);
}
} |
Get the previous sibling for the given node identity.
@param identity The node identity.
@return The previous sibling identity, or DTM.NULL.
| DTMDefaultBase::_prevsib | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int _parent(int identity)
{
if (identity < m_size)
return m_parent.elementAt(identity);
// Check to see if the information requested has been processed, and,
// if not, advance the iterator until we the information has been
// processed.
while (true)
{
boolean isMore = nextNode();
if (identity >= m_size && !isMore)
return NULL;
else if (identity < m_size)
return m_parent.elementAt(identity);
}
} |
Get the parent for the given node identity.
@param identity The node identity.
@return The parent identity, or DTM.NULL.
| DTMDefaultBase::_parent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public void dumpDTM(OutputStream os)
{
try
{
if(os==null)
{
File f = new File("DTMDump"+((Object)this).hashCode()+".txt");
System.err.println("Dumping... "+f.getAbsolutePath());
os=new FileOutputStream(f);
}
PrintStream ps = new PrintStream(os);
while (nextNode()){}
int nRecords = m_size;
ps.println("Total nodes: " + nRecords);
for (int index = 0; index < nRecords; ++index)
{
int i=makeNodeHandle(index);
ps.println("=========== index=" + index + " handle=" + i + " ===========");
ps.println("NodeName: " + getNodeName(i));
ps.println("NodeNameX: " + getNodeNameX(i));
ps.println("LocalName: " + getLocalName(i));
ps.println("NamespaceURI: " + getNamespaceURI(i));
ps.println("Prefix: " + getPrefix(i));
int exTypeID = _exptype(index);
ps.println("Expanded Type ID: "
+ Integer.toHexString(exTypeID));
int type = _type(index);
String typestring;
switch (type)
{
case DTM.ATTRIBUTE_NODE :
typestring = "ATTRIBUTE_NODE";
break;
case DTM.CDATA_SECTION_NODE :
typestring = "CDATA_SECTION_NODE";
break;
case DTM.COMMENT_NODE :
typestring = "COMMENT_NODE";
break;
case DTM.DOCUMENT_FRAGMENT_NODE :
typestring = "DOCUMENT_FRAGMENT_NODE";
break;
case DTM.DOCUMENT_NODE :
typestring = "DOCUMENT_NODE";
break;
case DTM.DOCUMENT_TYPE_NODE :
typestring = "DOCUMENT_NODE";
break;
case DTM.ELEMENT_NODE :
typestring = "ELEMENT_NODE";
break;
case DTM.ENTITY_NODE :
typestring = "ENTITY_NODE";
break;
case DTM.ENTITY_REFERENCE_NODE :
typestring = "ENTITY_REFERENCE_NODE";
break;
case DTM.NAMESPACE_NODE :
typestring = "NAMESPACE_NODE";
break;
case DTM.NOTATION_NODE :
typestring = "NOTATION_NODE";
break;
case DTM.NULL :
typestring = "NULL";
break;
case DTM.PROCESSING_INSTRUCTION_NODE :
typestring = "PROCESSING_INSTRUCTION_NODE";
break;
case DTM.TEXT_NODE :
typestring = "TEXT_NODE";
break;
default :
typestring = "Unknown!";
break;
}
ps.println("Type: " + typestring);
int firstChild = _firstch(index);
if (DTM.NULL == firstChild)
ps.println("First child: DTM.NULL");
else if (NOTPROCESSED == firstChild)
ps.println("First child: NOTPROCESSED");
else
ps.println("First child: " + firstChild);
if (m_prevsib != null)
{
int prevSibling = _prevsib(index);
if (DTM.NULL == prevSibling)
ps.println("Prev sibling: DTM.NULL");
else if (NOTPROCESSED == prevSibling)
ps.println("Prev sibling: NOTPROCESSED");
else
ps.println("Prev sibling: " + prevSibling);
}
int nextSibling = _nextsib(index);
if (DTM.NULL == nextSibling)
ps.println("Next sibling: DTM.NULL");
else if (NOTPROCESSED == nextSibling)
ps.println("Next sibling: NOTPROCESSED");
else
ps.println("Next sibling: " + nextSibling);
int parent = _parent(index);
if (DTM.NULL == parent)
ps.println("Parent: DTM.NULL");
else if (NOTPROCESSED == parent)
ps.println("Parent: NOTPROCESSED");
else
ps.println("Parent: " + parent);
int level = _level(index);
ps.println("Level: " + level);
ps.println("Node Value: " + getNodeValue(i));
ps.println("String Value: " + getStringValue(i));
}
}
catch(IOException ioe)
{
ioe.printStackTrace(System.err);
throw new RuntimeException(ioe.getMessage());
}
} |
Diagnostics function to dump the DTM.
| DTMDefaultBase::dumpDTM | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public String dumpNode(int nodeHandle)
{
if(nodeHandle==DTM.NULL)
return "[null]";
String typestring;
switch (getNodeType(nodeHandle))
{
case DTM.ATTRIBUTE_NODE :
typestring = "ATTR";
break;
case DTM.CDATA_SECTION_NODE :
typestring = "CDATA";
break;
case DTM.COMMENT_NODE :
typestring = "COMMENT";
break;
case DTM.DOCUMENT_FRAGMENT_NODE :
typestring = "DOC_FRAG";
break;
case DTM.DOCUMENT_NODE :
typestring = "DOC";
break;
case DTM.DOCUMENT_TYPE_NODE :
typestring = "DOC_TYPE";
break;
case DTM.ELEMENT_NODE :
typestring = "ELEMENT";
break;
case DTM.ENTITY_NODE :
typestring = "ENTITY";
break;
case DTM.ENTITY_REFERENCE_NODE :
typestring = "ENT_REF";
break;
case DTM.NAMESPACE_NODE :
typestring = "NAMESPACE";
break;
case DTM.NOTATION_NODE :
typestring = "NOTATION";
break;
case DTM.NULL :
typestring = "null";
break;
case DTM.PROCESSING_INSTRUCTION_NODE :
typestring = "PI";
break;
case DTM.TEXT_NODE :
typestring = "TEXT";
break;
default :
typestring = "Unknown!";
break;
}
StringBuffer sb=new StringBuffer();
sb.append("["+nodeHandle+": "+typestring+
"(0x"+Integer.toHexString(getExpandedTypeID(nodeHandle))+") "+
getNodeNameX(nodeHandle)+" {"+getNamespaceURI(nodeHandle)+"}"+
"=\""+ getNodeValue(nodeHandle)+"\"]");
return sb.toString();
} |
Diagnostics function to dump a single node.
%REVIEW% KNOWN GLITCH: If you pass it a node index rather than a
node handle, it works just fine... but the displayed identity
number before the colon is different, which complicates comparing
it with nodes printed the other way. We could always OR the DTM ID
into the value, to suppress that distinction...
%REVIEW% This might want to be moved up to DTMDefaultBase, or possibly
DTM itself, since it's a useful diagnostic and uses only DTM's public
APIs.
| DTMDefaultBase::dumpNode | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public void setFeature(String featureId, boolean state){} |
Set an implementation dependent feature.
<p>
%REVIEW% Do we really expect to set features on DTMs?
@param featureId A feature URL.
@param state true if this feature should be on, false otherwise.
| DTMDefaultBase::setFeature | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public boolean hasChildNodes(int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
int firstChild = _firstch(identity);
return firstChild != DTM.NULL;
} |
Given a node handle, test if it has child nodes.
<p> %REVIEW% This is obviously useful at the DOM layer, where it
would permit testing this without having to create a proxy
node. It's less useful in the DTM API, where
(dtm.getFirstChild(nodeHandle)!=DTM.NULL) is just as fast and
almost as self-evident. But it's a convenience, and eases porting
of DOM code to DTM. </p>
@param nodeHandle int Handle of the node.
@return int true if the given node has child nodes.
| DTMDefaultBase::hasChildNodes | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
final public int makeNodeHandle(int nodeIdentity)
{
if(NULL==nodeIdentity) return NULL;
if(JJK_DEBUG && nodeIdentity>DTMManager.IDENT_NODE_DEFAULT)
System.err.println("GONK! (only useful in limited situations)");
return m_dtmIdent.elementAt(nodeIdentity >>> DTMManager.IDENT_DTM_NODE_BITS)
+ (nodeIdentity & DTMManager.IDENT_NODE_DEFAULT) ;
} | Given a node identity, return a node handle. If extended addressing
has been used (multiple DTM IDs), we need to map the high bits of the
identity into the proper DTM ID.
This has been made FINAL to facilitate inlining, since we do not expect
any subclass of DTMDefaultBase to ever change the algorithm. (I don't
really like doing so, and would love to have an excuse not to...)
%REVIEW% Is it worth trying to specialcase small documents?
%REVIEW% Should this be exposed at the package/public layers?
@param nodeIdentity Internal offset to this node's records.
@return NodeHandle (external representation of node)
* | DTMDefaultBase::makeNodeHandle | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
final public int makeNodeIdentity(int nodeHandle)
{
if(NULL==nodeHandle) return NULL;
if(m_mgrDefault!=null)
{
// Optimization: use the DTMManagerDefault's fast DTMID-to-offsets
// table. I'm not wild about this solution but this operation
// needs need extreme speed.
int whichDTMindex=nodeHandle>>>DTMManager.IDENT_DTM_NODE_BITS;
// %REVIEW% Wish I didn't have to perform the pre-test, but
// someone is apparently asking DTMs whether they contain nodes
// which really don't belong to them. That's probably a bug
// which should be fixed, but until it is:
if(m_mgrDefault.m_dtms[whichDTMindex]!=this)
return NULL;
else
return
m_mgrDefault.m_dtm_offsets[whichDTMindex]
| (nodeHandle & DTMManager.IDENT_NODE_DEFAULT);
}
int whichDTMid=m_dtmIdent.indexOf(nodeHandle & DTMManager.IDENT_DTM_DEFAULT);
return (whichDTMid==NULL)
? NULL
: (whichDTMid << DTMManager.IDENT_DTM_NODE_BITS)
+ (nodeHandle & DTMManager.IDENT_NODE_DEFAULT);
} | Given a node handle, return a node identity. If extended addressing
has been used (multiple DTM IDs), we need to map the high bits of the
identity into the proper DTM ID and thence find the proper offset
to add to the low bits of the identity
This has been made FINAL to facilitate inlining, since we do not expect
any subclass of DTMDefaultBase to ever change the algorithm. (I don't
really like doing so, and would love to have an excuse not to...)
%OPT% Performance is critical for this operation.
%REVIEW% Should this be exposed at the package/public layers?
@param nodeHandle (external representation of node)
@return nodeIdentity Internal offset to this node's records.
* | DTMDefaultBase::makeNodeIdentity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getFirstChild(int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
int firstChild = _firstch(identity);
return makeNodeHandle(firstChild);
} |
Given a node handle, get the handle of the node's first child.
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 DTM node-number of first child, or DTM.NULL to indicate none exists.
| DTMDefaultBase::getFirstChild | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getTypedFirstChild(int nodeHandle, int nodeType)
{
int firstChild, eType;
if (nodeType < DTM.NTYPES) {
for (firstChild = _firstch(makeNodeIdentity(nodeHandle));
firstChild != DTM.NULL;
firstChild = _nextsib(firstChild)) {
eType = _exptype(firstChild);
if (eType == nodeType
|| (eType >= DTM.NTYPES
&& m_expandedNameTable.getType(eType) == nodeType)) {
return makeNodeHandle(firstChild);
}
}
} else {
for (firstChild = _firstch(makeNodeIdentity(nodeHandle));
firstChild != DTM.NULL;
firstChild = _nextsib(firstChild)) {
if (_exptype(firstChild) == nodeType) {
return makeNodeHandle(firstChild);
}
}
}
return DTM.NULL;
} |
Given a node handle, get the handle of the node's first child.
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 DTM node-number of first child, or DTM.NULL to indicate none exists.
| DTMDefaultBase::getTypedFirstChild | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getLastChild(int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
int child = _firstch(identity);
int lastChild = DTM.NULL;
while (child != DTM.NULL)
{
lastChild = child;
child = _nextsib(child);
}
return makeNodeHandle(lastChild);
} |
Given a node handle, advance to its last child.
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 last child,
or DTM.NULL to indicate none exists.
| DTMDefaultBase::getLastChild | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getFirstAttribute(int nodeHandle)
{
int nodeID = makeNodeIdentity(nodeHandle);
return makeNodeHandle(getFirstAttributeIdentity(nodeID));
} |
Given a node handle, get the index of the node's first attribute.
@param nodeHandle int Handle of the node.
@return Handle of first attribute, or DTM.NULL to indicate none exists.
| DTMDefaultBase::getFirstAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int getFirstAttributeIdentity(int identity) {
int type = _type(identity);
if (DTM.ELEMENT_NODE == type)
{
// Assume that attributes and namespaces immediately follow the element.
while (DTM.NULL != (identity = getNextNodeIdentity(identity)))
{
// Assume this can not be null.
type = _type(identity);
if (type == DTM.ATTRIBUTE_NODE)
{
return identity;
}
else if (DTM.NAMESPACE_NODE != type)
{
break;
}
}
}
return DTM.NULL;
} |
Given a node identity, get the index of the node's first attribute.
@param identity int identity of the node.
@return Identity of first attribute, or DTM.NULL to indicate none exists.
| DTMDefaultBase::getFirstAttributeIdentity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
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.
| DTMDefaultBase::getTypedAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getNextSibling(int nodeHandle)
{
if (nodeHandle == DTM.NULL)
return DTM.NULL;
return makeNodeHandle(_nextsib(makeNodeIdentity(nodeHandle)));
} |
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.
| DTMDefaultBase::getNextSibling | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
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, 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.
| DTMDefaultBase::getTypedNextSibling | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getPreviousSibling(int nodeHandle)
{
if (nodeHandle == DTM.NULL)
return DTM.NULL;
if (m_prevsib != null)
return makeNodeHandle(_prevsib(makeNodeIdentity(nodeHandle)));
else
{
// If the previous sibling array is not built, we get at
// the previous sibling using the parent, firstch and
// nextsib arrays.
int nodeID = makeNodeIdentity(nodeHandle);
int parent = _parent(nodeID);
int node = _firstch(parent);
int result = DTM.NULL;
while (node != nodeID)
{
result = node;
node = _nextsib(node);
}
return makeNodeHandle(result);
}
} |
Given a node handle, find its preceeding sibling.
WARNING: DTM is asymmetric; this operation is resolved by search, and is
relatively expensive.
@param nodeHandle the id of the node.
@return int Node-number of the previous sib,
or DTM.NULL to indicate none exists.
| DTMDefaultBase::getPreviousSibling | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
public int getNextAttribute(int nodeHandle) {
int nodeID = makeNodeIdentity(nodeHandle);
if (_type(nodeID) == DTM.ATTRIBUTE_NODE) {
return makeNodeHandle(getNextAttributeIdentity(nodeID));
}
return DTM.NULL;
} |
Given a node handle, advance to the next attribute.
If an attr, we advance to
the next attr on the same node. If not an attribute, we return NULL.
@param nodeHandle int Handle of the node.
@return int DTM node-number of the resolved attr,
or DTM.NULL to indicate none exists.
| DTMDefaultBase::getNextAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
protected int getNextAttributeIdentity(int identity) {
// Assume that attributes and namespace nodes immediately follow the element
while (DTM.NULL != (identity = getNextNodeIdentity(identity))) {
int type = _type(identity);
if (type == DTM.ATTRIBUTE_NODE) {
return identity;
} else if (type != DTM.NAMESPACE_NODE) {
break;
}
}
return DTM.NULL;
} |
Given a node identity for an attribute, advance to the next attribute.
@param identity int identity of the attribute node. This
<strong>must</strong> be an attribute node.
@return int DTM node-identity of the resolved attr,
or DTM.NULL to indicate none exists.
| DTMDefaultBase::getNextAttributeIdentity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.