Package org.apache.uima.cas.impl
Class CASMgrSerializer
java.lang.Object
org.apache.uima.cas.impl.CASMgrSerializer
- All Implemented Interfaces:
Serializable
Container for serialized CAS typing information. Contains information about the type system, as
well as the index repository. If more than one CAS that use the same type system and index
repository need to be serialized, this information needs to be serialized only once.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionint[]
For each index, where the corresponding comparator starts in thecomparators
field.int[]
Encodings of the actual comparators.int[]
Feature declarations.String[]
A list of feature names (symbol table).int[]
The offsets for features.int[]
For each index, the indexing strategy of that index.String[]
The index identifiers.int[]
A mapping from index names to index IDs.int
Set this appropriately.static final int
static final int
int[]
A list of type codes for the string subtypes.int[]
The start positions of the string value subarrays ofstringSubtypeValues
.String[]
The string values for the string subtypes.int
The internal code of the top type.int[]
Type inheritance information: for each type other than the top type, we provide the parent in the inheritance scheme.String[]
A list of type names (symbol table). fs-typed arrays have names XXXX[].int[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Serialize index repository.void
Deserialize the index specification and type ordering information in this class instance into the index repository and cas and type system.boolean
-
Field Details
-
SOURCE_JEDI
public static final int SOURCE_JEDI- See Also:
-
SOURCE_TAF
public static final int SOURCE_TAF- See Also:
-
typeOrder
public int[] typeOrder -
indexNames
The index identifiers. Note that more than one identifier can refer to the same index. -
nameToIndexMap
public int[] nameToIndexMapA mapping from index names to index IDs. We have thatindexNames.length == nameToIndexMap.length
and for eachi
innameToIndexMap
,0 <= i < indexTypes.length
. -
indexingStrategy
public int[] indexingStrategyFor each index, the indexing strategy of that index. Current options areSORTED_INDEX
,SET_INDEX
andBAG_INDEX
.indexingStrategy.length == indexTypes.length
. -
comparatorIndex
public int[] comparatorIndexFor each index, where the corresponding comparator starts in thecomparators
field.comparatorIndex.length == indexTypes.length
. -
comparators
public int[] comparatorsEncodings of the actual comparators. Each comparator occupies an odd number of cells: one for the type, then feature/comparison pairs. The feature is encoded with its type system code, and comparison operations are encoded withSTANDARD_COMPARE
andREVERSE_STANDARD_COMPARE
. -
typeNames
A list of type names (symbol table). fs-typed arrays have names XXXX[]. Note: numbering of types starts at1
, and we index the names according to their internal code. That means thattypeNames[0] == null
. -
featureNames
A list of feature names (symbol table). Note: numbering of features starts at1
, , and we index the names according to their internal code. That means thatfeatureNames[0] == null
. -
typeInheritance
public int[] typeInheritanceType inheritance information: for each type other than the top type, we provide the parent in the inheritance scheme. We use the internal type codes for indexing, which means that cells 0 (no type) and 1 (top type doesn't inherit from anything) are not used. -
featDecls
public int[] featDeclsFeature declarations. For each feature codei
(which is an integer ≥ 1),featDecls[(i-1)*3]
is the domain type code,featDecls[(i-1)*3+1]
is the range type code, andfeatDecls[(i-1)*3+2]
is the multipleReferencesAllowed flag (0 or 1). -
topTypeCode
public int topTypeCodeThe internal code of the top type. Optional, used for sanity checks. -
featureOffsets
public int[] featureOffsetsThe offsets for features. Optional, used for sanity checks. Since feature numbering starts at 1, the length of the array is 1 + number of features. -
stringSubtypes
public int[] stringSubtypesA list of type codes for the string subtypes. -
stringSubtypeValues
The string values for the string subtypes. Start and end postions for the values for the individual types are instringSubtypeValuePos
. -
stringSubtypeValuePos
public int[] stringSubtypeValuePosThe start positions of the string value subarrays ofstringSubtypeValues
.stringSubtypeValuePos.length == stringSubtypes.length
. For eachi < stringSubtypes.length
,stringSubtypeValuePos[i]
is the start of the string values forstringSubtypes[i]
. -
source
public int sourceSet this appropriately.
-
-
Constructor Details
-
CASMgrSerializer
public CASMgrSerializer()Constructor for CASMgrSerializer.
-
-
Method Details
-
addIndexRepository
Serialize index repository.- Parameters:
ir
- The index repository to be serialized.
-
addTypeSystem
-
getTypeSystem
-
getIndexRepository
Deserialize the index specification and type ordering information in this class instance into the index repository and cas and type system.- Parameters:
cas
- -- Returns:
- -
-
hasIndexRepository
public boolean hasIndexRepository()
-