public class VariableAttributes extends java.lang.Object implements java.lang.Comparable<VariableAttributes>
Constructor and Description |
---|
VariableAttributes(java.lang.String variableName,
int order) |
VariableAttributes(java.lang.String name,
java.lang.String label,
ItemType itemType,
DataType dataType,
int order,
java.lang.String itemGroup) |
VariableAttributes(VariableName variableName,
int order) |
VariableAttributes(VariableName variableName,
VariableLabel variableLabel,
DataType dataType,
int order) |
VariableAttributes(VariableName variableName,
VariableLabel variableLabel,
ItemType itemType,
DataType dataType,
int order,
java.lang.String itemGroup) |
Modifier and Type | Method and Description |
---|---|
void |
addAllCategories(java.lang.String optionScoreKey) |
void |
clearCategory() |
int |
compareTo(VariableAttributes o)
compare by item name.
|
double |
computeItemScore(double response) |
double |
computeItemScore(int response) |
double |
computeItemScore(java.lang.String response)
First checks for missing data.
|
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
getAttributeArray() |
java.lang.String |
getDatabaseTypeString()
For use when creating database columns from this object
|
DataType |
getDataType() |
java.lang.String |
getItemGroup() |
ItemScoring |
getItemScoring() |
ItemType |
getItemType() |
VariableLabel |
getLabel() |
java.lang.Double |
getMaximumPossibleItemScore() |
double |
getMaxItemScore() |
double |
getMinimumPossibleItemScore() |
VariableName |
getName() |
SpecialDataCodes |
getSpecialDataCodes() |
java.lang.String |
getSubscale(boolean useItemNameWhenEmpty)
This version of getItemGroup is needed for com.itemanalysis.psychometrics.rasch.JMLE.
|
int |
getTestItemOrder() |
VariableType |
getType() |
int |
getVarcharSize() |
int |
hashCode() |
boolean |
hasScoring() |
boolean |
isMissing(java.lang.String response) |
int |
positionInDb()
Mostly used for ordering variables according to their order in the database or result set
|
java.lang.String |
printAttributes() |
java.lang.String |
printOptionScoreKey() |
double[] |
scoreArray() |
void |
setDataType(DataType dataType) |
void |
setItemGroup(java.lang.String itemGroup) |
void |
setItemScoring(ItemScoring itemScoring) |
void |
setItemType(ItemType itemType) |
void |
setLabel(java.lang.String label) |
void |
setName(VariableName name) |
void |
setSpecialDataCodes(SpecialDataCodes specialDataCodes) |
void |
setTestItemOrder(int testItemOrder) |
void |
setVarcharSize(int varcharSize) |
java.lang.String |
toString() |
public VariableAttributes(java.lang.String name, java.lang.String label, ItemType itemType, DataType dataType, int order, java.lang.String itemGroup)
name
- name of variablelabel
- label for variableitemType
- type of item (see VariableType class)dataType
- type of data (see VariableType class)order
- column position of teh variable in the databaseitemGroup
- a code indicating the item group to which the item belongspublic VariableAttributes(VariableName variableName, VariableLabel variableLabel, ItemType itemType, DataType dataType, int order, java.lang.String itemGroup)
public VariableAttributes(VariableName variableName, VariableLabel variableLabel, DataType dataType, int order)
public VariableAttributes(VariableName variableName, int order)
public VariableAttributes(java.lang.String variableName, int order)
public VariableName getName()
public void setName(VariableName name)
public VariableLabel getLabel()
public void setLabel(java.lang.String label)
public VariableType getType()
public DataType getDataType()
public ItemType getItemType()
public void setItemType(ItemType itemType)
public void setDataType(DataType dataType)
public boolean hasScoring()
public void setItemScoring(ItemScoring itemScoring)
public int positionInDb()
public java.lang.String getItemGroup()
public void setSpecialDataCodes(SpecialDataCodes specialDataCodes)
public boolean isMissing(java.lang.String response)
public double computeItemScore(java.lang.String response)
response
- an item response.public double computeItemScore(double response)
public double computeItemScore(int response)
public double getMaxItemScore()
public java.lang.String[] getAttributeArray()
public java.lang.String getSubscale(boolean useItemNameWhenEmpty)
useItemNameWhenEmpty
- public void setItemGroup(java.lang.String itemGroup)
public void setTestItemOrder(int testItemOrder)
public int getTestItemOrder()
public void setVarcharSize(int varcharSize)
public int getVarcharSize()
public java.lang.String getDatabaseTypeString()
public int compareTo(VariableAttributes o)
compareTo
in interface java.lang.Comparable<VariableAttributes>
o
- another VariableInfo objectpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public SpecialDataCodes getSpecialDataCodes()
public java.lang.String printAttributes()
public void addAllCategories(java.lang.String optionScoreKey)
public ItemScoring getItemScoring()
public double getMinimumPossibleItemScore()
public java.lang.Double getMaximumPossibleItemScore()
public void clearCategory()
public double[] scoreArray()
public java.lang.String printOptionScoreKey()