MPXJ: Microsoft Project Exchange

net.sf.mpxj.mpp
Class CriteriaReader

java.lang.Object
  extended by net.sf.mpxj.mpp.CriteriaReader
Direct Known Subclasses:
FilterCriteriaReader12, FilterCriteriaReader14, FilterCriteriaReader9

public abstract class CriteriaReader
extends java.lang.Object

This class allows criteria definitions to be read from an MPP file.


Field Summary
protected  java.util.Map<java.lang.Integer,byte[]> m_criteriaBlockMap
           
 
Constructor Summary
CriteriaReader()
           
 
Method Summary
protected abstract  byte[] getChildBlock(byte[] block)
          Retrieves the child of the current block.
protected abstract  int getCriteriaBlockSize()
          Retrieves the criteria block size.
protected abstract  int getCriteriaStartOffset()
          Retrieves the offset of the start of the criteria data.
protected abstract  int getCriteriaTextStartOffset()
          Retrieves offset of value which determines the start of the text block.
protected abstract  FieldType getFieldType(byte[] block)
          Retrieves a field type value.
protected abstract  byte[] getListNextBlock(byte[] block)
          Retrieves the next list sibling of this block.
protected abstract  int getPromptOffset(byte[] block)
          Retrieves the offset of the prompt text.
protected abstract  int getTextOffset(byte[] block)
          Retrieves the offset of the start of the text block.
protected abstract  int getTimeUnitsOffset()
          Retrieves the offset of the time unit field.
protected abstract  int getValueOffset()
          Retrieves the offset of the field value.
 GenericCriteria process(ProjectFile file, byte[] data, int dataOffset, int entryOffset, java.util.List<GenericCriteriaPrompt> prompts, java.util.List<FieldType> fields, boolean[] criteriaType)
          Main entry point to read criteria data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_criteriaBlockMap

protected java.util.Map<java.lang.Integer,byte[]> m_criteriaBlockMap
Constructor Detail

CriteriaReader

public CriteriaReader()
Method Detail

getCriteriaStartOffset

protected abstract int getCriteriaStartOffset()
Retrieves the offset of the start of the criteria data.

Returns:
criteria start offset

getCriteriaBlockSize

protected abstract int getCriteriaBlockSize()
Retrieves the criteria block size.

Returns:
criteria block size

getChildBlock

protected abstract byte[] getChildBlock(byte[] block)
Retrieves the child of the current block.

Parameters:
block - parent block
Returns:
child block

getListNextBlock

protected abstract byte[] getListNextBlock(byte[] block)
Retrieves the next list sibling of this block.

Parameters:
block - current block
Returns:
next sibling list block

getTextOffset

protected abstract int getTextOffset(byte[] block)
Retrieves the offset of the start of the text block.

Parameters:
block - current block
Returns:
text block start offset

getPromptOffset

protected abstract int getPromptOffset(byte[] block)
Retrieves the offset of the prompt text.

Parameters:
block - current block
Returns:
prompt text offset

getValueOffset

protected abstract int getValueOffset()
Retrieves the offset of the field value.

Returns:
field value offset

getTimeUnitsOffset

protected abstract int getTimeUnitsOffset()
Retrieves the offset of the time unit field.

Returns:
time unit field offset

getCriteriaTextStartOffset

protected abstract int getCriteriaTextStartOffset()
Retrieves offset of value which determines the start of the text block.

Returns:
criteria text start offset

getFieldType

protected abstract FieldType getFieldType(byte[] block)
Retrieves a field type value.

Parameters:
block - criteria block
Returns:
field type value

process

public GenericCriteria process(ProjectFile file,
                               byte[] data,
                               int dataOffset,
                               int entryOffset,
                               java.util.List<GenericCriteriaPrompt> prompts,
                               java.util.List<FieldType> fields,
                               boolean[] criteriaType)
Main entry point to read criteria data.

Parameters:
file - parent project file
data - criteria data block
dataOffset - offset of the data start within the larger data block
entryOffset - offset of start node for walking the tree
prompts - optional list to hold prompts
fields - optional list of hold fields
criteriaType - optional array representing criteria types
Returns:
first node of the criteria


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