MPXJ: Microsoft Project Exchange

net.sf.mpxj.mpp
Class AbstractVarMeta

Package class diagram package AbstractVarMeta
java.lang.Object
  extended by net.sf.mpxj.mpp.MPPComponent
      extended by net.sf.mpxj.mpp.AbstractVarMeta
All Implemented Interfaces:
VarMeta
Direct Known Subclasses:
VarMeta12, VarMeta9

abstract class AbstractVarMeta
extends MPPComponent
implements VarMeta

This class reads in the data from a VarMeta block. This block contains meta data about variable length data items stored in a Var2Data block. The meta data allows the size of the Var2Data block to be determined, along with the number of data items it contains, identifiers for each item, and finally the offset of each item within the block.


Field Summary
protected  int m_dataSize
           
protected  int m_itemCount
           
protected  int[] m_offsets
           
protected  java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> m_table
           
protected  int m_unknown1
           
protected  int m_unknown2
           
protected  int m_unknown3
           
 
Constructor Summary
AbstractVarMeta()
           
 
Method Summary
 int getDataSize()
          This method retrieves the size of the Var2Data block.
 int getItemCount()
          This method retrieves the number of items in the Var2Data block.
 int getOffset(int index)
          This method retrieves the offset of the data item at the position defined by the index parameter.
 java.lang.Integer getOffset(java.lang.Integer id, java.lang.Integer type)
          This method retrieves the offset of a given entry in the Var2Data block.
 java.util.Set<java.lang.Integer> getTypes(java.lang.Integer id)
          Retrieves a set containing the types defined in the var data for a given ID.
 java.lang.Integer[] getUniqueIdentifierArray()
          This method returns an array containing all of the unique identifiers for which data has been stored in the Var2Data block.
 java.util.Set<java.lang.Integer> getUniqueIdentifierSet()
          This method returns an set containing all of the unique identifiers for which data has been stored in the Var2Data block.
 java.lang.String toString()
          This method dumps the contents of this VarMeta block as a String.
 
Methods inherited from class net.sf.mpxj.mpp.MPPComponent
readByte, readByteArray, readInt, readShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_unknown1

protected int m_unknown1

m_itemCount

protected int m_itemCount

m_unknown2

protected int m_unknown2

m_unknown3

protected int m_unknown3

m_dataSize

protected int m_dataSize

m_offsets

protected int[] m_offsets

m_table

protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> m_table
Constructor Detail

AbstractVarMeta

AbstractVarMeta()
Method Detail

getItemCount

public int getItemCount()
This method retrieves the number of items in the Var2Data block.

Specified by:
getItemCount in interface VarMeta
Returns:
number of items

getDataSize

public int getDataSize()
This method retrieves the size of the Var2Data block.

Specified by:
getDataSize in interface VarMeta
Returns:
data size

getUniqueIdentifierArray

public java.lang.Integer[] getUniqueIdentifierArray()
This method returns an array containing all of the unique identifiers for which data has been stored in the Var2Data block.

Specified by:
getUniqueIdentifierArray in interface VarMeta
Returns:
array of unique identifiers

getUniqueIdentifierSet

public java.util.Set<java.lang.Integer> getUniqueIdentifierSet()
This method returns an set containing all of the unique identifiers for which data has been stored in the Var2Data block.

Specified by:
getUniqueIdentifierSet in interface VarMeta
Returns:
set of unique identifiers

getOffset

public java.lang.Integer getOffset(java.lang.Integer id,
                                   java.lang.Integer type)
This method retrieves the offset of a given entry in the Var2Data block. Each entry can be uniquely located by the identifier of the object to which the data belongs, and the type of the data.

Specified by:
getOffset in interface VarMeta
Parameters:
id - unique identifier of an entity
type - data type identifier
Returns:
offset of requested item

getOffset

public int getOffset(int index)
This method retrieves the offset of the data item at the position defined by the index parameter.

Specified by:
getOffset in interface VarMeta
Parameters:
index - index of item in the block
Returns:
offset of the item in the block

getTypes

public java.util.Set<java.lang.Integer> getTypes(java.lang.Integer id)
Retrieves a set containing the types defined in the var data for a given ID.

Specified by:
getTypes in interface VarMeta
Parameters:
id - unique ID
Returns:
set of types

toString

public java.lang.String toString()
This method dumps the contents of this VarMeta block as a String. Note that this facility is provided as a debugging aid.

Overrides:
toString in class java.lang.Object
Returns:
formatted contents of this block


Copyright © 2000-2009 Packwood Software. All Rights Reserved.