edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer
Class StatisticsReference

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.StatisticsReference

public class StatisticsReference
extends java.lang.Object
implements java.io.Serializable

This class contains information regarding statistics. This is a utility class for the statistics gatherer.

Added 3/8: This class now outlines which properties are generic and which can be calculated for different categories. This is part of the new version of the statistics gatherer where non-category specific statistics (TUPLE_COUNT, NUMBER_OF_TUPLES_IN_INPUT_QUEUES. etc) are kept in their own GENERIC category.

The StatisticsObject that is used for each property is contained here in initReferenceTable. Because new property value are calculated in different ways, we want a general way to figure out which StatisticsObject to use when initilizing the StatisticsGather. For example, when the property named SELECTIVITY is encountered, we want to instantiate a certain StatisticsObject so that SELECTIVITY is calculated correctly.

Whenever new properties are added (that require special calculation), the initReferenceTable() method should be updated. If a new property can use the default implementations of compareTo and calculateNewValue, then there is no need to update this class.

Remember, the default calculateNewValue method just takes the propertyValue from the operator and stores it in the StatisticsObject

This class also contains constants for extracting values in the ModifiedArrayList.

See Also:
Serialized Form

Field Summary
static int AVERAGE
           
static int HIGHEST
           
static int LAST
           
static int LOWEST
           
static int VALUE
           
 
Constructor Summary
StatisticsReference()
          StatisticsReference constructor comment.
 
Method Summary
 java.lang.String getStatisticsObjectName(java.lang.String propertyName)
          Gets the name of the StatisticsObject that refers to this property.
 boolean isGenericProperty(java.lang.String propertyName)
          Gets the name of the StatisticsObject that refers to this property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST

public static final int LAST

HIGHEST

public static final int HIGHEST

LOWEST

public static final int LOWEST

AVERAGE

public static final int AVERAGE

VALUE

public static final int VALUE
Constructor Detail

StatisticsReference

public StatisticsReference()
StatisticsReference constructor comment.
Method Detail

getStatisticsObjectName

public java.lang.String getStatisticsObjectName(java.lang.String propertyName)
Gets the name of the StatisticsObject that refers to this property. If no StatisticsObject is found, return the default StatisticsObject
Parameters:
propertyName - java.lang.String
Returns:
java.lang.String

isGenericProperty

public boolean isGenericProperty(java.lang.String propertyName)
Gets the name of the StatisticsObject that refers to this property. If no StatisticsObject is found, return the default StatisticsObject
Parameters:
propertyName - java.lang.String
Returns:
java.lang.String