public class GeneratorXMLDatabaseConnection extends AbstractDatabaseConnection
Modifier and Type | Class and Description |
---|---|
static class |
GeneratorXMLDatabaseConnection.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_ANGLE
Rotation angle
|
static java.lang.String |
ATTR_AXIS1
First axis for rotation plane
|
static java.lang.String |
ATTR_AXIS2
Second axis for rotation plane
|
static java.lang.String |
ATTR_DENSITY
Density correction factor
|
static java.lang.String |
ATTR_K
Gamma k
|
static java.lang.String |
ATTR_MAX
Maximum value
|
static java.lang.String |
ATTR_MEAN
Mean
|
static java.lang.String |
ATTR_MIN
Minimum value
|
static java.lang.String |
ATTR_NAME
Cluster nane
|
static java.lang.String |
ATTR_SEED
Random seed
|
static java.lang.String |
ATTR_SIZE
Cluster size
|
static java.lang.String |
ATTR_STDDEV
Standard deviation
|
static java.lang.String |
ATTR_TEST
Attribute to control model testing
|
static java.lang.String |
ATTR_THETA
Gamma theta
|
static java.lang.String |
ATTR_VECTOR
Vector
|
private RandomFactory |
clusterRandom
Random generator used for initializing cluster generators.
|
static java.lang.String |
GENERATOR_SCHEMA_FILE
File name of the generators XML Schema file.
|
private static Logging |
LOG
Logger
|
(package private) java.util.regex.Pattern |
reassign
Pattern for clusters to reassign.
|
private boolean |
reassignByDistance
Reassign objects by distance instead of density
|
(package private) double |
sizescale
Parameter for scaling the cluster sizes.
|
(package private) java.io.File |
specfile
The configuration file.
|
static java.lang.String |
TAG_CLIP
Clipping
|
static java.lang.String |
TAG_CLUSTER
Cluster tag
|
static java.lang.String |
TAG_DATASET
Dataset tag
|
static java.lang.String |
TAG_GAMMA
Gamma distribution
|
static java.lang.String |
TAG_HALTON
Halton pseudo uniform distribution.
|
static java.lang.String |
TAG_NORMAL
Normal distribution
|
static java.lang.String |
TAG_POINT
Point in static cluster
|
static java.lang.String |
TAG_ROTATE
Rotation
|
static java.lang.String |
TAG_STATIC
Static cluster
|
static java.lang.String |
TAG_TRANSLATE
Translation
|
static java.lang.String |
TAG_UNIFORM
Uniform distribution
|
private java.lang.Boolean |
testAgainstModel
Set testAgainstModel flag
|
static java.util.regex.Pattern |
WHITESPACE_PATTERN
A pattern defining whitespace.
|
filters, LABEL_CONCATENATION
Constructor and Description |
---|
GeneratorXMLDatabaseConnection(java.util.List<ObjectFilter> filters,
java.io.File specfile,
double sizescale,
java.util.regex.Pattern reassign,
boolean reassignByDistance,
RandomFactory clusterRandom)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Logging |
getLogger()
Get the logger for this database connection.
|
MultipleObjectsBundle |
loadData()
Returns the initial data for a database.
|
private GeneratorMain |
loadXMLSpecification()
Load the XML configuration file.
|
private double[] |
parseVector(java.lang.String s)
Parse a string into a vector.
|
private void |
processElementClipping(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'clipping' Element in the XML stream.
|
private void |
processElementCluster(GeneratorMain gen,
org.w3c.dom.Node cur)
Process a 'cluster' Element in the XML stream.
|
private void |
processElementDataset(GeneratorMain gen,
org.w3c.dom.Node cur)
Process a 'dataset' Element in the XML stream.
|
private void |
processElementGamma(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'gamma' Element in the XML stream.
|
private void |
processElementHalton(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'halton' Element in the XML stream.
|
private void |
processElementNormal(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'normal' Element in the XML stream.
|
private void |
processElementPoint(java.util.List<double[]> points,
org.w3c.dom.Node cur)
Parse a 'point' element (point vector for a static cluster)
|
private void |
processElementRotate(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'rotate' Element in the XML stream.
|
private void |
processElementStatic(GeneratorMain gen,
org.w3c.dom.Node cur)
Process a 'static' cluster Element in the XML stream.
|
private void |
processElementTranslate(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'translate' Element in the XML stream.
|
private void |
processElementUniform(GeneratorSingleCluster cluster,
org.w3c.dom.Node cur)
Process a 'uniform' Element in the XML stream.
|
invokeBundleFilters, invokeStreamFilters
public static final java.lang.String TAG_DATASET
public static final java.lang.String TAG_CLUSTER
public static final java.lang.String TAG_UNIFORM
public static final java.lang.String TAG_NORMAL
public static final java.lang.String TAG_GAMMA
public static final java.lang.String TAG_HALTON
public static final java.lang.String TAG_ROTATE
public static final java.lang.String TAG_TRANSLATE
public static final java.lang.String TAG_CLIP
public static final java.lang.String TAG_STATIC
public static final java.lang.String TAG_POINT
public static final java.lang.String ATTR_TEST
public static final java.lang.String ATTR_SEED
public static final java.lang.String ATTR_DENSITY
public static final java.lang.String ATTR_NAME
public static final java.lang.String ATTR_SIZE
public static final java.lang.String ATTR_MIN
public static final java.lang.String ATTR_MAX
public static final java.lang.String ATTR_MEAN
public static final java.lang.String ATTR_STDDEV
public static final java.lang.String ATTR_K
public static final java.lang.String ATTR_THETA
public static final java.lang.String ATTR_VECTOR
public static final java.lang.String ATTR_AXIS1
public static final java.lang.String ATTR_AXIS2
public static final java.lang.String ATTR_ANGLE
private static final Logging LOG
public static final java.util.regex.Pattern WHITESPACE_PATTERN
public static final java.lang.String GENERATOR_SCHEMA_FILE
java.io.File specfile
double sizescale
java.util.regex.Pattern reassign
private RandomFactory clusterRandom
private java.lang.Boolean testAgainstModel
private boolean reassignByDistance
public GeneratorXMLDatabaseConnection(java.util.List<ObjectFilter> filters, java.io.File specfile, double sizescale, java.util.regex.Pattern reassign, boolean reassignByDistance, RandomFactory clusterRandom)
filters
- Filters.specfile
- Specification filesizescale
- Size scalingreassign
- Reassignment patternreassignByDistance
- Reassign objects by distance instead of densityclusterRandom
- Random number generatorpublic MultipleObjectsBundle loadData()
DatabaseConnection
private GeneratorMain loadXMLSpecification()
private void processElementDataset(GeneratorMain gen, org.w3c.dom.Node cur)
gen
- Generatorcur
- Current document nodprivate void processElementCluster(GeneratorMain gen, org.w3c.dom.Node cur)
gen
- Generatorcur
- Current document nodprivate void processElementUniform(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementNormal(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementGamma(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementHalton(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementRotate(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementTranslate(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementClipping(GeneratorSingleCluster cluster, org.w3c.dom.Node cur)
cluster
- cur
- Current document nodprivate void processElementStatic(GeneratorMain gen, org.w3c.dom.Node cur)
gen
- Generatorcur
- Current document nodprivate void processElementPoint(java.util.List<double[]> points, org.w3c.dom.Node cur)
points
- current list of points (to append to)cur
- Current document nodprivate double[] parseVector(java.lang.String s)
s
- String to parseprotected Logging getLogger()
AbstractDatabaseConnection
getLogger
in class AbstractDatabaseConnection
Copyright © 2019 ELKI Development Team. License information.