Package org.apache.uima.cas

Examples of org.apache.uima.cas.CAS.release()


    t = RutaTestUtils.getTestType(cas, 2);
    ai = cas.getAnnotationIndex(t);
    assertEquals(0, ai.size());

    if (cas != null) {
      cas.release();
    }

  }
}
View Full Code Here


    assertEquals(1, ai.size());
    iterator = ai.iterator();
    assertEquals("H 1 2 3, i 1 2 3, i 1 2 3, i 1 2 3,", iterator.next().getCoveredText());
   
    if(cas != null) {
      cas.release();
    }
  }
}
View Full Code Here

    assertEquals("A rule is composed of a sequence of rule elements and a rule element essentially consists of four parts: A matching condition, an optional quantifier, a list of conditions and a list of actions", iterator.next().getCoveredText());
    assertEquals("The matching condition is typically a type of an annotation by which the rule element matches on the covered text of one of those annotations", iterator.next().getCoveredText());
   
   
    if (cas != null) {
      cas.release();
    }

  }
}
View Full Code Here

          if (monitor.isCanceled()) {
            return;
          }
        }

        cleanCas.release();
        project.getFolder(cleanInputPath.makeRelativeTo(project.getLocation())).refreshLocal(
                IResource.DEPTH_INFINITE, new NullProgressMonitor());
      } catch (Exception e) {
        RutaAddonsPlugin.error(e);
      }
View Full Code Here

      monitor.worked(1);
      project.getFolder(path2Result.makeRelativeTo(project.getLocation())).refreshLocal(
              IResource.DEPTH_INFINITE, new NullProgressMonitor());
      runCas.release();
      goldCas.release();
      resultCas.release();
    }

    private CAS getEmptyCas(Object descriptor) throws ResourceInitializationException,
            InvalidXMLException {
      CAS testCas = null;
View Full Code Here

          treePath = oldPath;
        }
      }
      final TreeSelection firstSelection = new TreeSelection(treePath);
     
      cas.release();
      composite.setOldDocs(docs);
      composite.getDisplay().asyncExec(new Runnable() {
        public void run() {
          TreeViewer treeView = composite.getTreeViewer();
          treeView.setInput(root);
View Full Code Here

//    }
//    catch (CASAdminException e) {
//      //expected
//    }

    cas.release()// should work, release unlocks things.
 
    cas = mgr.getCas("test");
    ((CASImpl)cas).enableReset(true);
    cas.release();
View Full Code Here

    cas.release()// should work, release unlocks things.
 
    cas = mgr.getCas("test");
    ((CASImpl)cas).enableReset(true);
    cas.release();

  }
 
}
View Full Code Here

      while (iter.hasNext()) {
        CAS cas = iter.next();
        // mFlowControllerContainer.dropCas(cas);
        if (cas != mInputCas) // don't release the input CAS, it's caller's responsibility
        {
          cas.release();
        }
      }
      //clear the active CASes list, to guard against ever trying to
      //reuse these CASes or trying to release them a second time.
      activeCASes.clear();      
View Full Code Here

      cas.setDocumentText("Line one\nLine two\nLine three");
      CasIterator iter = ae.processAndOutputNewCASes(cas);
      assertTrue(iter.hasNext());
      CAS outCas = iter.next();
      assertEquals("Line one", outCas.getDocumentText());
      outCas.release();
      assertTrue(iter.hasNext());
      outCas = iter.next();
      assertEquals("Line two", outCas.getDocumentText());
      outCas.release();
      assertTrue(iter.hasNext());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.