Class CASMgrSerializer

  • All Implemented Interfaces:
    Serializable

    public class CASMgrSerializer
    extends Object
    implements 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:
    Serialized Form
    • Field Detail

      • typeOrder

        public int[] typeOrder
      • indexNames

        public String[] indexNames
        The index identifiers. Note that more than one identifier can refer to the same index.
      • nameToIndexMap

        public int[] nameToIndexMap
        A mapping from index names to index IDs. We have that indexNames.length == nameToIndexMap.length and for each i in nameToIndexMap, 0 <= i < indexTypes.length.
      • indexingStrategy

        public int[] indexingStrategy
        For each index, the indexing strategy of that index. Current options are SORTED_INDEX, SET_INDEX and BAG_INDEX. indexingStrategy.length == indexTypes.length.
      • comparatorIndex

        public int[] comparatorIndex
        For each index, where the corresponding comparator starts in the comparators field. comparatorIndex.length == indexTypes.length.
      • comparators

        public int[] comparators
        Encodings 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 with STANDARD_COMPARE and REVERSE_STANDARD_COMPARE.
      • typeNames

        public String[] typeNames
        A list of type names (symbol table). fs-typed arrays have names XXXX[]. Note: numbering of types starts at 1, and we index the names according to their internal code. That means that typeNames[0] == null.
      • featureNames

        public String[] featureNames
        A list of feature names (symbol table). Note: numbering of features starts at 1, , and we index the names according to their internal code. That means that featureNames[0] == null.
      • typeInheritance

        public int[] typeInheritance
        Type 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[] featDecls
        Feature declarations. For each feature code i (which is an integer ≥ 1), featDecls[(i-1)*3] is the domain type code, featDecls[(i-1)*3+1] is the range type code, and featDecls[(i-1)*3+2] is the multipleReferencesAllowed flag (0 or 1).
      • topTypeCode

        public int topTypeCode
        The internal code of the top type. Optional, used for sanity checks.
      • featureOffsets

        public int[] featureOffsets
        The 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[] stringSubtypes
        A list of type codes for the string subtypes.
      • stringSubtypeValues

        public String[] stringSubtypeValues
        The string values for the string subtypes. Start and end postions for the values for the individual types are in stringSubtypeValuePos.
      • stringSubtypeValuePos

        public int[] stringSubtypeValuePos
        The start positions of the string value subarrays of stringSubtypeValues. stringSubtypeValuePos.length == stringSubtypes.length. For each i < stringSubtypes.length, stringSubtypeValuePos[i] is the start of the string values for stringSubtypes[i].
      • source

        public int source
        Set this appropriately.
    • Constructor Detail

      • CASMgrSerializer

        public CASMgrSerializer()
        Constructor for CASMgrSerializer.
    • Method Detail

      • addIndexRepository

        public void addIndexRepository​(FSIndexRepositoryImpl ir)
        Serialize index repository.
        Parameters:
        ir - The index repository to be serialized.
      • hasIndexRepository

        public boolean hasIndexRepository()