com.pmstation.spss.variable
Class SPSSVariable

java.lang.Object
  extended by com.pmstation.spss.variable.SPSSVariable
Direct Known Subclasses:
DateVariable, NumericVariable, StringVariable

public abstract class SPSSVariable
extends java.lang.Object

Abstract superclass for spss variables. Contains various information about variable common for all variable types.


Constructor Summary
SPSSVariable()
           
 
Method Summary
 java.lang.String getLabel()
          Gets the label.
 java.lang.String getLegacyName()
          Gets the legacy name.
 MissingValues getMissingValues()
          Gets the missing values defined for variable.
 java.lang.String getName()
          Gets the name.
 VariableFormat getPrintFormat()
          Gets the prints the format.
 ValueLabel getValueLabels()
          Gets the value labels.
 VariableFormat getWriteFormat()
          Gets the write format.
 boolean isCaseWeight()
          Checks if this variable is case weight.
abstract  java.lang.Object readFromStream(DecompressionInputStream in)
          Read variable value from stream.
 void setCaseWeight(boolean isCaseWeight)
          Sets the case weight.
 void setLabel(java.lang.String label)
          Sets the label.
 void setLegacyName(java.lang.String legacyName)
          Sets the legacy name.
 void setMissingValues(MissingValues missingValues)
          Sets the missing values.
 void setName(java.lang.String name)
          Sets the name.
 void setPrintFormat(VariableFormat printFormat)
          Sets the prints the format.
 void setValueLabels(ValueLabel valueLabels)
          Sets the value labels.
 void setWriteFormat(VariableFormat writeFormat)
          Sets the write format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPSSVariable

public SPSSVariable()
Method Detail

getName

public java.lang.String getName()
Gets the name. If there are extended name exists for this variable - returns it in another case - legacy name.

Returns:
the extended variable name

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the new name

getLabel

public java.lang.String getLabel()
Gets the label.

Returns:
the label

setLabel

public void setLabel(java.lang.String label)
Sets the label.

Parameters:
label - the new label

getMissingValues

public MissingValues getMissingValues()
Gets the missing values defined for variable. There are 5 options for missing values: one to three discrete values, value range and value range with discrete value.

Returns:
the missing values

setMissingValues

public void setMissingValues(MissingValues missingValues)
Sets the missing values.

Parameters:
missingValues - the new missing values

getPrintFormat

public VariableFormat getPrintFormat()
Gets the prints the format.

Returns:
the prints the format

setPrintFormat

public void setPrintFormat(VariableFormat printFormat)
Sets the prints the format.

Parameters:
printFormat - the new prints the format

getWriteFormat

public VariableFormat getWriteFormat()
Gets the write format.

Returns:
the write format

setWriteFormat

public void setWriteFormat(VariableFormat writeFormat)
Sets the write format.

Parameters:
writeFormat - the new write format

readFromStream

public abstract java.lang.Object readFromStream(DecompressionInputStream in)
                                         throws java.io.IOException
Read variable value from stream.

Parameters:
in - input stream
Returns:
variable value
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getValueLabels

public ValueLabel getValueLabels()
Gets the value labels.

Returns:
the value labels

setValueLabels

public void setValueLabels(ValueLabel valueLabels)
Sets the value labels.

Parameters:
valueLabels - the new value labels

getLegacyName

public java.lang.String getLegacyName()
Gets the legacy name. Name in record type 2. 8 characters length all capitalized

Returns:
the legacy name

setLegacyName

public void setLegacyName(java.lang.String legacyName)
Sets the legacy name.

Parameters:
legacyName - the new legacy name

isCaseWeight

public boolean isCaseWeight()
Checks if this variable is case weight.

Returns:
true, if is case weight

setCaseWeight

public void setCaseWeight(boolean isCaseWeight)
Sets the case weight.

Parameters:
isCaseWeight - the new case weight


Copyright © 2003-2004 pmStation.com. All Rights Reserved.