Package org.apache.uima.cas.impl
Class ListUtils
java.lang.Object
org.apache.uima.cas.impl.ListUtils
Utilities for dealing with CAS List types.
The many places operations-to-set-values are done to update feature values,
which use the notIndexed form, because
list elements cannot be part of an index key.
Creation methods don't journal, these are guaranteed to be above the line.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal intfinal intfinal int -
Constructor Summary
ConstructorsConstructorDescriptionListUtils(CASImpl aCASImpl, Logger aLogger, ErrorHandler aErrorHandler) Creates a new ListUtils object. -
Method Summary
Modifier and TypeMethodDescriptionvoidanyListToOutput(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds, org.apache.uima.cas.impl.ListUtils.ListOutput out) Go thru a list, calling the ListOutput append method to append strings (to arrays, or string buffers) Stop at the end node, or a null, or a loop (no error reported here)String[]anyListToStringArray(int curNode, XmiSerializationSharedData sharedData) anyListToStringList(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds) intcreateFloatList(List<String> stringValues) intcreateFsList(List<String> stringValues, IntVector fsAddresses) intcreateIntList(List<String> stringValues) intcreateStringList(List<String> stringValues) int[]fsListToAddressArray(int curNode) intgetEListType(int type) intgetHeadFeatCode(int type) intgetLength(int type, int addr) intgetLength(int type, int addr, int neListType, int tailFeat) intgetNeListType(int type) intgetTailFeatCode(int type) booleanisFloatListType(int type) booleanisFsListType(int type) booleanisIntListType(int type) booleanisListType(int type) booleanisStringListType(int type) intupdateFloatList(int addr, List<String> stringValues) intupdateFsList(int addr, List<String> stringValues, IntVector fsAddresses) intupdateIntList(int addr, List<String> stringValues) intupdateStringList(int addr, List<String> stringValues)
-
Field Details
-
neIntListType
public final int neIntListType -
neFloatListType
public final int neFloatListType -
neStringListType
public final int neStringListType -
neFsListType
public final int neFsListType
-
-
Constructor Details
-
ListUtils
Creates a new ListUtils object.- Parameters:
aCASImpl- the CAS that this ListUtils will operate onaLogger- optional logger, to receive warning messagesaErrorHandler- optional SAX ErrorHandler, to receive warning messages
-
-
Method Details
-
getHeadFeatCode
public int getHeadFeatCode(int type) -
getTailFeatCode
public int getTailFeatCode(int type) -
getNeListType
public int getNeListType(int type) -
getEListType
public int getEListType(int type) -
isIntListType
public boolean isIntListType(int type) -
isFloatListType
public boolean isFloatListType(int type) -
isStringListType
public boolean isStringListType(int type) -
isFsListType
public boolean isFsListType(int type) -
isListType
public boolean isListType(int type) -
getLength
public int getLength(int type, int addr) -
getLength
public int getLength(int type, int addr, int neListType, int tailFeat) -
fsListToAddressArray
- Throws:
SAXException
-
createIntList
-
createFloatList
-
createStringList
-
createFsList
-
updateIntList
- Throws:
SAXException
-
updateFloatList
- Throws:
SAXException
-
updateFsList
public int updateFsList(int addr, List<String> stringValues, IntVector fsAddresses) throws SAXException - Throws:
SAXException
-
updateStringList
- Throws:
SAXException
-