T
- public abstract class HierarchyBuilderGroupingBased<T> extends HierarchyBuilder<T> implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
protected static class |
HierarchyBuilderGroupingBased.AbstractGroup
A group representation to be used by subclasses.
|
static class |
HierarchyBuilderGroupingBased.Group<U>
This class represents a fanout parameter.
|
static class |
HierarchyBuilderGroupingBased.Level<U>
This class represents a level in the hierarchy.
|
HierarchyBuilder.Type
Modifier and Type | Field and Description |
---|---|
protected AggregateFunction<T> |
function
The default aggregate function, might be null.
|
Modifier | Constructor and Description |
---|---|
protected |
HierarchyBuilderGroupingBased(HierarchyBuilder.Type type,
DataType<T> datatype)
Creates a new instance for the given data type.
|
Modifier and Type | Method and Description |
---|---|
AttributeType.Hierarchy |
build()
Creates a new hierarchy, based on the predefined specification.
|
AttributeType.Hierarchy |
build(java.lang.String[] data)
Creates a new hierarchy, based on the predefined specification.
|
protected java.lang.String[] |
getData()
Returns the data array.
|
DataType<T> |
getDataType()
Returns the data type.
|
AggregateFunction<T> |
getDefaultFunction()
Returns the default aggregate function.
|
HierarchyBuilderGroupingBased.Level<T> |
getLevel(int level)
Returns the given level.
|
java.util.List<HierarchyBuilderGroupingBased.Level<T>> |
getLevels()
Returns all currently defined levels.
|
protected HierarchyBuilderGroupingBased.AbstractGroup[][] |
getPreparedGroups()
Returns the prepared groups for recursion.
|
java.lang.String |
isValid()
Returns whether the current configuration is valid.
|
int[] |
prepare(java.lang.String[] data)
Prepares the builder.
|
protected abstract HierarchyBuilderGroupingBased.AbstractGroup[][] |
prepareGroups()
Tells the implementing class to prepare the generalization process.
|
void |
setAggregateFunction(AggregateFunction<T> function)
Sets the default aggregate function to be used by all fanouts.
|
protected void |
setData(java.lang.String[] data)
Sets the data array.
|
protected void |
setLevels(java.util.List<HierarchyBuilderGroupingBased.Level<T>> levels)
Sets the groups on higher levels of the hierarchy.
|
protected void |
setPrepared(boolean prepared)
Is this builder prepared allready.
|
protected AggregateFunction<T> function
protected HierarchyBuilderGroupingBased(HierarchyBuilder.Type type, DataType<T> datatype)
type
- datatype
- public AttributeType.Hierarchy build()
build
in class HierarchyBuilder<T>
public AttributeType.Hierarchy build(java.lang.String[] data)
build
in class HierarchyBuilder<T>
data
- public AggregateFunction<T> getDefaultFunction()
public HierarchyBuilderGroupingBased.Level<T> getLevel(int level)
level
- public java.util.List<HierarchyBuilderGroupingBased.Level<T>> getLevels()
public java.lang.String isValid()
null
, if so, an error message
if not.public int[] prepare(java.lang.String[] data)
prepare
in class HierarchyBuilder<T>
data
- public void setAggregateFunction(AggregateFunction<T> function)
function
- protected java.lang.String[] getData()
protected HierarchyBuilderGroupingBased.AbstractGroup[][] getPreparedGroups()
protected abstract HierarchyBuilderGroupingBased.AbstractGroup[][] prepareGroups()
protected void setData(java.lang.String[] data)
data
- protected void setLevels(java.util.List<HierarchyBuilderGroupingBased.Level<T>> levels)
levels
- protected void setPrepared(boolean prepared)
prepared
-