org.joone.io
Class XLSOutputSynapse

java.lang.Object
  extended by org.joone.engine.Synapse
      extended by org.joone.io.StreamOutputSynapse
          extended by org.joone.io.XLSOutputSynapse
All Implemented Interfaces:
java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, PlugInListener

public class XLSOutputSynapse
extends StreamOutputSynapse

This class allows data to be read from an Excel XLS formatted file. The class requires the specification of a file name and a worksheet name is optional.

See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
          The serial version ID for this object.
 
Fields inherited from class org.joone.io.StreamOutputSynapse
fifo, nextPlugIn
 
Fields inherited from class org.joone.engine.Synapse
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, outs, revLock
 
Constructor Summary
XLSOutputSynapse()
          The default constructor for this XLSOutputSynapse.
 
Method Summary
 java.util.TreeSet check()
          Checks and returns any problems found with the settings of this synapse.
 void flush()
          Write any remaining data to the XLS file.
 java.lang.String[] getAvailableSheetList()
          Obtains a list of available sheet names from the XLS file.
 java.lang.String getFileName()
          Returns the XLS file name used by this synapse.
 java.lang.String getSheetName()
          Gets the name of sheet within the XLS file that data should be written to.
 int getStartCol(int startCol)
          Gets the starting col (0 based) of the XLS sheet.
 int getStartRow(int startRow)
          Gets the starting row (0 based) of the XLS sheet.
 void setFileName(java.lang.String fn)
          Sets the XLS file name that this synapse should output data to.
 void setSheetName(java.lang.String sheetName)
          Sets the sheet name within the XLS file that this synapse should write data to.
 void setStartCol(int startCol)
          Set the starting col (0 based) of the XLS sheet.
 void setStartRow(int startRow)
          Set the starting row (0 based) of the XLS sheet.
 void write(Pattern pattern)
          Writes a Pattern to the XLS file.
 
Methods inherited from class org.joone.io.StreamOutputSynapse
addPlugIn, backward, dataChanged, forward, fwdPut, getFifo, getPlugIn, getSeparator, isBuffered, removeAllPlugIns, revGet, setArrays, setBuffered, setDimensions, setPlugIn, setSeparator
 
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdGet, fwdPattern_consume, fwdPattern_produce, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, init, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, readResolve, reset, revPattern_consume, revPattern_produce, revPut, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
The serial version ID for this object.

See Also:
Constant Field Values
Constructor Detail

XLSOutputSynapse

public XLSOutputSynapse()
The default constructor for this XLSOutputSynapse.

Method Detail

flush

public void flush()
Write any remaining data to the XLS file.


write

public void write(Pattern pattern)
Writes a Pattern to the XLS file.

Specified by:
write in class StreamOutputSynapse
Parameters:
pattern - The Pattern to write to the XLS file.

getFileName

public java.lang.String getFileName()
Returns the XLS file name used by this synapse.

Returns:
The XLS file name used by this synapse to output data to.

setFileName

public void setFileName(java.lang.String fn)
Sets the XLS file name that this synapse should output data to.

Parameters:
fn - The XLS file name that this synapse should output data to.

setSheetName

public void setSheetName(java.lang.String sheetName)
Sets the sheet name within the XLS file that this synapse should write data to.

Parameters:
sheetName - The sheet name within the XLS file that this synapse should write data to.

getAvailableSheetList

public java.lang.String[] getAvailableSheetList()
Obtains a list of available sheet names from the XLS file.

Returns:
An array of sheet names found with in the XLS file or null if the file has not been read yet.

getSheetName

public java.lang.String getSheetName()
Gets the name of sheet within the XLS file that data should be written to.

Returns:
The name of sheet within the XLS file that data should be written to.

check

public java.util.TreeSet check()
Checks and returns any problems found with the settings of this synapse.

Specified by:
check in interface NeuralElement
Overrides:
check in class StreamOutputSynapse
Returns:
A TreeSet of problems or errors found with this synapse.
See Also:
InputPaternListener, OutputPaternListener

getStartRow

public int getStartRow(int startRow)
Gets the starting row (0 based) of the XLS sheet.

Returns:
Starting row (0 based) of the XLS sheet.

getStartCol

public int getStartCol(int startCol)
Gets the starting col (0 based) of the XLS sheet.

Returns:
Starting col (0 based) of the XLS sheet.

setStartRow

public void setStartRow(int startRow)
Set the starting row (0 based) of the XLS sheet.


setStartCol

public void setStartCol(int startCol)
Set the starting col (0 based) of the XLS sheet.



Submit Feedback to pmarrone@users.sourceforge.net