com.rapidminer.operator.io
Class URLExampleSource

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.URLExampleSource
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>

public class URLExampleSource
extends AbstractExampleSource

This operator reads an example set from an URL. The format has to be a CSV format with ';' as column separator and nominal values have to be quoted with a double quote ("). A quote inside of a nominal value has to be escaped by a backslash like in \". The first row is allowed to contain the column names which has to be indicated by the corresponding parameter. Comments are not allowed, unknown attribute values can be marked with empty strings or a question mark.

This operator is not nearly as powerful as the operators ExampleSource or SimpleExampleSource but is on the other hand able to read data from arbitrary places as long as the format fits the specification above. Please note also that the usage of this operator hardly allows for a correct meta data description which might lead to problems if the meta data between training and test set differ in a learning scenario.

Attribute roles can not be directly set during loading but the operator ChangeAttributeRole has to be used after loading in order to change the roles.

Author:
Ingo Mierswa
Keywords:
url

Nested Class Summary
 
Nested classes/interfaces inherited from class com.rapidminer.operator.io.AbstractReader
AbstractReader.ReaderDescription
 
Field Summary
static java.lang.String PARAMETER_COLUMN_SEPARATORS
           
static java.lang.String PARAMETER_DECIMAL_POINT_CHARACTER
          The parameter name for "Character that is used as decimal point.
static java.lang.String PARAMETER_READ_ATTRIBUTE_NAMES
           
static java.lang.String PARAMETER_SKIP_ERROR_LINES
           
static java.lang.String PARAMETER_URL
           
 
Constructor Summary
URLExampleSource(OperatorDescription description)
           
 
Method Summary
 ExampleSet createExampleSet()
          Creates (or reads) the ExampleSet that will be returned by Operator.apply().
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
protected  boolean supportsEncoding()
           
 
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
 
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_URL

public static final java.lang.String PARAMETER_URL
See Also:
Constant Field Values

PARAMETER_COLUMN_SEPARATORS

public static final java.lang.String PARAMETER_COLUMN_SEPARATORS
See Also:
Constant Field Values

PARAMETER_DECIMAL_POINT_CHARACTER

public static final java.lang.String PARAMETER_DECIMAL_POINT_CHARACTER
The parameter name for "Character that is used as decimal point."

See Also:
Constant Field Values

PARAMETER_READ_ATTRIBUTE_NAMES

public static final java.lang.String PARAMETER_READ_ATTRIBUTE_NAMES
See Also:
Constant Field Values

PARAMETER_SKIP_ERROR_LINES

public static final java.lang.String PARAMETER_SKIP_ERROR_LINES
See Also:
Constant Field Values
Constructor Detail

URLExampleSource

public URLExampleSource(OperatorDescription description)
Method Detail

createExampleSet

public ExampleSet createExampleSet()
                            throws OperatorException
Description copied from class: AbstractExampleSource
Creates (or reads) the ExampleSet that will be returned by Operator.apply().

Specified by:
createExampleSet in class AbstractExampleSource
Throws:
OperatorException

supportsEncoding

protected boolean supportsEncoding()
Overrides:
supportsEncoding in class AbstractReader<ExampleSet>

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 AbstractReader<ExampleSet>


Copyright © 2001-2009 by Rapid-I