Package org.apache.xml.utils

Examples of org.apache.xml.utils.SuballocatedIntVector


   */
  public int getFirstNamespaceNode(int nodeHandle, boolean inScope)
  {
        if(inScope)
        {
            SuballocatedIntVector nsContext=findNamespaceContext(makeNodeIdentity(nodeHandle));
            if(nsContext==null || nsContext.size()<1)
              return NULL;

            return nsContext.elementAt(0);
          }
        else
          {
            // Assume that attributes and namespaces immediately
            // follow the element.
View Full Code Here


            //Since we've been given the base, try direct lookup
            //(could look from nodeHandle but this is at least one
            //comparison/get-parent faster)
            //SuballocatedIntVector nsContext=findNamespaceContext(nodeHandle & m_mask);

                SuballocatedIntVector nsContext=findNamespaceContext(makeNodeIdentity(baseHandle));

            if(nsContext==null)
              return NULL;
            int i=1 + nsContext.indexOf(nodeHandle);
            if(i<=0 || i==nsContext.size())
              return NULL;

            return nsContext.elementAt(i);
          }
        else
          {
            // Assume that attributes and namespace nodes immediately follow the element.
            int identity = makeNodeIdentity(nodeHandle);
View Full Code Here

          xstringfactory, doIndexing);
         
    // %REVIEW%  Initial size pushed way down to reduce weight of RTFs
    // (I'm not entirely sure 0 would work, so I'm playing it safe for now.)
    //m_data = new SuballocatedIntVector(doIndexing ? (1024*2) : 512, 1024);
    m_data = new SuballocatedIntVector(32, 1024);

    m_data.addElement(0);   // Need placeholder in case index into here must be <0.

    m_dataOrQName = new SuballocatedIntVector(m_initialblocksize);
   
    // %REVIEW%
    // A public static is not a good way to retrieve the system-level
    // FEATURE_SOURCE_LOCATION flag, but we didn't want to deal with
    // changing APIs at this time. MUST reconsider.
View Full Code Here

          xstringfactory, doIndexing);
         
    // %REVIEW%  Initial size pushed way down to reduce weight of RTFs
    // (I'm not entirely sure 0 would work, so I'm playing it safe for now.)
    //m_data = new SuballocatedIntVector(doIndexing ? (1024*2) : 512, 1024);
    m_data = new SuballocatedIntVector(32, 1024);

    m_data.addElement(0);   // Need placeholder in case index into here must be <0.

    m_dataOrQName = new SuballocatedIntVector(m_initialblocksize);
   
    // %REVIEW%
    // A public static is not a good way to retrieve the system-level
    // FEATURE_SOURCE_LOCATION flag, but we didn't want to deal with
    // changing APIs at this time. MUST reconsider.
View Full Code Here

    {
      m_initialblocksize = 8;
      m_blocksize = 16;
    }

    m_exptype = new SuballocatedIntVector(m_initialblocksize);
    m_firstch = new SuballocatedIntVector(m_initialblocksize);
    m_nextsib = new SuballocatedIntVector(m_initialblocksize);
    m_prevsib = new SuballocatedIntVector(m_initialblocksize);
    m_parent = new SuballocatedIntVector(m_initialblocksize);

    m_mgr = mgr;
    if(mgr instanceof DTMManagerDefault)
      m_mgrDefault=(DTMManagerDefault)mgr;
   
View Full Code Here

   * %REVIEW% Directly managed arrays rather than vectors?
   * %REVIEW% Handles or IDs? Given usage, I think handles.
   * */
  protected void declareNamespaceInContext(int elementNodeIndex,int namespaceNodeIndex)
  {
    SuballocatedIntVector nsList=null;
    if(m_namespaceDeclSets==null)
      {

        // First
        m_namespaceDeclSetElements=new SuballocatedIntVector();
        m_namespaceDeclSetElements.addElement(elementNodeIndex);
        m_namespaceDeclSets=new Vector();
        nsList=new SuballocatedIntVector();
        m_namespaceDeclSets.addElement(nsList);
      }
    else
      {
        // Most recent. May be -1 (none) if DTM was pruned.
        // %OPT% Is there a lastElement() method? Should there be?
        int last=m_namespaceDeclSetElements.size()-1;
         
        if(last>=0 && elementNodeIndex==m_namespaceDeclSetElements.elementAt(last))
          {
            nsList=(SuballocatedIntVector)m_namespaceDeclSets.elementAt(last);
          }
      }
    if(nsList==null)
      {
        m_namespaceDeclSetElements.addElement(elementNodeIndex);
        nsList=new SuballocatedIntVector();
        m_namespaceDeclSets.addElement(nsList);

        SuballocatedIntVector inherited= findNamespaceContext(_parent(elementNodeIndex));

        if(inherited!=null)
          {
            // %OPT% Count-down might be faster, but debuggability may
            // be better this way, and if we ever decide we want to
            // keep this ordered by expanded-type...
            int isize=inherited.size();
            for(int i=0;i<isize;++i)
              {
                nsList.addElement(inherited.elementAt(i));
              }
          }
      }

    // Handle overwriting inherited.
View Full Code Here

   */
  public int getFirstNamespaceNode(int nodeHandle, boolean inScope)
  {
        if(inScope)
        {
            SuballocatedIntVector nsContext=findNamespaceContext(makeNodeIdentity(nodeHandle));
            if(nsContext==null || nsContext.size()<1)
              return NULL;

            return nsContext.elementAt(0);
          }
        else
          {
            // Assume that attributes and namespaces immediately
            // follow the element.
View Full Code Here

            //Since we've been given the base, try direct lookup
            //(could look from nodeHandle but this is at least one
            //comparison/get-parent faster)
            //SuballocatedIntVector nsContext=findNamespaceContext(nodeHandle & m_mask);

                SuballocatedIntVector nsContext=findNamespaceContext(makeNodeIdentity(baseHandle));

            if(nsContext==null)
              return NULL;
            int i=1 + nsContext.indexOf(nodeHandle);
            if(i<=0 || i==nsContext.size())
              return NULL;

            return nsContext.elementAt(i);
          }
        else
          {
            // Assume that attributes and namespace nodes immediately follow the element.
            int identity = makeNodeIdentity(nodeHandle);
View Full Code Here

  public DTMDocument( DTMManager mgr, int ident )
  {
    super(mgr, null, ident,
      null, mgr.getXMLStringFactory(), true);

    m_attribute = new SuballocatedIntVector(m_initialblocksize);
  }
View Full Code Here

          xstringfactory, doIndexing);
         
    // %REVIEW%  Initial size pushed way down to reduce weight of RTFs
    // (I'm not entirely sure 0 would work, so I'm playing it safe for now.)
    //m_data = new SuballocatedIntVector(doIndexing ? (1024*2) : 512, 1024);
    m_data = new SuballocatedIntVector(32, 1024);

    m_data.addElement(0);   // Need placeholder in case index into here must be <0.

    m_dataOrQName = new SuballocatedIntVector(m_initialblocksize);
  }
View Full Code Here

TOP

Related Classes of org.apache.xml.utils.SuballocatedIntVector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.