Methods Summary |
---|
public int | addDOMAdapter(com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter adapter)
return addDOMAdapter(adapter, true);
|
private int | addDOMAdapter(com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter adapter, boolean indexByURI)
// Add the DOM adapter to the array of DOMs
DOM dom = adapter.getDOMImpl();
int domNo = 1;
int dtmSize = 1;
SuballocatedIntVector dtmIds = null;
if (dom instanceof DTMDefaultBase) {
DTMDefaultBase dtmdb = (DTMDefaultBase)dom;
dtmIds = dtmdb.getDTMIDs();
dtmSize = dtmIds.size();
domNo = dtmIds.elementAt(dtmSize-1) >>> DTMManager.IDENT_DTM_NODE_BITS;
}
else if (dom instanceof SimpleResultTreeImpl) {
SimpleResultTreeImpl simpleRTF = (SimpleResultTreeImpl)dom;
domNo = simpleRTF.getDocument() >>> DTMManager.IDENT_DTM_NODE_BITS;
}
if (domNo >= _size) {
int oldSize = _size;
do {
_size *= 2;
} while (_size <= domNo);
final DOMAdapter[] newArray = new DOMAdapter[_size];
System.arraycopy(_adapters, 0, newArray, 0, oldSize);
_adapters = newArray;
}
_free = domNo + 1;
if (dtmSize == 1) {
_adapters[domNo] = adapter;
}
else if (dtmIds != null) {
int domPos = 0;
for (int i = dtmSize - 1; i >= 0; i--) {
domPos = dtmIds.elementAt(i) >>> DTMManager.IDENT_DTM_NODE_BITS;
_adapters[domPos] = adapter;
}
domNo = domPos;
}
// Store reference to document (URI) in hashtable
if (indexByURI) {
String uri = adapter.getDocumentURI(0);
_documents.put(uri, new Integer(domNo));
}
// If the dom is an AdaptiveResultTreeImpl, we need to create a
// DOMAdapter around its nested dom object (if it is non-null) and
// add the DOMAdapter to the list.
if (dom instanceof AdaptiveResultTreeImpl) {
AdaptiveResultTreeImpl adaptiveRTF = (AdaptiveResultTreeImpl)dom;
DOM nestedDom = adaptiveRTF.getNestedDOM();
if (nestedDom != null) {
DOMAdapter newAdapter = new DOMAdapter(nestedDom,
adapter.getNamesArray(),
adapter.getUrisArray(),
adapter.getTypesArray(),
adapter.getNamespaceArray());
addDOMAdapter(newAdapter);
}
}
return domNo;
|
public void | characters(int textNode, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)
if (textNode != DTM.NULL) {
_adapters[textNode >>> DTMManager.IDENT_DTM_NODE_BITS].characters(textNode, handler);
}
|
public void | copy(int node, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)
if (node != DTM.NULL) {
_adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].copy(node, handler);
}
|
public void | copy(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator nodes, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)
int node;
while ((node = nodes.next()) != DTM.NULL) {
_adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].copy(node, handler);
}
|
public int | getAttributeNode(int type, int el)
if (el == DTM.NULL) {
return DTM.NULL;
}
return _adapters[el >>> DTMManager.IDENT_DTM_NODE_BITS].getAttributeNode(type, el);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getAxisIterator(int axis)
return new AxisIterator(axis, NO_TYPE);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getChildren(int node)
return _adapters[getDTMId(node)].getChildren(node);
|
public com.sun.org.apache.xalan.internal.xsltc.DOM | getDOMAdapter(java.lang.String uri)
Integer domIdx = (Integer)_documents.get(uri);
if (domIdx == null) {
return(null);
} else {
return(_adapters[domIdx.intValue()]);
}
|
public com.sun.org.apache.xalan.internal.xsltc.DOM | getDTM(int nodeHandle)
return _adapters[getDTMId(nodeHandle)];
|
public int | getDTMId(int nodeHandle)
if (nodeHandle == DTM.NULL)
return 0;
int id = nodeHandle >>> DTMManager.IDENT_DTM_NODE_BITS;
while (id >= 2 && _adapters[id] == _adapters[id-1]) {
id--;
}
return id;
|
public com.sun.org.apache.xml.internal.dtm.DTMManager | getDTMManager()
return _dtmManager;
|
public int | getDocument()
return _main.getDocument();
|
public int | getDocumentMask(java.lang.String uri)
Integer domIdx = (Integer)_documents.get(uri);
if (domIdx == null) {
return(-1);
} else {
return domIdx.intValue();
}
|
public java.lang.String | getDocumentURI(int node)
if (node == DTM.NULL) {
node = DOM.NULL;
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getDocumentURI(0);
|
public com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable | getElementsWithIDs()
return _main.getElementsWithIDs();
|
public int | getExpandedTypeID(int node)
if (node != DTM.NULL) {
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getExpandedTypeID(node);
}
else {
return DTM.NULL;
}
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getIterator()Returns singleton iterator containing the document root
// main source document @ 0
return _main.getIterator();
|
public java.lang.String | getLanguage(int node)
return _adapters[getDTMId(node)].getLanguage(node);
|
public com.sun.org.apache.xalan.internal.xsltc.DOM | getMain()
return _main;
|
public int | getNSType(int node)
return _adapters[getDTMId(node)].getNSType(node);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getNamespaceAxisIterator(int axis, int ns)
DTMAxisIterator iterator = _main.getNamespaceAxisIterator(axis, ns);
return(iterator);
|
public java.lang.String | getNamespaceName(int node)
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getNamespaceName(node);
|
public int | getNamespaceType(int node)
return _adapters[getDTMId(node)].getNamespaceType(node);
|
public int | getNodeHandle(int nodeId)
return _main.getNodeHandle(nodeId);
|
public int | getNodeIdent(int nodeHandle)
return _adapters[nodeHandle >>> DTMManager.IDENT_DTM_NODE_BITS].getNodeIdent(nodeHandle);
|
public java.lang.String | getNodeName(int node)
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getNodeName(node);
|
public java.lang.String | getNodeNameX(int node)
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getNodeNameX(node);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getNodeValueIterator(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iterator, int type, java.lang.String value, boolean op)
return(new NodeValueIterator(iterator, type, value, op));
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getNthDescendant(int node, int n, boolean includeself)
return _adapters[getDTMId(node)].getNthDescendant(node, n, includeself);
|
public com.sun.org.apache.xml.internal.serializer.SerializationHandler | getOutputDomBuilder()Returns a DOMBuilder class wrapped in a SAX adapter.
return _main.getOutputDomBuilder();
|
public int | getParent(int node)
if (node == DTM.NULL) {
return DTM.NULL;
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getParent(node);
|
public com.sun.org.apache.xalan.internal.xsltc.DOM | getResultTreeFrag(int initSize, int rtfType)
return _main.getResultTreeFrag(initSize, rtfType);
|
public com.sun.org.apache.xalan.internal.xsltc.DOM | getResultTreeFrag(int initSize, int rtfType, boolean addToManager)
return _main.getResultTreeFrag(initSize, rtfType, addToManager);
|
public int | getSize()
int size = 0;
for (int i=0; i<_size; i++) {
size += _adapters[i].getSize();
}
return(size);
|
public java.lang.String | getStringValue()
return _main.getStringValue();
|
public java.lang.String | getStringValueX(int node)
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getStringValueX(node);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getTypedAxisIterator(int axis, int type)
return new AxisIterator(axis, type);
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | getTypedChildren(int type)
return new AxisIterator(Axis.CHILD, type);
|
public java.lang.String | getUnparsedEntityURI(java.lang.String entity)
return _main.getUnparsedEntityURI(entity);
|
public boolean | isAttribute(int node)
if (node == DTM.NULL) {
return false;
}
return(_adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].isAttribute(node));
|
public boolean | isElement(int node)
if (node == DTM.NULL) {
return false;
}
return(_adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].isElement(node));
|
public boolean | lessThan(int node1, int node2)
if (node1 == DTM.NULL) {
return true;
}
if (node2 == DTM.NULL) {
return false;
}
final int dom1 = getDTMId(node1);
final int dom2 = getDTMId(node2);
return dom1 == dom2 ? _adapters[dom1].lessThan(node1, node2)
: dom1 < dom2;
|
public java.lang.String | lookupNamespace(int node, java.lang.String prefix)
return _main.lookupNamespace(node, prefix);
|
public org.w3c.dom.Node | makeNode(int index)
if (index == DTM.NULL) {
return null;
}
return _adapters[getDTMId(index)].makeNode(index);
|
public org.w3c.dom.Node | makeNode(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iter)
// TODO: gather nodes from all DOMs ?
return _main.makeNode(iter);
|
public org.w3c.dom.NodeList | makeNodeList(int index)
if (index == DTM.NULL) {
return null;
}
return _adapters[getDTMId(index)].makeNodeList(index);
|
public org.w3c.dom.NodeList | makeNodeList(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iter)
// TODO: gather nodes from all DOMs ?
return _main.makeNodeList(iter);
|
public int | nextMask()
return _free;
|
public com.sun.org.apache.xml.internal.dtm.DTMAxisIterator | orderNodes(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator source, int node)
return _adapters[getDTMId(node)].orderNodes(source, node);
|
public void | setFilter(com.sun.org.apache.xalan.internal.xsltc.StripFilter filter)
for (int dom=0; dom<_free; dom++) {
if (_adapters[dom] != null) {
_adapters[dom].setFilter(filter);
}
}
|
public void | setupMapping(java.lang.String[] names, java.lang.String[] uris, int[] types, java.lang.String[] namespaces)
// This method only has a function in DOM adapters
|
public java.lang.String | shallowCopy(int node, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)
if (node == DTM.NULL) {
return "";
}
return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].shallowCopy(node, handler);
|