/*
 *                      Nividic development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the microarray platform
 * of the cole Normale Suprieure and the individual authors.
 * These should be listed in @author doc comments.
 *
 * For more information on the Nividic project and its aims,
 * or to join the Nividic mailing list, visit the home page
 * at:
 *
 *      http://www.transcriptome.ens.fr/nividic
 *
 */

package fr.ens.transcriptome.nividic.om.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

import fr.ens.transcriptome.nividic.om.ExpressionMatrix;
import fr.ens.transcriptome.nividic.om.translators.Translator;

/**
 * Abstract class to write ExpressionMatrixDimension files
 * @author Lory Montout
 */
public abstract class ExpressionMatrixWriter {

  private OutputStream outputStream;
  private Translator featureAnnotation;

  //
  // Getters
  //

  /**
   * Get the outputStream.
   * @return Returns the outputStream
   */
  public OutputStream getOutputStream() {
    return outputStream;
  }

  /**
   * Get the feature annotation object.
   * @return the feature annotation object.
   */
  public Translator getFeatureAnnotation() {
    return featureAnnotation;
  }

  //
  // Setters
  //

  /**
   * Set the feature annotation object.
   * @param featureAnnotation the feature annotation object.
   */
  public void setFeatureAnnotation(final Translator featureAnnotation) {
    this.featureAnnotation = featureAnnotation;
  }

  /**
   * Set the output stream
   * @param outputStream The outputStream to set
   */
  public void setOutputStream(final OutputStream outputStream) {
    this.outputStream = outputStream;
  }

  //
  // Abstract methods
  //

  /**
   * Write data.
   * @param em ExpressionMatrix to write
   * @throws NividicIOException if an error occurs while writing data
   */
  public abstract void write(final ExpressionMatrix em)
      throws NividicIOException;

  //
  // Constructor
  //

  /**
   * Public constructor.
   * @param file file to read
   * @throws NividicIOException if an error occurs while reading the file or if
   *           the file is null.
   */
  public ExpressionMatrixWriter(final File file) throws NividicIOException {
    if (file == null)
      throw new NividicIOException("No file to load");

    try {
      setOutputStream(new FileOutputStream(file));
    } catch (FileNotFoundException e) {
      throw new NividicIOException("Error while reading file : "
          + file.getName());
    }
  }

  /**
   * Public constructor
   * @param is Input stream to read
   * @throws NividicIOException if the stream is null
   */
  public ExpressionMatrixWriter(final OutputStream is)
      throws NividicIOException {
    setOutputStream(is);
  }

}
@@ -1154,33 +1154,26 @@
 nslator 
-featureAnnotation
+translator
 ;%0A%0A  //%0A
@@ -1463,58 +1463,44 @@
  get
-FeatureAnnotation() %7B%0A    return featureAnnotation
+Translator() %7B%0A    return translator
 ;%0A  
@@ -1584,33 +1584,26 @@
  @param 
-featureAnnotation
+translator
  the fea
@@ -1653,25 +1653,18 @@
  set
-FeatureAnnotation
+Translator
 (fin
@@ -1681,75 +1681,54 @@
 tor 
-featureAnnotation) %7B%0A    this.featureAnnotation = featureAnnotation
+translator) %7B%0A    this.translator = translator
 ;%0A  

Remplace FeatureAnnotation by Translator