Java Code Examples for com.sun.org.apache.xpath.internal.NodeSetDTM

The following examples show how to use com.sun.org.apache.xpath.internal.NodeSetDTM. These examples are extracted from open source projects. 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 Project: jdk1.8-source-analysis   Source File: XNodeSetForDOM.java    License: Apache License 2.0 5 votes vote down vote up
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
Example 2
Source Project: jdk1.8-source-analysis   Source File: XNodeSetForDOM.java    License: Apache License 2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 3
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
Example 4
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
Example 5
Source Project: jdk1.8-source-analysis   Source File: NodeSequence.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
Example 6
Source Project: openjdk-8   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 7
Source Project: TencentKona-8   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
Example 8
Source Project: TencentKona-8   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 9
Source Project: TencentKona-8   Source File: XObject.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
Example 10
Source Project: openjdk-8   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeIter;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj = new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 11
Source Project: TencentKona-8   Source File: NodeSequence.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
Example 12
Source Project: openjdk-8-source   Source File: XObject.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
Example 13
Source Project: openjdk-8-source   Source File: XNodeSet.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}
 
Example 14
Source Project: jdk8u60   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 15
Source Project: jdk8u60   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeIter;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj = new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 16
Source Project: jdk8u60   Source File: XObject.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
Example 17
Source Project: jdk8u60   Source File: XNodeSet.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}
 
Example 18
Source Project: jdk8u60   Source File: NodeSequence.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
Example 19
Source Project: JDKSourceCode1.8   Source File: XNodeSetForDOM.java    License: MIT License 5 votes vote down vote up
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
Example 20
Source Project: JDKSourceCode1.8   Source File: XNodeSetForDOM.java    License: MIT License 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 21
Source Project: JDKSourceCode1.8   Source File: XNodeSetForDOM.java    License: MIT License 5 votes vote down vote up
public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeIter;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj = new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 22
Source Project: JDKSourceCode1.8   Source File: XObject.java    License: MIT License 5 votes vote down vote up
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
Example 23
Source Project: JDKSourceCode1.8   Source File: XNodeSet.java    License: MIT License 5 votes vote down vote up
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}
 
Example 24
Source Project: JDKSourceCode1.8   Source File: NodeSequence.java    License: MIT License 5 votes vote down vote up
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
Example 25
Source Project: hottub   Source File: XNodeSet.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}
 
Example 26
Source Project: openjdk-jdk8u   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
Example 27
Source Project: openjdk-jdk8u   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeList;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeList, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 28
Source Project: openjdk-jdk8u   Source File: XNodeSetForDOM.java    License: GNU General Public License v2.0 5 votes vote down vote up
public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
{
  m_dtmMgr = xctxt.getDTMManager();
  m_origObj = nodeIter;

  // JKESS 20020514: Longer-term solution is to force
  // folks to request length through an accessor, so we can defer this
  // retrieval... but that requires an API change.
  // m_obj = new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  com.sun.org.apache.xpath.internal.NodeSetDTM nsdtm=new com.sun.org.apache.xpath.internal.NodeSetDTM(nodeIter, xctxt);
  m_last=nsdtm.getLength();
  setObject(nsdtm);
}
 
Example 29
Source Project: openjdk-jdk8u   Source File: XObject.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
Example 30
Source Project: openjdk-jdk8u   Source File: XNodeSet.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}