Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.0SDK
-
None
-
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.