Package org.apache.uima.internal.util

Examples of org.apache.uima.internal.util.IntStack


      this.cas = cas;
      this.queued = new IntRedBlackTree();
      this.duplicates = new IntRedBlackTree();
      this.numDuplicates = 0;
      this.dupVectors = new Vector();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      this.indexReps = new IntVector();
      this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType(
              cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA));
View Full Code Here


    IntVector v = new IntVector();
    // A stack for traversing the tree;
    Stack<IntRBTNode> nodeStack = new Stack<IntRBTNode>();
    // A stack for keeping addresses associated w/ the nodes on the
    // node stack.
    IntStack addressStack = new IntStack();
    IntRBTNode node = this;
    int address;
    do {
      while (node.left != null || node.right != null) {
        // While we have a non-terminal node...
        v.add(node.key);
        v.add(node.element);
        if (node.left != null) {
          if (node.right != null) {
            v.add(IntRBTArray.TWODTRS);
            addressStack.push(v.size());
            v.add(-1); // Placeholder.
            nodeStack.push(node.right);
          } else {
            v.add(IntRBTArray.LEFTDTR);
          }
          node = node.left;
        } else {
          // Because of the while loop, we know at this point that
          // node.right != null
          v.add(IntRBTArray.RIGHTDTR);
          node = node.right;
        }
      }
      // We have reached a terminal node...
      v.add(node.key);
      v.add(node.element);
      v.add(IntRBTArray.TERMINAL);
      if (addressStack.empty()) {
        node = null;
      } else {
        node = (IntRBTNode) nodeStack.pop();
        address = addressStack.pop();
        v.set(address, v.size() + offset);
      }
    } while (node != null);
    return v.toArray();
  }
View Full Code Here

      super();
      this.ch = ch;
      this.eh = eh;
      this.cas = cas;
      this.visited = new IntRedBlackTree();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      // this.sofaTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_SOFA);
      // this.annotationTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_ANNOTATION);
      this.listUtils = new ListUtils(cas, logger, eh);
      this.arrayAndListFSs = new IntRedBlackTree();
View Full Code Here

      this.cas = cas;
      this.queued = new IntRedBlackTree();
      this.duplicates = new IntRedBlackTree();
      this.numDuplicates = 0;
      this.dupVectors = new Vector<IntVector>();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      this.indexReps = new IntVector();
      this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType(
              cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA));
    }
View Full Code Here

      super();
      this.ch = ch;
      this.eh = eh;
      this.cas = cas;
      this.visited = new IntRedBlackTree();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      // this.sofaTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_SOFA);
      // this.annotationTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_ANNOTATION);
      this.listUtils = new ListUtils(cas, logger, eh);
      this.arrayAndListFSs = new IntRedBlackTree();
View Full Code Here

      super();
      this.ch = ch;
      this.eh = eh;
      this.cas = cas;
      this.visited = new IntRedBlackTree();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      // this.sofaTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_SOFA);
      // this.annotationTypeCode = cas.getTypeSystemImpl().getTypeCode(CAS.TYPE_NAME_ANNOTATION);
      this.listUtils = new ListUtils(cas, logger, eh);
      this.arrayAndListFSs = new IntRedBlackTree();
View Full Code Here

    IntVector v = new IntVector();
    // A stack for traversing the tree;
    Stack<IntRBTNode> nodeStack = new Stack<IntRBTNode>();
    // A stack for keeping addresses associated w/ the nodes on the
    // node stack.
    IntStack addressStack = new IntStack();
    IntRBTNode node = this;
    int address;
    do {
      while (node.left != null || node.right != null) {
        // While we have a non-terminal node...
        v.add(node.key);
        v.add(node.element);
        if (node.left != null) {
          if (node.right != null) {
            v.add(IntRBTArray.TWODTRS);
            addressStack.push(v.size());
            v.add(-1); // Placeholder.
            nodeStack.push(node.right);
          } else {
            v.add(IntRBTArray.LEFTDTR);
          }
          node = node.left;
        } else {
          // Because of the while loop, we know at this point that
          // node.right != null
          v.add(IntRBTArray.RIGHTDTR);
          node = node.right;
        }
      }
      // We have reached a terminal node...
      v.add(node.key);
      v.add(node.element);
      v.add(IntRBTArray.TERMINAL);
      if (addressStack.empty()) {
        node = null;
      } else {
        node = (IntRBTNode) nodeStack.pop();
        address = addressStack.pop();
        v.set(address, v.size() + offset);
      }
    } while (node != null);
    return v.toArray();
  }
View Full Code Here

      this.cas = cas;
      this.queued = new IntRedBlackTree();
      this.duplicates = new IntRedBlackTree();
      this.numDuplicates = 0;
      this.dupVectors = new Vector<IntVector>();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      this.indexReps = new IntVector();
      this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType(
              cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA));
    }
View Full Code Here

      this.cas = cas;
      this.queued = new IntRedBlackTree();
      this.duplicates = new IntRedBlackTree();
      this.numDuplicates = 0;
      this.dupVectors = new Vector();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      this.indexReps = new IntVector();
      this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType(
              cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA));
    }
View Full Code Here

      super();
      this.ch = ch;
      this.eh = eh;
      this.cas = cas;
      this.visited = new IntRedBlackTree();
      this.queue = new IntStack();
      this.indexedFSs = new IntVector();
      // this.sofaTypeCode = cas.ts.getTypeCode(CAS.TYPE_NAME_SOFA);
      // this.annotationTypeCode = cas.ts.getTypeCode(CAS.TYPE_NAME_ANNOTATION);
      this.listUtils = new ListUtils(cas, logger, eh);
      this.arrayAndListFSs = new IntRedBlackTree();
View Full Code Here

TOP

Related Classes of org.apache.uima.internal.util.IntStack

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.