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 theVariableDefinitionclass.VariableDefinition(String dataColumn, String name, VariableValueType valueType)Initializes a new instance of theVariableDefinitionclass.VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType)Initializes a new instance of theVariableDefinitionclass.VariableDefinition(String dataColumn, String name, VariableValueType valueType, StateValueType stateValueType, VariableKind kind)Initializes a new instance of theVariableDefinitionclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDataColumn()The name of the data column, containing the data used to generate the new variable.DiscretizationMethodgetDiscretizationMethod()Gets the method (algorithm) to use for discretization, if any.DiscretizationOptionsgetDiscretizationOptions()Gets options that specify how continuous data should be discretized, ifDiscretizationMethodis notDiscretizationMethod.NONE.EmptyStringActiongetEmptyStringAction()Determines the action to take if an empty string is encountered.VariableKindgetKind()Gets theVariableKindfor the new variable.StringgetName()Gets the name for the new variable.SortOrdergetSortOrder()Gets the sort order for states of a new discrete variable.StateValueTypegetStateValueType()Gets theStateValueTypefor the new variable.VariableValueTypegetValueType()Gets theVariableValueTypefor the new variable.voidsetDataColumn(String value)The name of the data column, containing the data used to generate the new variable.voidsetDiscretizationMethod(DiscretizationMethod value)Sets the method (algorithm) to use for discretization, if any.voidsetEmptyStringAction(EmptyStringAction value)Determines the action to take if an empty string is encountered.voidsetKind(VariableKind value)Sets theVariableKindfor the new variable.voidsetName(String value)Sets the name for the new variable.voidsetSortOrder(SortOrder value)Sets the sort order for states of a new discrete variable.voidsetStateValueType(StateValueType value)Sets theStateValueTypefor the new variable.voidsetValueType(VariableValueType value)Sets theVariableValueTypefor the new variable.
-
-
-
Constructor Detail
-
VariableDefinition
public VariableDefinition()
Initializes a new instance of theVariableDefinitionclass.
-
VariableDefinition
public VariableDefinition(String dataColumn, String name, VariableValueType valueType)
Initializes a new instance of theVariableDefinitionclass.- Parameters:
dataColumn- The data column.name- The name for the new variable.valueType- TheVariableValueTypefor 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 theVariableDefinitionclass.- Parameters:
dataColumn- The data column.name- The name for the new variable.valueType- TheVariableValueTypefor the new variable, or null if this should be detected automatically.stateValueType- TheStateValueTypefor 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 theVariableDefinitionclass.- Parameters:
dataColumn- The data column.name- The name for the new variable.valueType- TheVariableValueTypefor the new variable, or null if this should be detected automatically.stateValueType- TheStateValueTypefor the new variable, or null if this should be detected automatically.kind- TheVariableKindfor 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, ifDiscretizationMethodis notDiscretizationMethod.NONE.
-
getSortOrder
public SortOrder getSortOrder()
Gets the sort order for states of a new discrete variable. Note that this value is ignored ifStateValueTypeis 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 ifStateValueTypeis 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 theVariableValueTypefor the new variable. If null, theVariableValueTypewill be detected automatically.
-
setValueType
public void setValueType(VariableValueType value)
Sets theVariableValueTypefor the new variable. If null, theVariableValueTypewill be detected automatically.
-
getStateValueType
public StateValueType getStateValueType()
Gets theStateValueTypefor the new variable. If null, theStateValueTypewill be detected automatically.
-
setStateValueType
public void setStateValueType(StateValueType value)
Sets theStateValueTypefor the new variable. If null, theStateValueTypewill be detected automatically.
-
getKind
public VariableKind getKind()
Gets theVariableKindfor the new variable.
-
setKind
public void setKind(VariableKind value)
Sets theVariableKindfor 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.
-
-