Package org.apache.uima.cas.impl
Class ListUtils
- java.lang.Object
-
- org.apache.uima.cas.impl.ListUtils
-
public class ListUtils extends java.lang.ObjectUtilities 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
Fields Modifier and Type Field Description intneFloatListTypeintneFsListTypeintneIntListTypeintneStringListType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidanyListToOutput(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)java.lang.String[]anyListToStringArray(int curNode, XmiSerializationSharedData sharedData)java.util.List<java.lang.String>anyListToStringList(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds)intcreateFloatList(java.util.List<java.lang.String> stringValues)intcreateFsList(java.util.List<java.lang.String> stringValues, IntVector fsAddresses)intcreateIntList(java.util.List<java.lang.String> stringValues)intcreateStringList(java.util.List<java.lang.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, java.util.List<java.lang.String> stringValues)intupdateFsList(int addr, java.util.List<java.lang.String> stringValues, IntVector fsAddresses)intupdateIntList(int addr, java.util.List<java.lang.String> stringValues)intupdateStringList(int addr, java.util.List<java.lang.String> stringValues)
-
-
-
Constructor Detail
-
ListUtils
public ListUtils(CASImpl aCASImpl, Logger aLogger, org.xml.sax.ErrorHandler aErrorHandler)
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 Detail
-
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)
-
anyListToOutput
public void anyListToOutput(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)- Parameters:
curNode- -sharedData- -cds- -out- -
-
anyListToStringArray
public java.lang.String[] anyListToStringArray(int curNode, XmiSerializationSharedData sharedData) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
anyListToStringList
public java.util.List<java.lang.String> anyListToStringList(int curNode, XmiSerializationSharedData sharedData, CasSerializerSupport.CasDocSerializer cds)
-
fsListToAddressArray
public int[] fsListToAddressArray(int curNode) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
createIntList
public int createIntList(java.util.List<java.lang.String> stringValues)
-
createFloatList
public int createFloatList(java.util.List<java.lang.String> stringValues)
-
createStringList
public int createStringList(java.util.List<java.lang.String> stringValues)
-
createFsList
public int createFsList(java.util.List<java.lang.String> stringValues, IntVector fsAddresses)
-
updateIntList
public int updateIntList(int addr, java.util.List<java.lang.String> stringValues) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
updateFloatList
public int updateFloatList(int addr, java.util.List<java.lang.String> stringValues) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
updateFsList
public int updateFsList(int addr, java.util.List<java.lang.String> stringValues, IntVector fsAddresses) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
updateStringList
public int updateStringList(int addr, java.util.List<java.lang.String> stringValues) throws org.xml.sax.SAXException- Throws:
org.xml.sax.SAXException
-
-