public class GlobalSettings extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GlobalSettings.AggregationContext
A context the aggregation is performed in (e.g.
|
static class |
GlobalSettings.GlobalSettingsBuilder
Builder to create
GlobalSettings -objects. |
Modifier and Type | Field and Description |
---|---|
static GlobalSettings |
DEFAULT
Default global settings object that should be only used in
operator templates!!!
|
static String |
STANDARD_DELIMITER
The standard delimiter used in concatenation operators.
|
Constructor and Description |
---|
GlobalSettings(DataTableSpec newSpec,
GlobalSettings oldSettings)
Constructor for class GlobalSettings.
|
GlobalSettings(FileStoreFactory fileStoreFactory,
List<String> groupColNames,
int maxUniqueValues,
String valueDelimiter,
DataTableSpec spec,
long noOfRows)
Deprecated.
use the
GlobalSettings.GlobalSettingsBuilder instead (via builder() ) |
GlobalSettings(int maxUniqueValues)
Deprecated.
|
GlobalSettings(int maxUniqueValues,
String valueDelimiter,
DataTableSpec spec,
int noOfRows)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
addValue(String key,
Object value)
Allows the adding of arbitrary objects with a given key.
|
void |
addValues(Map<String,Object> map)
Allows the adding of arbitrary key value pairs.
|
static GlobalSettings.GlobalSettingsBuilder |
builder() |
boolean |
equals(Object obj) |
int |
findColumnIndex(String columnName)
Finds the column with the specified name in the TableSpec of the
original input table and returns its index, or -1 if the name
doesn't exist in the table.
|
FileStoreFactory |
getFileStoreFactory()
Returns the
FileStoreFactory that can be used to create. |
List<String> |
getGroupColNames() |
int |
getMaxUniqueValues() |
int |
getNoOfColumns()
Returns the number of columns of the original input table.
|
long |
getNoOfItems()
Returns the number of items to be aggregated.
|
long |
getNoOfRows() |
DataColumnSpec |
getOriginalColumnSpec(int index)
Returns column information of the original column with
the provided index.
|
DataColumnSpec |
getOriginalColumnSpec(String column)
Returns the
DataColumnSpec of the original column with the
provided name. |
Object |
getValue(String key)
Returns the value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
String |
getValueDelimiter() |
int |
hashCode() |
public static final GlobalSettings DEFAULT
public static final String STANDARD_DELIMITER
@Deprecated public GlobalSettings(int maxUniqueValues)
maxUniqueValues
- the maximum number of unique values to consider#GlobalSettings(FileStoreFactory, List, int, String, DataTableSpec, int)
@Deprecated public GlobalSettings(int maxUniqueValues, String valueDelimiter, DataTableSpec spec, int noOfRows)
maxUniqueValues
- the maximum number of unique values to considervalueDelimiter
- the delimiter to use for value separationspec
- the DataTableSpec
of the input tablenoOfRows
- the number of rows of the input table#GlobalSettings(FileStoreFactory, List, int, String, DataTableSpec, int)
public GlobalSettings(DataTableSpec newSpec, GlobalSettings oldSettings)
newSpec
- the DataTableSpec
of the table to processoldSettings
- the GlobalSettings
object to change the
DataTableSpec
@Deprecated public GlobalSettings(FileStoreFactory fileStoreFactory, List<String> groupColNames, int maxUniqueValues, String valueDelimiter, DataTableSpec spec, long noOfRows)
GlobalSettings.GlobalSettingsBuilder
instead (via builder()
)fileStoreFactory
- the FileStoreFactory
groupColNames
- the names of the columns to group bymaxUniqueValues
- the maximum number of unique values to considervalueDelimiter
- the delimiter to use for value separationspec
- the DataTableSpec
of the table to processnoOfRows
- the number of rows of the input tablepublic int getMaxUniqueValues()
public String getValueDelimiter()
public long getNoOfRows()
public int getNoOfColumns()
public long getNoOfItems()
IllegalStateException
- if no aggregation context was provided during constructionpublic int findColumnIndex(String columnName)
null
.columnName
- the name to search forpublic DataColumnSpec getOriginalColumnSpec(int index)
index
- the column index within the tableArrayIndexOutOfBoundsException
- if the index is out of rangepublic DataColumnSpec getOriginalColumnSpec(String column)
DataColumnSpec
of the original column with the
provided name.
This method returns null
if the argument is
null
.column
- the column name to find the spec fornull
if not availablepublic FileStoreFactory getFileStoreFactory()
FileStoreFactory
that can be used to create.
The method returns null
if the FileStoreFactory
is
not available.FileStoreFactory
to create new FileStore
objects. The method might return null
if the
FileStoreFactory
is not availablepublic List<String> getGroupColNames()
List
that contains the names of the columns
to group bypublic void addValues(Map<String,Object> map)
map
- the Map
with the values to addpublic Object addValue(String key, Object value)
key
- the key to use. Must not be null
.value
- the value to store. Must not be null
.null
if there was no mapping for key.public Object getValue(String key)
null
if this map contains no mapping for the key.key
- the key whose associated value is to be returnednull
if this map contains no mapping for the keypublic static GlobalSettings.GlobalSettingsBuilder builder()
GlobalSettings
instances
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.