public class Variables
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected VarDisplay |
displayFmt
Class containing display formats (used to test if variabel contains
date/date time values)
|
protected Nvars |
nvars
Class containing the variable index
|
protected ValLabNames |
valueLabelNames
Class containing value label names
|
protected ValLabels |
valueLabels
Class containing variable to variable label map
|
protected VariableIndex |
varindex
Class containing the variable index
|
protected VarLabels |
varlabels
Class containing variable to variable label Map
|
protected VarNames |
varnames
Class containing variable names
|
protected VarTypes |
varTypes
Class containing string variable indicators
|
Constructor and Description |
---|
Variables()
Class constructor method
|
Modifier and Type | Method and Description |
---|---|
VarDisplay |
getDisplayFmt()
Method to retrieve the display format object
|
java.lang.Integer |
getNvars()
Method used to retrieve the number of variables represented on the JVM
from the Stata dataset
|
Nvars |
getNvarsObject()
Accessor to Nvars class object
|
ValLabels |
getValLabelsObject()
Accessor to ValLabels class object
|
ValLabNames |
getValLabNamesObject()
Accessor to ValLabNames class object
|
java.util.Map<java.lang.String,java.lang.String> |
getValueLabelNames()
The value label names associated with Stata variables
|
java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.String>> |
getValueLabels()
An object containing the value labels names as keys and the associated
int/string key/value pairs for the value to label mappings
|
java.util.List<java.lang.Integer> |
getVariableIndex()
Method used to retrieve a List of Integer values containing the
variable indices used to iterate over when constructing POJO
representations of the Stata dataset.
|
java.lang.Integer |
getVariableIndex(java.lang.Integer indx)
A method to retrieve a single variable index value
|
java.lang.String |
getVariableLabel(java.lang.String varnm)
Method used to retrieve the variable label for a single variable
|
java.util.Map<java.lang.String,java.lang.String> |
getVariableLabels()
Method to retrieve the variable name/variable label key/value pairs
|
java.lang.String |
getVariableName(java.lang.Integer varidx)
Method used to retrieve a single variable name given the variable
index value
|
java.util.List<java.lang.String> |
getVariableNames()
Method used to retrieve the list of variable names represented in this
POJO
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getVariableTypes()
Method to retrieve a Map object indicating whether or not variables
are of type string
|
VariableIndex |
getVarIndexObject()
Accessor to VariableIndex class object
|
java.lang.String |
getVarLabelName(java.lang.String varnm)
Method used to retrieve the variable label name associated with a
given variable
|
VarLabels |
getVarLabelsObject()
Accessor to VarLabels class object
|
VarNames |
getVarNamesObject()
Accessor to VarNames class object
|
java.lang.Boolean |
getVarType(java.lang.String varnm)
Method to retrieve whether a variable is a string type or not
|
VarTypes |
getVarTypesObject()
Accessor to VarTypes class object
|
java.lang.Boolean |
isDateTime(java.lang.String varnm)
Returns a boolean indicating whether or not the variable contains
date/date time values
|
private void |
setNvars(VariableIndex varindex)
Initialize an instance of an Nvars class object
|
private void |
setValLabels(VariableIndex varindex)
Initialize an instance of a ValLabels class object
|
private void |
setValLabNames(VariableIndex varindex)
Initialize an instance of a ValLabNames class object
|
private void |
setVariableIndex()
Initializes an instance of a VariableIndex object used by other
methods to construct POJO representations of the variables' metadata.
|
private void |
setVarLabels(VariableIndex varindex)
Initialize an instance of a VarLabels class object
|
private void |
setVarNames(VariableIndex varindex)
Initializes an instance of a VarNames class object
|
private void |
setVarTypes(VariableIndex varindex)
Initialize an instance of a VarTypes class object
|
protected VariableIndex varindex
protected Nvars nvars
protected VarNames varnames
protected VarLabels varlabels
protected ValLabNames valueLabelNames
protected ValLabels valueLabels
protected VarTypes varTypes
protected VarDisplay displayFmt
private void setVarNames(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setNvars(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setVarLabels(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setValLabNames(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setValLabels(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setVarTypes(VariableIndex varindex)
varindex
- A VariableIndex object used to identify the variables
over which the method will iterate over.private void setVariableIndex()
public java.util.List<java.lang.Integer> getVariableIndex()
public java.lang.Integer getVariableIndex(java.lang.Integer indx)
indx
- The integer value of the element from the variable index
list to retrievepublic java.lang.Integer getNvars()
public java.util.List<java.lang.String> getVariableNames()
public java.lang.String getVariableName(java.lang.Integer varidx)
varidx
- The integer value for the position of the List object
containing the variable namepublic java.util.Map<java.lang.String,java.lang.String> getVariableLabels()
public java.lang.String getVariableLabel(java.lang.String varnm)
varnm
- The variable name for which the associated variable label
should be returned.public java.util.Map<java.lang.String,java.lang.String> getValueLabelNames()
public java.lang.String getVarLabelName(java.lang.String varnm)
varnm
- the variable name for which the value label name should
be retrievedpublic java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,java.lang.String>> getValueLabels()
public java.util.Map<java.lang.String,java.lang.Boolean> getVariableTypes()
public java.lang.Boolean getVarType(java.lang.String varnm)
varnm
- The variable name to checkpublic VariableIndex getVarIndexObject()
public Nvars getNvarsObject()
public VarNames getVarNamesObject()
public VarLabels getVarLabelsObject()
public ValLabNames getValLabNamesObject()
public ValLabels getValLabelsObject()
public VarTypes getVarTypesObject()
public VarDisplay getDisplayFmt()
public java.lang.Boolean isDateTime(java.lang.String varnm)
varnm
- The variable index to check