ThinkUI Data Generator 1.0.2 API

thinkui.datagen
Interface AttributeValueGenerator

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
AbstractAttributeValueGenerator

public interface AttributeValueGenerator
extends java.lang.Cloneable

Interface for all attribute value generators.


Field Summary
static java.lang.String[] ALL_MODES
           
static int BERNOULLI_MODE
           
static int BINOMIAL_MODE
           
static int CONSTANT_MODE
           
static int DEFAULT_MODE
           
static int EXPONENTIAL_MODE
           
static long MILLIS_PER_DAY
           
static long MILLIS_PER_HOUR
           
static long MILLIS_PER_MINUTE
           
static long MILLIS_PER_SECOND
           
static int NORMAL_MODE
           
static int POISON_MODE
           
static int SEQUENTIAL_MODE
           
static int UNIFORM_MODE
           
 
Method Summary
 AttributeValueGenerator copy()
          Makes a copy of the AttributeValueGenerator.
 java.lang.Object generateValue()
          Generate a value for the attribute.
 Attribute getAttribute()
           
 java.lang.Object getConstantValue()
           
 java.lang.Number getCount()
           
 DataObject getDataObject()
           
 java.util.Map getDataObjectMap()
           
 int getGeneratorMode()
           
 java.lang.Comparable getMaxValue()
           
 java.lang.Number getMeanIndex()
           
 java.lang.Number getMeanLength()
           
 java.lang.Comparable getMeanValue()
           
 AttributeType getMinMaxAttributeType()
          Return the attribute type for the min/max values.
 java.lang.Comparable getMinValue()
           
 DataObject getParameterData()
          Returns the data object containing the parameter data required by the generator.
 DataObject getParentDataObject()
           
 java.lang.Number getProbability()
           
 int getProbabilityNull()
           
 java.lang.Number getStdDevValue()
           
 java.lang.String getValueAttributeName()
           
 void initGenerator()
          Initialize the attribute generator with dynamic data (if any).
 boolean isDataDependent()
           
 boolean isMultiValued()
           
 boolean isParentDataDependent()
           
 void setAttribute(Attribute attribute)
          Sets the attribute for the generator.
 void setConstantValue(java.lang.Object constantValue)
          Sets the constant value for the generator.
 void setCount(java.lang.Number count)
          Sets the count for the BERNOULLI and BINOMIAL probability distribution.
 void setDataDependent(boolean dataDependent)
          Sets whether or not the generator is dependent on previously generated data.
 void setDataObject(DataObject dataObject)
          Sets the data object currently being generated.
 void setDataObjectMap(java.util.Map dataObjectMap)
          Sets the data object map to use for variable resolution.
 void setGeneratorMode(int generatorMode)
          Sets the generation mode for the generator.
 void setMaxValue(java.lang.Comparable maxValue)
          Sets the maximum value that can be generated.
 void setMeanIndex(java.lang.Number meanIndex)
          Sets the mean index for the various probability distributions.
 void setMeanLength(java.lang.Number meanLength)
          Sets the mean length for the various probability distributions.
 void setMeanValue(java.lang.Comparable meanValue)
          Sets the mean value for the various probability distributions.
 void setMinValue(java.lang.Comparable minValue)
          Sets the minimum value that can be generated.
 void setMultiValued(boolean multiValued)
          Sets whether or not we are generating data objects or single attribute values.
 void setParentDataDependent(boolean parentDataDependent)
          Sets whether or not the generator is dependent on previously generated parent data.
 void setParentDataObject(DataObject parentDataObject)
          Sets the parent data object currently being generated.
 void setProbability(java.lang.Number probability)
          Sets the probability value for the BERNOULLI and BINOMIAL probability distribution.
 void setProbabilityNull(int probabilityNull)
          Sets the probability that the generated value is null.
 void setStdDevValue(java.lang.Number stdDevValue)
          Sets the standard deviation value for the various probability distributions.
 

Field Detail

ALL_MODES

public static final java.lang.String[] ALL_MODES

BERNOULLI_MODE

public static final int BERNOULLI_MODE
See Also:
Constant Field Values

BINOMIAL_MODE

public static final int BINOMIAL_MODE
See Also:
Constant Field Values

CONSTANT_MODE

public static final int CONSTANT_MODE
See Also:
Constant Field Values

DEFAULT_MODE

public static final int DEFAULT_MODE
See Also:
Constant Field Values

EXPONENTIAL_MODE

public static final int EXPONENTIAL_MODE
See Also:
Constant Field Values

MILLIS_PER_DAY

public static final long MILLIS_PER_DAY
See Also:
Constant Field Values

MILLIS_PER_HOUR

public static final long MILLIS_PER_HOUR
See Also:
Constant Field Values

MILLIS_PER_MINUTE

public static final long MILLIS_PER_MINUTE
See Also:
Constant Field Values

MILLIS_PER_SECOND

public static final long MILLIS_PER_SECOND
See Also:
Constant Field Values

NORMAL_MODE

public static final int NORMAL_MODE
See Also:
Constant Field Values

POISON_MODE

public static final int POISON_MODE
See Also:
Constant Field Values

SEQUENTIAL_MODE

public static final int SEQUENTIAL_MODE
See Also:
Constant Field Values

