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

Component type for FSList types not retained

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.0SDK
    • None
    • Core Java Framework
    • None

    Description

      A element type that is defined on a FSList-typed feature is not retained when the type system description is later extracted from the type system of a CAS.

        @Test
        public void test() throws Exception {
          TypeSystemDescription tsd = UIMAFramework.getResourceSpecifierFactory()
                  .createTypeSystemDescription();
          TypeDescription td = tsd.addType("Type", null, CAS.TYPE_NAME_ANNOTATION);
          FeatureDescription expected = td.addFeature("feature", null, CAS.TYPE_NAME_FS_LIST,
                  CAS.TYPE_NAME_ANNOTATION, null);
          CAS cas = CasCreationUtils.createCas(tsd, null, null, null);
          TypeSystem ts = cas.getTypeSystem();
          FeatureDescription actual = TypeSystemUtil.type2TypeDescription(ts.getType("Type"), ts)
                  .getFeatures()[0];
          assertThat(actual).isEqualTo(expected);
        }
      

      It is not entirely clear if this is a bug or if it is by design. However, since the graphical type system editor for Eclipse offers setting an element type of FSList features, it seems more like a bug.

      Attachments

        1. Screenshot 2021-08-05 at 11.35.42.png
          87 kB
          Richard Eckart de Castilho
        2. Screenshot 2021-08-05 at 11.49.57.png
          88 kB
          Richard Eckart de Castilho

        Activity

          People

            Unassigned Unassigned
            rec Richard Eckart de Castilho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: