com.rapidminer.operator.io
Class SPSSExampleSource

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.io.AbstractReader<ExampleSet>
              extended by com.rapidminer.operator.io.AbstractExampleSource
                  extended by com.rapidminer.operator.io.BytewiseExampleSource
                      extended by com.rapidminer.operator.io.SPSSExampleSource
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>

public class SPSSExampleSource
extends BytewiseExampleSource

This operator can read spss files.

Author:
Tobias Malbrecht
Keywords:
spss

Nested Class Summary
 
Nested classes/interfaces inherited from class com.rapidminer.operator.io.AbstractReader
AbstractReader.ReaderDescription
 
Field Summary
static java.lang.String[] ATTRIBUTE_NAMING_MODES
          String descriptions of attribute naming modes.
static java.lang.String PARAMETER_ATTRIBUTE_NAMING_MODE
          The parameter name for "Determines which SPSS variable properties should be used for attribute naming.
static java.lang.String PARAMETER_RECODE_USER_MISSINGS
          The parameter name for "Recode SPSS user missings to missing values.
static java.lang.String PARAMETER_SAMPLE_RATIO
          The parameter name for "The fraction of the data set which should be read (1 = all; only used if sample_size = -1)"
static java.lang.String PARAMETER_SAMPLE_SIZE
          The parameter name for "The exact number of samples which should be read (-1 = all; if not -1, sample_ratio will not have any effect)"
static java.lang.String PARAMETER_USE_VALUE_LABELS
          The parameter name for "Use SPSS value labels as values.
static int USE_VAR_LABEL
          Only use variable label as attribute name.
static int USE_VAR_LABEL_NAMED
          Use variable label with name in parentheses as attribute name.
static int USE_VAR_NAME
          Only use variable name as attribute name.
static int USE_VAR_NAME_LABELED
          Use variable name with label in parentheses as attribute name.
 
Fields inherited from class com.rapidminer.operator.io.BytewiseExampleSource
fileInputPort, filePortHandler, GENERIC_ERROR_MESSAGE, LENGTH_BYTE, LENGTH_DOUBLE, LENGTH_INT_32, PARAMETER_DATAMANAGEMENT, PARAMETER_FILENAME, UNSPECIFIED_ERROR_MESSAGE
 
Constructor Summary
SPSSExampleSource(OperatorDescription description)
           
 
Method Summary
protected  java.lang.String getFileSuffix()
          Returns the suffix of the files which should be read by the input operator.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
protected  ExampleSet readStream(java.io.InputStream inputStream, DataRowFactory dataRowFactory)
          Reads the given file and constructs an example set from the read data.
 
Methods inherited from class com.rapidminer.operator.io.BytewiseExampleSource
createExampleSet, extract2ByteInt, extractDouble, extractFloat, extractInt, extractString, read, read, read, read, readWithoutLengthCheck
 
Methods inherited from class com.rapidminer.operator.io.AbstractExampleSource
getGeneratedMetaData, read
 
Methods inherited from class com.rapidminer.operator.io.AbstractReader
addAnnotations, canMakeReaderFor, createReader, doWork, getFileParameterForOperator, isMetaDataCacheable, registerOperator, registerReaderDescription, supportsEncoding
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, assumePreconditionsSatisfied, checkAll, checkAllExcludingMetaData, checkDeprecations, checkForStop, checkIO, checkProperties, clear, clearErrorList, cloneOperator, collectErrors, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, freeMemory, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getResourceConsumptionEstimator, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isEnabled, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, lookupOperator, makeDirty, makeDirtyOnUpdate, notifyRenaming, performAdditionalChecks, preAutoWire, processFinished, processStarts, producesOutput, propagateDirtyness, register, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, unregisterOperator, updateExecutionOrder, walk, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMETER_ATTRIBUTE_NAMING_MODE

public static final java.lang.String PARAMETER_ATTRIBUTE_NAMING_MODE
The parameter name for "Determines which SPSS variable properties should be used for attribute naming."

See Also:
Constant Field Values

PARAMETER_USE_VALUE_LABELS

public static final java.lang.String PARAMETER_USE_VALUE_LABELS
The parameter name for "Use SPSS value labels as values."

See Also:
Constant Field Values

PARAMETER_RECODE_USER_MISSINGS

public static final java.lang.String PARAMETER_RECODE_USER_MISSINGS
The parameter name for "Recode SPSS user missings to missing values."

See Also:
Constant Field Values

PARAMETER_SAMPLE_RATIO

public static final java.lang.String PARAMETER_SAMPLE_RATIO
The parameter name for "The fraction of the data set which should be read (1 = all; only used if sample_size = -1)"

See Also:
Constant Field Values

PARAMETER_SAMPLE_SIZE

public static final java.lang.String PARAMETER_SAMPLE_SIZE
The parameter name for "The exact number of samples which should be read (-1 = all; if not -1, sample_ratio will not have any effect)"

See Also:
Constant Field Values

USE_VAR_NAME

public static final int USE_VAR_NAME
Only use variable name as attribute name.

See Also:
Constant Field Values

USE_VAR_LABEL

public static final int USE_VAR_LABEL
Only use variable label as attribute name.

See Also:
Constant Field Values

USE_VAR_NAME_LABELED

public static final int USE_VAR_NAME_LABELED
Use variable name with label in parentheses as attribute name.

See Also:
Constant Field Values

USE_VAR_LABEL_NAMED

public static final int USE_VAR_LABEL_NAMED
Use variable label with name in parentheses as attribute name.

See Also:
Constant Field Values

ATTRIBUTE_NAMING_MODES

public static final java.lang.String[] ATTRIBUTE_NAMING_MODES
String descriptions of attribute naming modes.

Constructor Detail

SPSSExampleSource

public SPSSExampleSource(OperatorDescription description)
Method Detail

getFileSuffix

protected java.lang.String getFileSuffix()
Description copied from class: BytewiseExampleSource
Returns the suffix of the files which should be read by the input operator.

Specified by:
getFileSuffix in class BytewiseExampleSource

readStream

protected ExampleSet readStream(java.io.InputStream inputStream,
                                DataRowFactory dataRowFactory)
                         throws java.io.IOException,
                                UndefinedParameterError
Description copied from class: BytewiseExampleSource
Reads the given file and constructs an example set from the read data.

Specified by:
readStream in class BytewiseExampleSource
Throws:
java.io.IOException
UndefinedParameterError

getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Description copied from class: Operator
Returns a list of ParameterTypes describing the parameters of this operator. The default implementation returns an empty list if no input objects can be retained and special parameters for those input objects which can be prevented from being consumed. ATTENTION! This will create new parameterTypes. For calling already existing parameter types use getParameters().getParameterTypes();

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class BytewiseExampleSource


Copyright © 2001-2009 by Rapid-I