|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.DataColumnSpec
public final class DataColumnSpec
A DataColumnSpec
describes one column in a
DataTable
.
It contains information about type, name, domain, data properties, and
optionally color/size/shape handling. This class can only be created using
the DataColumnSpecCreator
within this package.
DataColumnSpecCreator
,
DataTableSpec
Constructor Summary | |
---|---|
DataColumnSpec(String name,
String[] elNames,
DataType type,
DataColumnDomain domain,
DataColumnProperties props,
SizeHandler sizeHdl,
ColorHandler colorHdl,
ShapeHandler shapeHdl)
Constructor taking all properties of this column spec as arguments. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Two DataColumnSpec s are equal, if the name, type,
properties, domain, all property handlers, and element names are equal. |
boolean |
equalStructure(DataColumnSpec cspec)
Two DataColumnSpec s are equal if they have the same
column name and type. |
ColorHandler |
getColorHandler()
Returns the ColorHandler defined on this column, if
available. |
DataColumnDomain |
getDomain()
Returns the domain of this column spec including meta-information such as bounds, possible values, etc. |
List<String> |
getElementNames()
Get names of sub elements such as bit vector positions or elements of other vector data types. |
String |
getName()
Returns the name of this column. |
DataColumnProperties |
getProperties()
Returns the properties assigned to this column spec. |
ShapeHandler |
getShapeHandler()
Returns the ShapeHandler defined on this column, if
available. |
SizeHandler |
getSizeHandler()
Returns the SizeHandler defined on this column, if
available. |
DataType |
getType()
Returns the column type which is a subclass of DataType . |
int |
hashCode()
The hash code is computed based on the hash code of column name and type. |
static DataColumnSpec |
load(ConfigRO config)
Reads name, type, domain, and properties from the given ConfigRO and - if available - size, shape, and color
handler. |
void |
save(ConfigWO config)
Saves name, type, domain, and properties and - if available - color, size, and shape handler to the given ConfigWO . |
String |
toString()
Returns a string summary of this column spec including name and type. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
DataColumnSpec(String name, String[] elNames, DataType type, DataColumnDomain domain, DataColumnProperties props, SizeHandler sizeHdl, ColorHandler colorHdl, ShapeHandler shapeHdl)
DataColumnSpec
and should only be
called from the DataColumnSpecCreator
in this package.
name
- the name of the column, must not be null
elNames
- Names of sub elements (if any),
must not be null
, nor contain null
elements.type
- the type of the column, must not be null
domain
- the domain, must not be null
props
- additional properties, must not be null
sizeHdl
- the SizeHandler
or null
colorHdl
- the ColorHandler
or null
shapeHdl
- the ShapeHandler
or null
NullPointerException
- if either column name, type, domain, or
properties are null
Method Detail |
---|
public String getName()
public List<String> getElementNames()
DataCell
or a
BitVectorCell
) the elements of this list represent
identifiers for each of the different vector positions. There is,
however, no need that such a list is set.
public DataType getType()
DataType
.
DataType
of this column; all data cells of
this column are type-castable to its native typeDataType
,
DataCell
public DataColumnDomain getDomain()
null
public DataColumnProperties getProperties()
null
public SizeHandler getSizeHandler()
SizeHandler
defined on this column, if
available. Otherwise null
will be returned.
SizeHandler
or null
public ShapeHandler getShapeHandler()
ShapeHandler
defined on this column, if
available. Otherwise null
will be returned.
ShapeHandler
or null
public ColorHandler getColorHandler()
ColorHandler
defined on this column, if
available. Otherwise null
will be returned.
ColorHandler
or null
public boolean equalStructure(DataColumnSpec cspec)
DataColumnSpec
s are equal if they have the same
column name and type. Domain info, properties, and handlers are not
considered during the comparison.
cspec
- another DataColumnSpec
to compare this column
to
true
if both have the same column name and type,
otherwise false
Object.equals(java.lang.Object)
public boolean equals(Object o)
DataColumnSpec
s are equal, if the name, type,
properties, domain, all property handlers, and element names are equal.
equals
in class Object
o
- the DataColumnSpec
to check equality
true
if both objects are equal, otherwise
false
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void save(ConfigWO config)
ConfigWO
.
config
- write properties into
NullPointerException
- if the config object is null
public static DataColumnSpec load(ConfigRO config) throws InvalidSettingsException
ConfigRO
and - if available - size, shape, and color
handler. Returns a new DataColumnSpec
object initialized
with the information read.
config
- to read properties from
InvalidSettingsException
- if one of the non-optional properties is
not available or can't be initialized
NullPointerException
- if the config object is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |