[ 
https://issues.apache.org/jira/browse/UIMA-6381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Eckart de Castilho updated UIMA-6381:
---------------------------------------------
    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.

{code}
  @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);
  }
{code}

 !Screenshot 2021-08-05 at 11.35.42.png|width=100%! 

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.

 !Screenshot 2021-08-05 at 11.49.57.png|width=50%! 

  was:
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.

{code}
  @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);
  }
{code}

 !Screenshot 2021-08-05 at 11.35.42.png|width=100%! 

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.

 !Screenshot 2021-08-05 at 11.49.57.png|width=100%! 


> Component type for FSList types not retained
> --------------------------------------------
>
>                 Key: UIMA-6381
>                 URL: https://issues.apache.org/jira/browse/UIMA-6381
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 3.2.0SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>         Attachments: Screenshot 2021-08-05 at 11.35.42.png, Screenshot 
> 2021-08-05 at 11.49.57.png
>
>
> 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.
> {code}
>   @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);
>   }
> {code}
>  !Screenshot 2021-08-05 at 11.35.42.png|width=100%! 
> 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.
>  !Screenshot 2021-08-05 at 11.49.57.png|width=50%! 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to