Hi Jörn,
> Does LowLevelTypeSystem.getStringSet simply return an empty array in the case
> someone defined a string subtype but does not define allowed values? Or is it
> possible to define a string subtype with an empty set of allowed values?
It is possible to define a string sub-type without any allowed values and it
this case you get an empty array. I used this little test case:
TypeSystemDescription tsd = TypeSystemDescriptionFactory
.createTypeSystemDescriptionFromPath("TypeSystem.xml");
CAS cas = CasCreationUtils.createCas(tsd, null, null);
ResourceSpecifierFactory factory =
UIMAFramework.getResourceSpecifierFactory();
TypeSystem typeSystem = cas.getTypeSystem();
Type type = typeSystem.getType("POS");
// check for string subtypes
LowLevelTypeSystem lts = typeSystem.getLowLevelTypeSystem();
final int typeCode = lts.ll_getCodeForType(type);
String[] strings = lts.ll_getStringSet(typeCode);
System.out.println(strings.length);
for (int i = 0; i < strings.length; i++) {
System.out.println(strings[i]);
}
Cheers,
Richard
--
-------------------------------------------------------------------
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab
FB 20 Computer Science Department
Technische Universität Darmstadt
Hochschulstr. 10, D-64289 Darmstadt, Germany
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
[email protected]
www.ukp.tu-darmstadt.de
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
-------------------------------------------------------------------