public class SPSSStringVariable extends SPSSVariable
| Modifier and Type | Field and Description |
|---|---|
List<String> |
data
a list of data values used to load the file into memory
|
List<SPSSVariable> |
segments
list of segments for long string variables *
|
String |
value
a single data value used when reading data from disk
|
categoryMap, valueLabelRecord, variableRecord| Constructor and Description |
|---|
SPSSStringVariable(SPSSFile file) |
| Modifier and Type | Method and Description |
|---|---|
SPSSVariableCategory |
addCategory(byte[] byteValue,
String label)
Adds a category to the variable
|
SPSSVariableCategory |
getCategory(byte[] byteValue)
Gets a category for this variable based on a byte[8] value
|
SPSSVariableCategory |
getCategory(String strValue)
Gets a category for this variable based on a double value
|
int |
getNumberOfObservations() |
String |
getSPSSFormat() |
String |
getValueAsString(int obsNumber,
FileFormatInfo dataFormat)
Returns an observation value as a string
|
void |
setLength(int value)
Sets the variable length.
|
getAlignmentLabel, getDDI2, getDDI2, getDDI3CategoryScheme, getDDI3CodeScheme, getDDI3DataItem, getDDI3DataType, getDDI3DefaultCategorySchemeID, getDDI3DefaultCodeSchemeID, getDDI3ProprietaryDataItem, getDDI3RepresentationType, getDDI3Variable, getDecimals, getLabel, getLength, getLength, getMeasureLabel, getName, getNumber, getShortName, hasValueLabels, isDate, isMissingValueCode, isMissingValueCodepublic List<SPSSVariable> segments
public String value
public SPSSStringVariable(SPSSFile file)
public int getNumberOfObservations()
getNumberOfObservations in class SPSSVariablepublic void setLength(int value)
public SPSSVariableCategory addCategory(byte[] byteValue, String label)
addCategory in class SPSSVariablepublic SPSSVariableCategory getCategory(byte[] byteValue)
getCategory in class SPSSVariablepublic SPSSVariableCategory getCategory(String strValue)
public String getSPSSFormat()
getSPSSFormat in class SPSSVariablepublic String getValueAsString(int obsNumber, FileFormatInfo dataFormat) throws SPSSFileException
getValueAsString in class SPSSVariableSPSSFileExceptionCopyright © 2016. All rights reserved.