Examples of typeInit()


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

      cas.getDocumentAnnotation().setBooleanValue(boolFeat, true);
      path = "/booleanFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Boolean.valueOf(true), featurePath.getBooleanValue(cas
            .getDocumentAnnotation()));
      assertEquals("true", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_BOOLEAN, featurePath.getTypClass(cas
View Full Code Here

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

      cas.getDocumentAnnotation().setByteValue(byteFeat, (byte) 127);
      path = "/byteFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(Byte.valueOf((byte) 127), featurePath.getByteValue(cas
            .getDocumentAnnotation()));
      assertEquals("127", featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(TypeClass.TYPE_CLASS_BYTE, featurePath.getTypClass(cas
View Full Code Here

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

      // test feature path not set
      String path = "/refFeature2";
      FeaturePath featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(TypeClass.TYPE_CLASS_FS, featurePath.getTypClass(cas
            .getDocumentAnnotation()));
      assertEquals(cas.getDocumentAnnotation().getType(), featurePath
            .getType(cas.getDocumentAnnotation()));
      assertEquals(null, featurePath.getValueAsString(cas
View Full Code Here

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

      // test feature path not set
      path = "/refFeature/refFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(null, featurePath.getTypClass(cas.getDocumentAnnotation()));
      assertEquals(null, featurePath.getType(cas.getDocumentAnnotation()));
      assertEquals(null, featurePath.getValueAsString(cas
            .getDocumentAnnotation()));
      assertEquals(null, featurePath.getFSValue(cas.getDocumentAnnotation()));
View Full Code Here

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

            cas.getDocumentAnnotation());
      path = "/refFeature/refFeature/stringFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(TypeClass.TYPE_CLASS_STRING, featurePath.getTypClass(cas
            .getDocumentAnnotation()));
      assertEquals(stringFeat.getRange(), featurePath.getType(cas
            .getDocumentAnnotation()));
View Full Code Here

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

            cas.getDocumentAnnotation());
      path = "/refFeature2/refFeature2/stringFeature";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(TypeClass.TYPE_CLASS_STRING, featurePath.getTypClass(cas
            .getDocumentAnnotation()));
      assertEquals(stringFeat.getRange(), featurePath.getType(cas
            .getDocumentAnnotation()));
View Full Code Here

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

      // test reference feature
      path = "/refFeature2/refFeature2";
      featurePath = new FeaturePathImpl();
      featurePath.initialize(path);
      assertEquals(path, featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(TypeClass.TYPE_CLASS_FS, featurePath.getTypClass(cas
            .getDocumentAnnotation()));
      assertEquals(cas.getDocumentAnnotation().getType(), featurePath
            .getType(cas.getDocumentAnnotation()));
View Full Code Here

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

      // test empty featurePath
      featurePath = new FeaturePathImpl();
      featurePath.initialize("");
      assertEquals("", featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(cas.getDocumentAnnotation().toString(), featurePath
            .getValueAsString(cas.getDocumentAnnotation()));

      // test "/" featurePath
      featurePath = new FeaturePathImpl();
View Full Code Here

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

      // test "/" featurePath
      featurePath = new FeaturePathImpl();
      featurePath.initialize("/");
      assertEquals("/", featurePath.getFeaturePath());
      featurePath.typeInit(cas.getDocumentAnnotation().getType());
      assertEquals(cas.getDocumentAnnotation().toString(), featurePath
            .getValueAsString(cas.getDocumentAnnotation()));

      // check init() with super type and call getValue() with subtype
      featurePath = new FeaturePathImpl();
View Full Code Here

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

      // check init() with super type and call getValue() with subtype
      featurePath = new FeaturePathImpl();
      featurePath.initialize("/stringFeature");
      Type testAnnotType = cas.getTypeSystem()
            .getType("uima.tt.TestAnnotation");
      featurePath.typeInit(testAnnotType);

      Type testAnnotSubType = cas.getTypeSystem().getType(
            "uima.tt.TestAnnotSub");
      AnnotationFS fs = cas.createAnnotation(testAnnotSubType, 0, 1);
      cas.addFsToIndexes(fs);
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.