UNIFORM_MODE

public static final int UNIFORM_MODE
See Also:
Constant Field Values
Method Detail

copy

public AttributeValueGenerator copy()
Makes a copy of the AttributeValueGenerator.


generateValue

public java.lang.Object generateValue()
                               throws java.lang.Exception
Generate a value for the attribute.

Throws:
java.lang.Exception

getAttribute

public Attribute getAttribute()
Returns:
the attribute for the generator.

getConstantValue

public java.lang.Object getConstantValue()
Returns:
the constant value for the generator or null.

getCount

public java.lang.Number getCount()
Returns:
the count for the BERNOULLI and BINOMIAL probability distribution or null.

getDataObject

public DataObject getDataObject()
Returns:
the data object currently being generated or null.

getDataObjectMap

public java.util.Map getDataObjectMap()
Returns:
the data object map to use for variable resolution.

getGeneratorMode

public int getGeneratorMode()
Returns:
the generation mode for the generator.

getMaxValue

public java.lang.Comparable getMaxValue()
Returns:
the maximum value that can be generated.

getMeanIndex

public java.lang.Number getMeanIndex()
Returns:
the mean index for the various probability distributions or null.

getMeanLength

public java.lang.Number getMeanLength()
Returns:
the mean length for the various probability distributions or null.

getMeanValue

public java.lang.Comparable getMeanValue()
Returns:
the mean value for the various probability distributions or null.

getMinMaxAttributeType

public AttributeType getMinMaxAttributeType()
Return the attribute type for the min/max values.


getMinValue

public java.lang.Comparable getMinValue()
Returns:
the minimum value that can be generated.

getParameterData

public DataObject getParameterData()
Returns the data object containing the parameter data required by the generator. If the generator does not require any data then null will be returned. This is the primary means by which custom data can be passed into the generator. The exact data object attributes will be specific to the specific generator.

Returns:
the parameter data or null.

getParentDataObject

public DataObject getParentDataObject()
Returns:
the parent data object currently being generated or null.

getProbability

public java.lang.Number getProbability()
Returns:
the probability for the BERNOULLI and BINOMIAL probability distribution or null.

getProbabilityNull

public int getProbabilityNull()
Returns:
the probability that the generated value is null.

getStdDevValue

public java.lang.Number getStdDevValue()
Returns:
the standard deviation value for the various probability distributions or null.

getValueAttributeName

public java.lang.String getValueAttributeName()
Returns:
the attribute name containing the value or null.

initGenerator

public void initGenerator()
                   throws java.lang.Exception
Initialize the attribute generator with dynamic data (if any).

Throws:
java.lang.Exception

isDataDependent

public boolean isDataDependent()
Returns:
whether or not the generator is dependent on previously generated data.

isMultiValued

public boolean isMultiValued()
Returns:
whether or not we are generating data objects or single attribute values.

isParentDataDependent

public boolean isParentDataDependent()
Returns:
whether or not the generator is dependent on previously generated parent data.

setAttribute

public void setAttribute(Attribute attribute)
Sets the attribute for the generator.


setConstantValue

public void setConstantValue(java.lang.Object constantValue)
Sets the constant value for the generator.


setCount

public void setCount(java.lang.Number count)
Sets the count for the BERNOULLI and BINOMIAL probability distribution.


setDataDependent

public void setDataDependent(boolean dataDependent)
Sets whether or not the generator is dependent on previously generated data.


setDataObject

public void setDataObject(DataObject dataObject)
Sets the data object currently being generated.


setDataObjectMap

public void setDataObjectMap(java.util.Map dataObjectMap)
Sets the data object map to use for variable resolution.


setGeneratorMode

public void setGeneratorMode(int generatorMode)
Sets the generation mode for the generator.


setMaxValue

public void setMaxValue(java.lang.Comparable maxValue)
Sets the maximum value that can be generated.


setMeanIndex

public void setMeanIndex(java.lang.Number meanIndex)
Sets the mean index for the various probability distributions.


setMeanLength

public void setMeanLength(java.lang.Number meanLength)
Sets the mean length for the various probability distributions.


setMeanValue

public void setMeanValue(java.lang.Comparable meanValue)
Sets the mean value for the various probability distributions.


setMinValue

public void setMinValue(java.lang.Comparable minValue)
Sets the minimum value that can be generated.


setMultiValued

public void setMultiValued(boolean multiValued)
Sets whether or not we are generating data objects or single attribute values.


setParentDataDependent

public void setParentDataDependent(boolean parentDataDependent)
Sets whether or not the generator is dependent on previously generated parent data.


setParentDataObject

public void setParentDataObject(DataObject parentDataObject)
Sets the parent data object currently being generated.


setProbability

public void setProbability(java.lang.Number probability)
Sets the probability value for the BERNOULLI and BINOMIAL probability distribution.


setProbabilityNull

public void setProbabilityNull(int probabilityNull)
Sets the probability that the generated value is null.


setStdDevValue

public void setStdDevValue(java.lang.Number stdDevValue)
Sets the standard deviation value for the various probability distributions.


ThinkUI Data Generator 1.0.2 API

Copyright © 2007-2009. ThinkUI Software Inc. All rights reserved.