com.rapidminer.operator.nio.model
Class ExcelResultSetConfiguration

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

public class ExcelResultSetConfiguration
extends java.lang.Object
implements DataResultSetFactory

A class holding information about configuration of the Excel Result Set

Author:
Sebastian Land

Constructor Summary
ExcelResultSetConfiguration()
          This will create a completely empty result set configuration
ExcelResultSetConfiguration(ExcelExampleSource excelExampleSource)
          This constructor must read in all settings from the parameters of the given operator.
 
Method Summary
 void close()
          Closes all resources associated with this factory.
 void closeWorkbook()
           
 int getColumnLast()
           
 int getColumnOffset()
          Returns the ColumnOffset
 java.io.File getFile()
          This returns the file of the referenced excel file
 java.lang.String getResourceName()
          Returns the human readable name of the resource read (most often, this will be a file or URL).
 int getRowLast()
           
 int getRowOffset()
          Returns the RowOffset
 int getSheet()
           
 jxl.Workbook getWorkbook()
          This will return a workbook if already delivered with the configuration.
 boolean hasWorkbook()
          Returns whether getWorkbook() can be called without blocking.
 boolean isEmulatingOldNames()
          This returns whether the old naming style should be kept from prior to 5.1.000 versions.
 DataResultSet makeDataResultSet(Operator operator)
          Creates a result set.
 ExampleSetMetaData makeMetaData()
          Makes initial meta data.
 javax.swing.table.TableModel makePreviewTableModel(ProgressListener listener)
           
 void parseExcelRange(java.lang.String range)
           
 void setColumnLast(int columnLast)
           
 void setColumnOffset(int columnOffset)
           
 void setParameters(AbstractDataResultSetReader source)
          Sets the configuration parameters in the given reader operator.
 void setRowLast(int rowLast)
           
 void setRowOffset(int rowOffset)
           
 void setSheet(int sheet)
           
 void setWorkbookFile(java.io.File selectedFile)
          This will set the workbook file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelResultSetConfiguration

public ExcelResultSetConfiguration(ExcelExampleSource excelExampleSource)
                            throws OperatorException
This constructor must read in all settings from the parameters of the given operator.

Throws:
OperatorException

ExcelResultSetConfiguration

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

Method Detail

getRowOffset

public int getRowOffset()
Returns the RowOffset


getColumnOffset

public int getColumnOffset()
Returns the ColumnOffset


hasWorkbook

public boolean hasWorkbook()
Returns whether getWorkbook() can be called without blocking.


getWorkbook

public jxl.Workbook getWorkbook()
                         throws jxl.read.biff.BiffException,
                                java.io.IOException
This will return a workbook if already delivered with the configuration. This workbook must not be closed!

Throws:
java.io.IOException
jxl.read.biff.BiffException

getFile

public java.io.File getFile()
This returns the file of the referenced excel file


setWorkbookFile

public void setWorkbookFile(java.io.File selectedFile)
This will set the workbook file. It will assure that an existing preopened workbook will be closed if files differ.


getRowLast

public int getRowLast()

setRowLast

public void setRowLast(int rowLast)

getColumnLast

public int getColumnLast()

setColumnLast

public void setColumnLast(int columnLast)

getSheet

public int getSheet()

setSheet

public void setSheet(int sheet)

setRowOffset

public void setRowOffset(int rowOffset)

setColumnOffset

public void setColumnOffset(int columnOffset)

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
Specified by:
makePreviewTableModel in interface DataResultSetFactory
Throws:
OperatorException

closeWorkbook

public void closeWorkbook()

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

parseExcelRange

public void parseExcelRange(java.lang.String range)
                     throws OperatorException
Throws:
OperatorException

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

isEmulatingOldNames

public boolean isEmulatingOldNames()
This returns whether the old naming style should be kept from prior to 5.1.000 versions.


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