Java Code Examples for com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase#getDTMIDs()
The following examples show how to use
com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase#getDTMIDs() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiDOM.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 2
Source File: MultiDOM.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 3
Source File: MultiDOM.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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; }
Example 4
Source File: MultiDOM.java From JDKSourceCode1.8 with MIT License | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 5
Source File: MultiDOM.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 6
Source File: MultiDOM.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 7
Source File: MultiDOM.java From Bytecoder with Apache License 2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 8
Source File: MultiDOM.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 9
Source File: MultiDOM.java From hottub with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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 the Map if (indexByURI) { String uri = adapter.getDocumentURI(0); _documents.put(uri, 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; }
Example 10
Source File: MultiDOM.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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; }
Example 11
Source File: MultiDOM.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private int addDOMAdapter(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; }