本文整理汇总了Java中com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase类的典型用法代码示例。如果您正苦于以下问题:Java DTMDefaultBase类的具体用法?Java DTMDefaultBase怎么用?Java DTMDefaultBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DTMDefaultBase类属于com.sun.org.apache.xml.internal.dtm.ref包,在下文中一共展示了DTMDefaultBase类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setStartNode
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* 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.
*/
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 = (node == DTM.NULL) ? DTM.NULL : NOTPROCESSED;
return resetPosition();
}
return this;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:SAXImpl.java
示例2: removeDOMAdapter
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
public void removeDOMAdapter(DOMAdapter adapter) {
_documents.remove(adapter.getDocumentURI(0));
DOM dom = adapter.getDOMImpl();
if (dom instanceof DTMDefaultBase) {
SuballocatedIntVector ids = ((DTMDefaultBase) dom).getDTMIDs();
int idsSize = ids.size();
for (int i = 0; i < idsSize; i++) {
_adapters[ids.elementAt(i) >>> DTMManager.IDENT_DTM_NODE_BITS] = null;
}
} else {
int id = dom.getDocument() >>> DTMManager.IDENT_DTM_NODE_BITS;
if ((id > 0) && (id < _adapters.length) && isMatchingAdapterEntry(_adapters[id], adapter)) {
_adapters[id] = null;
} else {
boolean found = false;
for (int i = 0; i < _adapters.length; i++) {
if (isMatchingAdapterEntry(_adapters[id], adapter)) {
_adapters[i] = null;
found = true;
break;
}
}
}
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:MultiDOM.java
示例3: setStartNode
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* Setting start to END should 'close' the iterator,
* i.e. subsequent call to next() should return END.
* <p>
* If the iterator is not restartable, this has no effect.
* %REVIEW% Should it return/throw something in that case,
* or set current node to END, to indicate request-not-honored?
*
* @param node Sets the root of the iteration.
*
* @return A DTMAxisIterator set to the start of the iteration.
*/
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 = (node == DTM.NULL) ? DTM.NULL
: _firstch2(makeNodeIdentity(node));
return resetPosition();
}
return this;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:SAX2DTM2.java
示例4: referenceToNodeList
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* Utility function: used to convert reference to org.w3c.dom.NodeList.
*/
public static NodeList referenceToNodeList(Object obj, DOM dom) {
if (obj instanceof Node || obj instanceof DTMAxisIterator) {
DTMAxisIterator iter = referenceToNodeSet(obj);
return dom.makeNodeList(iter);
}
else if (obj instanceof DOM) {
dom = (DOM)obj;
return dom.makeNodeList(DTMDefaultBase.ROOTNODE);
}
else {
final String className = obj.getClass().getName();
runTimeError(DATA_CONVERSION_ERR, className,
"org.w3c.dom.NodeList");
return null;
}
}
开发者ID:campolake,项目名称:openjdk9,代码行数:20,代码来源:BasisLibrary.java
示例5: DupFilterIterator
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
public DupFilterIterator(DTMAxisIterator source) {
_source = source;
// System.out.println("DFI source = " + source + " this = " + this);
// Cache contents of id() or key() index right away. Necessary for
// union expressions containing multiple calls to the same index, and
// correct as well since start-node is irrelevant for id()/key() exrp.
if (source instanceof KeyIndex) {
setStartNode(DTMDefaultBase.ROOTNODE);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:DupFilterIterator.java
示例6: setStartNode
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* Set the start node for this iterator
* @param node The start node
* @return A reference to this node iterator
*/
public DTMAxisIterator setStartNode(int node) {
if (_isRestartable) {
// KeyIndex iterators are always relative to the root node, so there
// is never any point in re-reading the iterator (and we SHOULD NOT).
boolean sourceIsKeyIndex = _source instanceof KeyIndex;
if (sourceIsKeyIndex
&& _startNode == DTMDefaultBase.ROOTNODE) {
return this;
}
if (node != _startNode) {
_source.setStartNode(_startNode = node);
_nodes.clear();
while ((node = _source.next()) != END) {
_nodes.add(node);
}
// Nodes produced by KeyIndex are known to be in document order.
// Take advantage of it.
if (!sourceIsKeyIndex) {
_nodes.sort();
}
_nodesSize = _nodes.cardinality();
_current = 0;
_lastNext = END;
resetPosition();
}
}
return this;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:DupFilterIterator.java
示例7: SAXImpl
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* Construct a SAXImpl object using the given block size.
*/
public SAXImpl(XSLTCDTMManager mgr, Source source,
int dtmIdentity, DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing, int blocksize,
boolean buildIdIndex,
boolean newNameTable)
{
super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
doIndexing, blocksize, false, buildIdIndex, newNameTable);
_dtmManager = mgr;
_size = blocksize;
// Use a smaller size for the space stack if the blocksize is small
_xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];
/* From DOMBuilder */
_xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;
// If the input source is DOMSource, set the _document field and
// create the node2Ids table.
if (source instanceof DOMSource) {
_hasDOMSource = true;
DOMSource domsrc = (DOMSource)source;
Node node = domsrc.getNode();
if (node instanceof Document) {
_document = (Document)node;
}
else {
_document = node.getOwnerDocument();
}
_node2Ids = new Hashtable();
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:SAXImpl.java
示例8: setStartNode
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
public DTMAxisIterator setStartNode(int node) {
_startNode = DTMDefaultBase.ROOTNODE;
if (_isRestartable) {
_source.setStartNode(_startNode);
resetPosition();
}
return this;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AbsoluteIterator.java
示例9: MultiDOM
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
public MultiDOM(DOM main) {
_size = INITIAL_SIZE;
_free = 1;
_adapters = new DOM[INITIAL_SIZE];
DOMAdapter adapter = (DOMAdapter)main;
_adapters[0] = adapter;
_main = adapter;
DOM dom = adapter.getDOMImpl();
if (dom instanceof DTMDefaultBase) {
_dtmManager = ((DTMDefaultBase)dom).getManager();
}
// %HZ% %REVISIT% Is this the right thing to do here? In the old
// %HZ% %REVISIT% version, the main document did not get added through
// %HZ% %REVISIT% a call to addDOMAdapter, which meant it couldn't be
// %HZ% %REVISIT% found by a call to getDocumentMask. The problem is
// %HZ% %REVISIT% TransformerHandler is typically constructed with a
// %HZ% %REVISIT% system ID equal to the stylesheet's URI; with SAX
// %HZ% %REVISIT% input, it ends up giving that URI to the document.
// %HZ% %REVISIT% Then, any references to document('') are resolved
// %HZ% %REVISIT% using the stylesheet's URI.
// %HZ% %REVISIT% MultiDOM.getDocumentMask is called to verify that
// %HZ% %REVISIT% a document associated with that URI has not been
// %HZ% %REVISIT% encountered, and that method ends up returning the
// %HZ% %REVISIT% mask of the main document, when what we really what
// %HZ% %REVISIT% is to read the stylesheet itself!
addDOMAdapter(adapter, false);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:MultiDOM.java
示例10: SAXImpl
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase; //导入依赖的package包/类
/**
* Construct a SAXImpl object using the given block size.
*/
public SAXImpl(XSLTCDTMManager mgr, Source source,
int dtmIdentity, DTMWSFilter whiteSpaceFilter,
XMLStringFactory xstringfactory,
boolean doIndexing, int blocksize,
boolean buildIdIndex,
boolean newNameTable)
{
super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory,
doIndexing, blocksize, false, buildIdIndex, newNameTable);
_dtmManager = mgr;
_size = blocksize;
// Use a smaller size for the space stack if the blocksize is small
_xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64];
/* From DOMBuilder */
_xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE;
// If the input source is DOMSource, set the _document field and
// create the node2Ids table.
if (source instanceof DOMSource) {
_hasDOMSource = true;
DOMSource domsrc = (DOMSource)source;
Node node = domsrc.getNode();
if (node instanceof Document) {
_document = (Document)node;
}
else {
_document = node.getOwnerDocument();
}
_node2Ids = new HashMap<>();
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:38,代码来源:SAXImpl.java
注:本文中的com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论