Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5257

uimaFIT/uv3 accomodation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0uimaFIT
    • uimaFIT
    • None

    Description

      These changes were needed to make the tests run in uimaFIT. I think all of these are backward OK with V2.

      CasDumpWriterTest

      The "toString" for FeatureStructures writes the id as well, so that needs to be stripped. e.g. FS "Foo" is printed as "Foo:17".
      After line 55, insert:

      // uima v3 writes "Uima-type-name:nnnnn" delete the :nnnnn to make it the same as v2
      actual = actual.replaceAll("(\\w*)\\:
      d

      {1,}

      (
      s)", "$1$2");

      This same fix needs to be applied multiple places. here are the others:

      • JCasBuilderTest, after line 69
      • CasDumpWriterTest (in uimafit-legacy-support)
      • JCasBuilderTest (in uimafit-legacy-support)

      =================
      in FSUtilTest: there's a compare test for the two styles of Annotation class in V2: "Annotation" and "AnnotationImpl". In V3, there's only one style so this variation testing could be skipped. Better yet, it can be written so it works in V2 and V3, by changing the compare of the feature value's class-name to a constant, to testing that the feature value is an "instanceof" AnnotationImpl (in the 2nd test). The first test, seeing if the feature value's classname is "org.apache.uima.jcas.tcas.Annotation" is still valid.

      This test happens in two places in FSUtilTest, both need updating.

      Attachments

        Activity

          People

            rec Richard Eckart de Castilho
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: