Package org.apache.uima.cas.impl
Class CasSeqAddrMaps
java.lang.Object
org.apache.uima.cas.impl.CasSeqAddrMaps
Used by Binary serialization form 4 and 6
Manage the conversion of FSs to relative sequential index number, and back Manage the difference
in two type systems both size of the FSs and handling excluded types
During serialization, these maps are constructed before serialization. During deserialization,
these maps are constructed while things are being deserialized, and then used in a "fixup" call
at the end. This allows for forward references.
For delta deserialization, the base part of these maps (for below-the-line) is constructed by
scanning up to the mark.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private final Int2IntRBT
map from source id to target id.map from a target FS sequence nbr to a source id. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new FS id - done during prescan of source during serialization Must call in heap scan ordervoid
addSrcFsForTgt
(TOP srcFs, boolean inSrc) Called during deserialize to incrementally add(package private) CasSeqAddrMaps
copy()
int
getSrcFsFromTgtSeq
(int seq) int
getTgtSeqFromSrcAddr
(int itemAddr)
-
Field Details
-
tgtId2SrcFs
map from a target FS sequence nbr to a source id. value is 0 if the target instance doesn't exist in the source (this doesn't occur for receiving remote CASes back (because src ts is always a superset of tgt ts), but can occur while deserializing from Disk.) index 0 is reserved for null -
srcId2TgtId
map from source id to target id. if source is not in target, value = -1; -
nextTgt
private int nextTgt
-
-
Constructor Details
-
CasSeqAddrMaps
public CasSeqAddrMaps() -
CasSeqAddrMaps
-
-
Method Details
-
addItemId
Add a new FS id - done during prescan of source during serialization Must call in heap scan order- Parameters:
srcFs
- -tgtId
- -inTarget
- true if this type is in the target
-
addSrcFsForTgt
Called during deserialize to incrementally add- Parameters:
srcFs
- -inSrc
- -
-
getSrcFsFromTgtSeq
- Parameters:
seq
- -- Returns:
- 0 means target seq doesn't exist in source CAS
-
getTgtSeqFromSrcAddr
public int getTgtSeqFromSrcAddr(int itemAddr) - Parameters:
itemAddr
- -- Returns:
- -1 if src addr not in target seq
-
getNumberSrcFss
public int getNumberSrcFss() -
copy
CasSeqAddrMaps copy()
-