uk.ac.ebi.adfconverter.common.tools.file.writer
Interface DataWriter

All Known Implementing Classes:
PlainTextDataFileWriter, WorkBookFileWriterjxl

public interface DataWriter

Interface for all file format classes used in reading data

Since:
02/07/2004 ADF MAGE-TOOL - MicroArray Informatics Team / European Bioinformatics Institute (EBI) ArrayExpress License: ============================================================================== Copyright (c) 2002 The European Bioinformatics Institute. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name ArrayExpress must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact arrayexpress@ebi.ac.uk 4. Products derived from this software may not be called "ArrayExpress" nor may "ArrayExpress" appear in their names without prior written permission of the ArrayExpress developers. 5. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by ArrayExpress (http://www.ebi.ac.uk/arrayexpress)" THIS SOFTWARE IS PROVIDED BY THE ARRAYEXPRESS GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARRAYEXPRESS GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The European Bioinformatics Institute may publish revised and/or new versions of this license with new releases of ArrayExpress software. ==============================================================================
Version:
1
Author:
Pierre MARGUERITE
See Also:
DataTable

Method Summary
 void closeFile()
          Closes a data text file.
 void isErasable(boolean erase)
          Sets if a file should be overwritten, if it exists
 void openFile()
          Opens a data file for reading or writing
 void setAppend(boolean append)
          sets if the write writes at the end of the file or overwrite it
 void writeDataLine(DataRow row)
           Write a data row in a file Only when termination requirements have been met, the method should return a DataRow/code> object.
 void writeHeaderLine(DataTableHeader header)
           Write table header into a line Only when termination requirements have been met, the method should return a DataRow/code> object.
 

Method Detail

closeFile

public void closeFile()
               throws java.io.IOException
Closes a data text file.

Throws:
java.io.IOException - if an error occurs during file closing.

isErasable

public void isErasable(boolean erase)
Sets if a file should be overwritten, if it exists

Parameters:
erase - true, if the the file exists, it will be overwritten.

openFile

public void openFile()
              throws java.io.IOException
Opens a data file for reading or writing

Throws:
java.io.IOException - if an error occurs during file opening.

setAppend

public void setAppend(boolean append)
sets if the write writes at the end of the file or overwrite it

Parameters:
append -
Since:
05 07 04

writeDataLine

public void writeDataLine(DataRow row)
                   throws java.io.IOException

Write a data row in a file Only when termination requirements have been met, the method should return a DataRow/code> object.

Parameters:
row - a data row to write
Throws:
java.io.IOException - if an error occurs during data writing.
Since:
02 07 04

writeHeaderLine

public void writeHeaderLine(DataTableHeader header)
                     throws java.io.IOException

Write table header into a line Only when termination requirements have been met, the method should return a DataRow/code> object.

Parameters:
header - the table headre to write in the file
Throws:
java.io.IOException - if an error occurs during header (first line) writing.
Since:
02 07 04


European Bioinformatics InstituteMicroarray Informatics Team