public class GeneratorXMLDatabaseConnection extends Object implements DatabaseConnection
Modifier and Type | Class and Description |
---|---|
static class |
GeneratorXMLDatabaseConnection.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_ANGLE
Rotation angle
|
static String |
ATTR_AXIS1
First axis for rotation plane
|
static String |
ATTR_AXIS2
Second axis for rotation plane
|
static String |
ATTR_DENSITY
Density correction factor
|
static String |
ATTR_K
Gamma k
|
static String |
ATTR_MAX
Maximum value
|
static String |
ATTR_MEAN
Mean
|
static String |
ATTR_MIN
Minimum value
|
static String |
ATTR_NAME
Cluster nane
|
static String |
ATTR_SEED
Random seed
|
static String |
ATTR_SIZE
Cluster size
|
static String |
ATTR_STDDEV
Standard deviation
|
static String |
ATTR_TEST
Attribute to control model testing
|
static String |
ATTR_THETA
Gamma theta
|
static String |
ATTR_VECTOR
Vector
|
private Random |
clusterRandom
Random generator used for initializing cluster generators.
|
static OptionID |
CONFIGFILE_ID
Parameter to give the configuration file
|
static String |
GENERATOR_SCHEMA_FILE
File name of the generators XML Schema file.
|
private static Logging |
LOG
Logger
|
static OptionID |
RANDOMSEED_ID
Parameter to give the configuration file
|
static OptionID |
SIZE_SCALE_ID
Parameter to give the configuration file
|
(package private) double |
sizescale
Parameter for scaling the cluster sizes.
|
(package private) File |
specfile
The configuration file.
|
static String |
TAG_CLIP
Clipping
|
static String |
TAG_CLUSTER
Cluster tag
|
static String |
TAG_DATASET
Dataset tag
|
static String |
TAG_GAMMA
Gamma distribution
|
static String |
TAG_HALTON
Halton pseudo uniform distribution.
|
static String |
TAG_NORMAL
Normal distribution
|
static String |
TAG_POINT
Point in static cluster
|
static String |
TAG_ROTATE
Rotation
|
static String |
TAG_STATIC
Static cluster
|
static String |
TAG_TRANSLATE
Translation
|
static String |
TAG_UNIFORM
Uniform distribution
|
private Boolean |
testAgainstModel
Set testAgainstModel flag
|
static Pattern |
WHITESPACE_PATTERN
A pattern defining whitespace.
|
Constructor and Description |
---|
GeneratorXMLDatabaseConnection(File specfile,
double sizescale,
Random clusterRandom)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
MultipleObjectsBundle |
loadData()
Returns the initial data for a database.
|
private GeneratorMain |
loadXMLSpecification()
Load the XML configuration file.
|
private Vector |
parseVector(String s)
Parse a string into a vector.
|
private void |
processElementClipping(GeneratorSingleCluster cluster,
Node cur)
Process a 'clipping' Element in the XML stream.
|
private void |
processElementCluster(GeneratorMain gen,
Node cur)
Process a 'cluster' Element in the XML stream.
|
private void |
processElementDataset(GeneratorMain gen,
Node cur)
Process a 'dataset' Element in the XML stream.
|
private void |
processElementGamma(GeneratorSingleCluster cluster,
Node cur)
Process a 'gamma' Element in the XML stream.
|
private void |
processElementHalton(GeneratorSingleCluster cluster,
Node cur)
Process a 'halton' Element in the XML stream.
|
private void |
processElementNormal(GeneratorSingleCluster cluster,
Node cur)
Process a 'normal' Element in the XML stream.
|
private void |
processElementPoint(List<Vector> points,
Node cur)
Parse a 'point' element (point vector for a static cluster)
|
private void |
processElementRotate(GeneratorSingleCluster cluster,
Node cur)
Process a 'rotate' Element in the XML stream.
|
private void |
processElementStatic(GeneratorMain gen,
Node cur)
Process a 'static' cluster Element in the XML stream.
|
private void |
processElementTranslate(GeneratorSingleCluster cluster,
Node cur)
Process a 'translate' Element in the XML stream.
|
private void |
processElementUniform(GeneratorSingleCluster cluster,
Node cur)
Process a 'uniform' Element in the XML stream.
|
public static final String TAG_DATASET
public static final String TAG_CLUSTER
public static final String TAG_UNIFORM
public static final String TAG_NORMAL
public static final String TAG_GAMMA
public static final String TAG_HALTON
public static final String TAG_ROTATE
public static final String TAG_TRANSLATE
public static final String TAG_CLIP
public static final String TAG_STATIC
public static final String TAG_POINT
public static final String ATTR_TEST
public static final String ATTR_SEED
public static final String ATTR_DENSITY
public static final String ATTR_NAME
public static final String ATTR_SIZE
public static final String ATTR_MIN
public static final String ATTR_MAX
public static final String ATTR_MEAN
public static final String ATTR_STDDEV
public static final String ATTR_K
public static final String ATTR_THETA
public static final String ATTR_VECTOR
public static final String ATTR_AXIS1
public static final String ATTR_AXIS2
public static final String ATTR_ANGLE
private static final Logging LOG
public static final Pattern WHITESPACE_PATTERN
public static final OptionID CONFIGFILE_ID
public static final OptionID RANDOMSEED_ID
public static final OptionID SIZE_SCALE_ID
public static final String GENERATOR_SCHEMA_FILE
File specfile
double sizescale
private Random clusterRandom
private Boolean testAgainstModel
public MultipleObjectsBundle loadData()
DatabaseConnection
loadData
in interface DatabaseConnection
private GeneratorMain loadXMLSpecification() throws UnableToComplyException
UnableToComplyException
private void processElementDataset(GeneratorMain gen, Node cur) throws UnableToComplyException
gen
- Generatorcur
- Current document nodUnableToComplyException
private void processElementCluster(GeneratorMain gen, Node cur) throws UnableToComplyException
gen
- Generatorcur
- Current document nodUnableToComplyException
private void processElementUniform(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementNormal(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementGamma(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementHalton(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementRotate(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementTranslate(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementClipping(GeneratorSingleCluster cluster, Node cur) throws UnableToComplyException
cluster
- cur
- Current document nodUnableToComplyException
private void processElementStatic(GeneratorMain gen, Node cur) throws UnableToComplyException
gen
- Generatorcur
- Current document nodUnableToComplyException
private void processElementPoint(List<Vector> points, Node cur) throws UnableToComplyException
points
- current list of points (to append to)cur
- Current document nodUnableToComplyException
private Vector parseVector(String s) throws UnableToComplyException
s
- String to parseUnableToComplyException