Package com.bayesserver.data.discovery
Class VariableDefinition
- java.lang.Object
-
- com.bayesserver.data.discovery.VariableDefinition
-
public final class VariableDefinition extends Object
Defines how a variable should be created.
-
-
Constructor Summary
Constructors Constructor Description VariableDefinition()
Initializes a new instance of theVariableDefinition
class.VariableDefinition(String dataColumn, String name, VariableValueType valueType)
Initializes a new instance of theVariableDefinition
class.VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType)
Initializes a new instance of theVariableDefinition
class.VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType, VariableKind kind)
Initializes a new instance of theVariableDefinition
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDataColumn()
The name of the data column, containing the data used to generate the new variable.DiscretizationMethod
getDiscretizationMethod()
Gets the method (algorithm) to use for discretization, if any.DiscretizationOptions
getDiscretizationOptions()
Gets options that specify how continuous data should be discretized, ifDiscretizationMethod
is notDiscretizationMethod.NONE
.EmptyStringAction
getEmptyStringAction()
Determines the action to take if an empty string is encountered.VariableKind
getKind()
Gets theVariableKind
for the new variable.String
getName()
Gets the name for the new variable.SortOrder
getSortOrder()
Gets the sort order for states of a new discrete variable.StateValueType
getStateValueType()
Gets theStateValueType
for the new variable.VariableValueType
getValueType()
Gets theVariableValueType
for the new variable.void
setDataColumn(String value)
The name of the data column, containing the data used to generate the new variable.void
setDiscretizationMethod(DiscretizationMethod value)
Sets the method (algorithm) to use for discretization, if any.void
setEmptyStringAction(EmptyStringAction value)
Determines the action to take if an empty string is encountered.void
setKind(VariableKind value)
Sets theVariableKind
for the new variable.void
setName(String value)
Sets the name for the new variable.void
setSortOrder(SortOrder value)
Sets the sort order for states of a new discrete variable.void
setStateValueType(StateValueType value)
Sets theStateValueType
for the new variable.void
setValueType(VariableValueType value)
Sets theVariableValueType
for the new variable.
-
-
-
Constructor Detail
-
VariableDefinition
public VariableDefinition()
Initializes a new instance of theVariableDefinition
class.
-
VariableDefinition
public VariableDefinition(String dataColumn, String name, VariableValueType valueType)
Initializes a new instance of theVariableDefinition
class.- Parameters:
dataColumn
- The data column.name
- The name for the new variable.valueType
- TheVariableValueType
for the new variable, or null if this should be detected automatically.
-
VariableDefinition
public VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType)
Initializes a new instance of theVariableDefinition
class.- Parameters:
dataColumn
- The data column.name
- The name for the new variable.valueType
- TheVariableValueType
for the new variable, or null if this should be detected automatically.stateValueType
- TheStateValueType
for the new variable, or null if this should be detected automatically.
-
VariableDefinition
public VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType, VariableKind kind)
Initializes a new instance of theVariableDefinition
class.- Parameters:
dataColumn
- The data column.name
- The name for the new variable.valueType
- TheVariableValueType
for the new variable, or null if this should be detected automatically.stateValueType
- TheStateValueType
for the new variable, or null if this should be detected automatically.kind
- TheVariableKind
for the new variable.
-
-
Method Detail
-
getEmptyStringAction
public EmptyStringAction getEmptyStringAction()
Determines the action to take if an empty string is encountered.
-
setEmptyStringAction
public void setEmptyStringAction(EmptyStringAction value)
Determines the action to take if an empty string is encountered.
-
getDiscretizationMethod
public DiscretizationMethod getDiscretizationMethod()
Gets the method (algorithm) to use for discretization, if any.
-
setDiscretizationMethod
public void setDiscretizationMethod(DiscretizationMethod value)
Sets the method (algorithm) to use for discretization, if any.
-
getDiscretizationOptions
public DiscretizationOptions getDiscretizationOptions()
Gets options that specify how continuous data should be discretized, ifDiscretizationMethod
is notDiscretizationMethod.NONE
.
-
getSortOrder
public SortOrder getSortOrder()
Gets the sort order for states of a new discrete variable. Note that this value is ignored ifStateValueType
is notStateValueType.NONE
, whether specified or auto detected.
-
setSortOrder
public void setSortOrder(SortOrder value)
Sets the sort order for states of a new discrete variable. Note that this value is ignored ifStateValueType
is notStateValueType.NONE
, whether specified or auto detected.
-
getName
public String getName()
Gets the name for the new variable.
-
setName
public void setName(String value)
Sets the name for the new variable.
-
getValueType
public VariableValueType getValueType()
Gets theVariableValueType
for the new variable. If null, theVariableValueType
will be detected automatically.
-
setValueType
public void setValueType(VariableValueType value)
Sets theVariableValueType
for the new variable. If null, theVariableValueType
will be detected automatically.
-
getStateValueType
public StateValueType getStateValueType()
Gets theStateValueType
for the new variable. If null, theStateValueType
will be detected automatically.
-
setStateValueType
public void setStateValueType(StateValueType value)
Sets theStateValueType
for the new variable. If null, theStateValueType
will be detected automatically.
-
getKind
public VariableKind getKind()
Gets theVariableKind
for the new variable.
-
setKind
public void setKind(VariableKind value)
Sets theVariableKind
for the new variable.
-
getDataColumn
public String getDataColumn()
The name of the data column, containing the data used to generate the new variable.
-
setDataColumn
public void setDataColumn(String value)
The name of the data column, containing the data used to generate the new variable.
-
-