Package org.apache.uima.cas.impl

Examples of org.apache.uima.cas.impl.CASImpl


    }
    return false;
  }

  int getStart() {
    CASImpl cas = this.fSTreeModel.getCas();
    if (isAnnotation()) {
      final FeatureImpl feat1 = (FeatureImpl) cas.getBeginFeature();
      return cas.getHeapValue((int) this.addr + cas.getFeatureOffset(feat1.getCode()));
    }
    return -1;
  }
View Full Code Here


    }
    return -1;
  }

  int getEnd() {
    CASImpl cas = this.fSTreeModel.getCas();
    if (isAnnotation()) {
      final FeatureImpl feat1 = (FeatureImpl) cas.getEndFeature();
      return cas.getHeapValue((int) this.addr + cas.getFeatureOffset(feat1.getCode()));
    }
    return -1;
  }
View Full Code Here

        progressMonitor.beginTask("", 5);
        progressMonitor.subTask("Output going to '" + outputDirectory + "'");
        progressMonitor.subTask(getString("ReadingDescriptorAndCreatingTypes",
                new Object[] { inputFile }));
        // code to read xml and make cas type instance
        CASImpl casLocal = null;
        // handle classpath
        try {
          XMLInputSource in = new XMLInputSource(file);
          XMLizable specifier = UIMAFramework.getXMLParser().parse(in);
View Full Code Here

      CAS localCas = jcas.getCas();
      assertTrue(localCas == this.cas);
      LowLevelCAS ll_cas = jcas.getLowLevelCas();
      assertTrue(ll_cas == this.cas);
      CASImpl casImpl = jcas.getCasImpl();
      assertTrue(casImpl == this.cas);
      TOP_Type type = jcas.getType(org.apache.uima.jcas.tcas.Annotation.type);
      assertTrue(type instanceof org.apache.uima.jcas.tcas.Annotation_Type);
      type = jcas.getType(Annotation.typeIndexID);
      assertTrue(type instanceof Annotation_Type);
View Full Code Here

   * Create a new CASMgr object.
   *
   * @return A new CASMgr object.
   */
  public static CASMgr createCAS() {
    return new CASImpl();
  }
View Full Code Here

   *          have a major performance impact. As a very rough guideline, this number should not be
   *          smaller than the number of characters in documents you are processing.
   * @return A new CASMgr object.
   */
  public static CASMgr createCAS(int initialHeapSize) {
    return new CASImpl(initialHeapSize);
  }
View Full Code Here

   */
  public static CASMgr createCAS(int initialHeapSize, TypeSystem ts) {
    if (ts == null) {
      throw new NullPointerException("TypeSystem");
    }
    return new CASImpl((TypeSystemImpl) ts, initialHeapSize);
  }
View Full Code Here

   */
  public static CASMgr createCAS(TypeSystem ts) {
    if (ts == null) {
      throw new NullPointerException("TypeSystem");
    }
    return new CASImpl((TypeSystemImpl) ts, CASImpl.DEFAULT_INITIAL_HEAP_SIZE);
  }
View Full Code Here

      CAS cas1 = CasCreationUtils.createCas(l);
      cas1.setDocumentText("foo");
      CASCompleteSerializer ser = Serialization.serializeCASComplete((CASMgr) cas1);

      CAS tcas2 = CasCreationUtils.createCas(new TypeSystemDescription_impl(), null, null);
      CASImpl cas2 = ((CASImpl) tcas2).getBaseCAS();
      tcas2.setDocumentText("bar");

      // reinit
      cas2.reinit(ser);
      CAS tcas3 = cas2.getCurrentView();

      assertTrue(tcas2 == tcas3);
      assertNotNull(cas1.getTypeSystem().getType("NamedEntity"));
      assertNotNull(tcas3.getTypeSystem().getType("NamedEntity"));
View Full Code Here

   * @deprecated As of v2.0, use {@link JCasImpl#createView(String)} to create a view, which will
   *             also create the Sofa for that view.
   */
  public Sofa(JCas jcas, SofaID ID, String mimeType) {
    super(jcas);
    final CASImpl casImpl = jcasType.casImpl;
    casImpl.addSofa(casImpl.createFS(this.addr), ID.getSofaID(), mimeType);
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.cas.impl.CASImpl

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.