Examples of typeInit()


Examples of org.apache.uima.cas.FeaturePath.typeInit()

      intArrayFS.set(2, 343);
      cas.getDocumentAnnotation().setFeatureValue(intArrayFeat, intArrayFS);
      path = "/intArray";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(intArrayFS, featurePath.getFSValue(cas
            .getDocumentAnnotation()));
      assertEquals("14,0,343", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_INTARRAY, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setFeatureValue(booleanArrayFeat,
            booleanArrayFS);
      path = "/booleanArray";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(booleanArrayFS, featurePath.getFSValue(cas
            .getDocumentAnnotation()));
      assertEquals("true,false,true", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_BOOLEANARRAY, featurePath
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      byteArrayFS.set(2, (byte) 11);
      cas.getDocumentAnnotation().setFeatureValue(byteArrayFeat, byteArrayFS);
      path = "/byteArray";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(byteArrayFS, featurePath.getFSValue(cas
            .getDocumentAnnotation()));
      assertEquals("23,47,11", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_BYTEARRAY, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      fsArrayFS.toStringArray();
      cas.getDocumentAnnotation().setFeatureValue(fsArrayFeat, fsArrayFS);
      path = "/fsArray";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(fsArrayFS, featurePath.getFSValue(cas
            .getDocumentAnnotation()));
      assertTrue(featurePath.getValueAsString(cas.getDocumentAnnotation())
            .indexOf("11") > 0);
      assertEquals(TypeClass.TYPE_CLASS_FSARRAY, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setStringValue(stringFeat, "TestString");
      String path = "/stringFeature";
      FeaturePath featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals("TestString", featurePath.getStringValue(cas
            .getDocumentAnnotation()));
      assertEquals("TestString", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_STRING, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setShortValue(shortFeat, (short) 12);
      path = "/shortFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Short.valueOf((short) 12), featurePath.getShortValue(cas
            .getDocumentAnnotation()));
      assertEquals("12", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_SHORT, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setFloatValue(floatFeat, 1.12f);
      path = "/floatFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Float.valueOf(1.12f), featurePath.getFloatValue(cas
            .getDocumentAnnotation()));
      assertEquals("1.12", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_FLOAT, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setDoubleValue(doubleFeat, 100.5);
      path = "/doubleFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Double.valueOf(100.5), featurePath.getDoubleValue(cas
            .getDocumentAnnotation()));
      assertEquals("100.5", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_DOUBLE, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setLongValue(longFeat, 2000);
      path = "/longFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Long.valueOf(2000), featurePath.getLongValue(cas
            .getDocumentAnnotation()));
      assertEquals("2000", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_LONG, featurePath.getTypClass(cas
View Full Code Here

Examples of org.apache.uima.cas.FeaturePath.typeInit()

      cas.getDocumentAnnotation().setIntValue(intFeat, 5);
      path = "/intFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Integer.valueOf(5), featurePath.getIntValue(cas
            .getDocumentAnnotation()));
      assertEquals("5", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_INT, featurePath.getTypClass(cas
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.