public class CasSerializerSupport extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CasSerializerSupport.CasDocSerializer
Use an inner class to hold the data for serializing a CAS.
|
static class |
CasSerializerSupport.CasSerializerSupportSerialize |
| Modifier and Type | Field and Description |
|---|---|
static Comparator<TypeImpl> |
COMPARATOR_SHORT_TYPENAME
Comparator that just uses short name Public for access by JsonCasSerializer where it's needed
for a binary search https://issues.apache.org/jira/browse/UIMA-5171
|
static AtomicInteger |
errorCount |
boolean |
isFormattedOutput |
static int |
PP_ELEMENTS |
static int |
PP_LINE_LENGTH |
static int |
TYPE_CLASS_FLOATLIST |
static int |
TYPE_CLASS_FSLIST |
static int |
TYPE_CLASS_INTLIST |
static int |
TYPE_CLASS_STRINGLIST |
| Constructor and Description |
|---|
CasSerializerSupport()
C O N S T R U C T O R S *
|
| Modifier and Type | Method and Description |
|---|---|
static int |
classifyType(TypeImpl ti)
Classifies a type.
|
TypeSystemImpl |
getFilterTypes() |
CasSerializerSupport |
setErrorHandler(ErrorHandler eh)
set an error handler to receive information about errors
|
CasSerializerSupport |
setFilterTypes(TypeSystemImpl ts)
pass in a type system to use for filtering what gets serialized; only those types and features
which are defined this type system are included.
|
CasSerializerSupport |
setPrettyPrint(boolean pp)
set or reset the pretty print flag (default is false)
|
public static final int TYPE_CLASS_INTLIST
public static final int TYPE_CLASS_FLOATLIST
public static final int TYPE_CLASS_STRINGLIST
public static final int TYPE_CLASS_FSLIST
public static int PP_LINE_LENGTH
public static int PP_ELEMENTS
public static AtomicInteger errorCount
public static final Comparator<TypeImpl> COMPARATOR_SHORT_TYPENAME
public boolean isFormattedOutput
public CasSerializerSupport setPrettyPrint(boolean pp)
pp - true to do pretty printing of outputpublic CasSerializerSupport setFilterTypes(TypeSystemImpl ts)
ts - the filterpublic TypeSystemImpl getFilterTypes()
public CasSerializerSupport setErrorHandler(ErrorHandler eh)
eh - the error handlerpublic static final int classifyType(TypeImpl ti)
The LowLevelCAS.ll_getTypeClass(int) method classifies primitives and array types, but
does not have a special classification for list types, which we need for XMI serialization.
Therefore, in addition to the type codes defined on LowLevelCAS, this method can return
one of the type codes TYPE_CLASS_INTLIST, TYPE_CLASS_FLOATLIST, TYPE_CLASS_STRINGLIST, or
TYPE_CLASS_FSLIST.
ti - the type to classifyLowLevelCAS or on this interface.Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.