Examples of ll_createFS()


Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    srcCasView.setDocumentText("This is a test");
    CAS destCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
    LowLevelCAS lowLevelSrcCasView = srcCasView.getLowLevelCAS();
    int typeCode = lowLevelSrcCasView.ll_getTypeSystem().ll_getCodeForType(
            srcCas.getAnnotationType());
    int destFsAddr = lowLevelSrcCasView.ll_createFS(typeCode);
    AnnotationFS fs = (AnnotationFS) lowLevelSrcCasView.ll_getFSForRef(destFsAddr);
    fs.setIntValue(srcCas.getBeginFeature(), 0);
    fs.setIntValue(srcCas.getEndFeature(), 4);
    assertEquals("This", fs.getCoveredText());
    srcCasView.addFsToIndexes(fs);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    lp.toString();

    LowLevelCAS llc = this.cas.getLowLevelCAS();
    LowLevelTypeSystem llts = llc.ll_getTypeSystem();
    final int tokenTypeCode = llts.ll_getCodeForType(this.tokenType);
    final int addr = llc.ll_createFS(tokenTypeCode);
    final int lemmaFeatCode = llts.ll_getCodeForFeature(this.lemmaFeat);
    llc.ll_setStringValue(addr, lemmaFeatCode, "test", true);
    assertTrue(llc.ll_getCharBufferValueSize(addr, lemmaFeatCode) == 4);

  }
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    srcCasView.setDocumentText("This is a test");
    CAS destCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
    LowLevelCAS lowLevelSrcCasView = srcCasView.getLowLevelCAS();
    int typeCode = lowLevelSrcCasView.ll_getTypeSystem().ll_getCodeForType(
            srcCas.getAnnotationType());
    int destFsAddr = lowLevelSrcCasView.ll_createFS(typeCode);
    AnnotationFS fs = (AnnotationFS) lowLevelSrcCasView.ll_getFSForRef(destFsAddr);
    fs.setIntValue(srcCas.getBeginFeature(), 0);
    fs.setIntValue(srcCas.getEndFeature(), 4);
    assertEquals("This", fs.getCoveredText());
    srcCasView.addFsToIndexes(fs);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

  public void testLowLevelCas() {
    LowLevelCAS cas = this.jcas.getLowLevelCas();
    LowLevelTypeSystem ts = cas.ll_getTypeSystem();
    final int annotType = ts.ll_getCodeForTypeName(annotationTypeName);
    final int addr = cas.ll_createFS(annotType);
    final int stringSetFeat = ts.ll_getCodeForFeatureName(annotationTypeName
  + TypeSystem.FEATURE_SEPARATOR + stringSetFeatureName);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue1);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue2);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue3);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    srcCasView.setDocumentText("This is a test");
    CAS destCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
    LowLevelCAS lowLevelSrcCasView = srcCasView.getLowLevelCAS();
    int typeCode = lowLevelSrcCasView.ll_getTypeSystem().ll_getCodeForType(
            srcCas.getAnnotationType());
    int destFsAddr = lowLevelSrcCasView.ll_createFS(typeCode);
    AnnotationFS fs = (AnnotationFS) lowLevelSrcCasView.ll_getFSForRef(destFsAddr);
    fs.setIntValue(srcCas.getBeginFeature(), 0);
    fs.setIntValue(srcCas.getEndFeature(), 4);
    assertEquals("This", fs.getCoveredText());
    srcCasView.addFsToIndexes(fs);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    lp.toString();

    LowLevelCAS llc = this.cas.getLowLevelCAS();
    LowLevelTypeSystem llts = llc.ll_getTypeSystem();
    final int tokenTypeCode = llts.ll_getCodeForType(this.tokenType);
    final int addr = llc.ll_createFS(tokenTypeCode);
    final int lemmaFeatCode = llts.ll_getCodeForFeature(this.lemmaFeat);
    llc.ll_setStringValue(addr, lemmaFeatCode, "test", true);
    assertTrue(llc.ll_getCharBufferValueSize(addr, lemmaFeatCode) == 4);

  }
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

    srcCasView.setDocumentText("This is a test");
    CAS destCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
    LowLevelCAS lowLevelSrcCasView = srcCasView.getLowLevelCAS();
    int typeCode = lowLevelSrcCasView.ll_getTypeSystem().ll_getCodeForType(
            srcCas.getAnnotationType());
    int destFsAddr = lowLevelSrcCasView.ll_createFS(typeCode);
    AnnotationFS fs = (AnnotationFS) lowLevelSrcCasView.ll_getFSForRef(destFsAddr);
    fs.setIntValue(srcCas.getBeginFeature(), 0);
    fs.setIntValue(srcCas.getEndFeature(), 4);
    assertEquals("This", fs.getCoveredText());
    srcCasView.addFsToIndexes(fs);
View Full Code Here

Examples of org.apache.uima.cas.impl.LowLevelCAS.ll_createFS()

  public void testLowLevelCas() {
    LowLevelCAS cas = this.jcas.getLowLevelCas();
    LowLevelTypeSystem ts = cas.ll_getTypeSystem();
    final int annotType = ts.ll_getCodeForTypeName(annotationTypeName);
    final int addr = cas.ll_createFS(annotType);
    final int stringSetFeat = ts.ll_getCodeForFeatureName(annotationTypeName
  + TypeSystem.FEATURE_SEPARATOR + stringSetFeatureName);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue1);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue2);
    cas.ll_setStringValue(addr, stringSetFeat, definedValue3);
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.