com.rapidminer.operator.nio.model
Class CSVResultSetConfiguration

java.lang.Object
  extended by com.rapidminer.operator.nio.model.CSVResultSetConfiguration
All Implemented Interfaces:
DataResultSetFactory

public class CSVResultSetConfiguration
extends java.lang.Object
implements DataResultSetFactory

A class holding information about syntactical configuration for parsing CSV files

Author:
Simon Fischer

Constructor Summary
CSVResultSetConfiguration()
          This will create a completely empty result set configuration
CSVResultSetConfiguration(CSVExampleSource csvExampleSource)
          This constructor reads all settings from the parameters of the given operator.
 
Method Summary
 void close()
          Closes all resources associated with this factory.
 java.lang.String getColumnSeparators()
           
 java.lang.String getCommentCharacters()
           
 java.lang.String getCsvFile()
           
 java.io.File getCsvFileAsFile()
           
 java.nio.charset.Charset getEncoding()
           
 java.util.List<ParsingError> getErrors()
           
 char getEscapeCharacter()
           
 char getQuoteCharacter()
           
 java.lang.String getResourceName()
          Returns the human readable name of the resource read (most often, this will be a file or URL).
 boolean isSkipComments()
           
 boolean isTrimLines()
           
 boolean isUseQuotes()
           
 DataResultSet makeDataResultSet(Operator operator)
          Creates a result set.
 ExampleSetMetaData makeMetaData()
          Makes initial meta data.
 javax.swing.table.TableModel makePreviewTableModel(ProgressListener listener)
           
 void setColumnSeparators(java.lang.String columnSeparators)
           
 void setCommentCharacters(java.lang.String commentCharacters)
           
 void setCsvFile(java.lang.String csvFile)
           
 void setEncoding(java.nio.charset.Charset encoding)
           
 void setEscapeCharacter(char escapeCharacter)
           
 void setParameters(AbstractDataResultSetReader source)
          Sets the configuration parameters in the given reader operator.
 void setQuoteCharacter(char quoteCharacter)
           
 void setSkipComments(boolean skipComments)
           
 void setTrimLines(boolean trimLines)
           
 void setUseQuotes(boolean useQuotes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVResultSetConfiguration

public CSVResultSetConfiguration()
This will create a completely empty result set configuration


CSVResultSetConfiguration

public CSVResultSetConfiguration(CSVExampleSource csvExampleSource)
                          throws OperatorException
This constructor reads all settings from the parameters of the given operator.

Throws:
OperatorException
Method Detail

setParameters

public void setParameters(AbstractDataResultSetReader source)
Description copied from interface: DataResultSetFactory
Sets the configuration parameters in the given reader operator.

Specified by:
setParameters in interface DataResultSetFactory

makeDataResultSet

public DataResultSet makeDataResultSet(Operator operator)
                                throws OperatorException
Description copied from interface: DataResultSetFactory
Creates a result set. Make sure to call DataResultSetFactory.close() after using this method.

Specified by:
makeDataResultSet in interface DataResultSetFactory
Throws:
OperatorException

makePreviewTableModel

public javax.swing.table.TableModel makePreviewTableModel(ProgressListener listener)
                                                   throws OperatorException,
                                                          ParseException
Specified by:
makePreviewTableModel in interface DataResultSetFactory
Throws:
OperatorException
ParseException

setCsvFile

public void setCsvFile(java.lang.String csvFile)

getCsvFile

public java.lang.String getCsvFile()

getCsvFileAsFile

public java.io.File getCsvFileAsFile()

setUseQuotes

public void setUseQuotes(boolean useQuotes)

isUseQuotes

public boolean isUseQuotes()

setSkipComments

public void setSkipComments(boolean skipComments)

isSkipComments

public boolean isSkipComments()

setColumnSeparators

public void setColumnSeparators(java.lang.String columnSeparators)

getColumnSeparators

public java.lang.String getColumnSeparators()

setCommentCharacters

public void setCommentCharacters(java.lang.String commentCharacters)

getCommentCharacters

public java.lang.String getCommentCharacters()

setEscapeCharacter

public void setEscapeCharacter(char escapeCharacter)

getEscapeCharacter

public char getEscapeCharacter()

setQuoteCharacter

public void setQuoteCharacter(char quoteCharacter)

getQuoteCharacter

public char getQuoteCharacter()

setTrimLines

public void setTrimLines(boolean trimLines)

isTrimLines

public boolean isTrimLines()

setEncoding

public void setEncoding(java.nio.charset.Charset encoding)

getEncoding

public java.nio.charset.Charset getEncoding()

getResourceName

public java.lang.String getResourceName()
Description copied from interface: DataResultSetFactory
Returns the human readable name of the resource read (most often, this will be a file or URL).

Specified by:
getResourceName in interface DataResultSetFactory

makeMetaData

public ExampleSetMetaData makeMetaData()
Description copied from interface: DataResultSetFactory
Makes initial meta data. Only the number of rows should be filled in here. All other information will later be added by DataResultSetTranslationConfiguration

Specified by:
makeMetaData in interface DataResultSetFactory

getErrors

public java.util.List<ParsingError> getErrors()

close

public void close()
Description copied from interface: DataResultSetFactory
Closes all resources associated with this factory.

Specified by:
close in interface DataResultSetFactory


Copyright © 2001-2009 by Rapid-I