fr.reseaumexico.model.writer
Class MexicoXmlWriter<M>

java.lang.Object
  extended by java.io.Writer
      extended by java.io.OutputStreamWriter
          extended by java.io.FileWriter
              extended by fr.reseaumexico.model.writer.XmlWriter<M>
                  extended by fr.reseaumexico.model.writer.MexicoXmlWriter<M>
All Implemented Interfaces:
MexicoXmlConstant, Closeable, Flushable, Appendable
Direct Known Subclasses:
ExperimentDesignXmlWriter, InputDesignXmlWriter

public abstract class MexicoXmlWriter<M>
extends XmlWriter<M>
implements MexicoXmlConstant

Abstract writer create mexico files with specific model

Since:
0.1
Author:
sletellier

Field Summary
 
Fields inherited from class fr.reseaumexico.model.writer.XmlWriter
INDENT, model
 
Fields inherited from class java.io.Writer
lock
 
Fields inherited from interface fr.reseaumexico.model.MexicoXmlConstant
DISTRIBUTION_PARAMETER_NAME, DISTRIBUTION_PARAMETER_VALUE, DISTRIBUTION_PARAMETER_VALUE_TYPE, DOMAIN, DOMAIN_DISTRIBUTION_NAME, DOMAIN_DISTRIBUTION_PARAMETER, DOMAIN_LEVEL, DOMAIN_NAME, DOMAIN_NOMINAL_VALUE, DOMAIN_VALUE_TYPE, EXPERIMENT_DESIGN, EXPERIMENT_DESIGN_AUTHOR, EXPERIMENT_DESIGN_DATE, EXPERIMENT_DESIGN_DESCRIPTION, EXPERIMENT_DESIGN_ID, EXPERIMENT_DESIGN_LICENCE, FACTOR, FACTOR_DESCRIPTION, FACTOR_ID, FACTOR_NAME, FACTOR_UNIT, FACTORS, FEATURE, FEATURE_NAME, FEATURE_VALUE, FEATURE_VALUE_TYPE, INPUT_DESIGN, INPUT_DESIGN_DATE, LEVEL_VALUE, LEVEL_WEIGHT, SCENARIO, SCENARIO_FACTOR_VALUES, SCENARIO_NAME, SCENARIO_ORDER_NUMBER
 
Constructor Summary
protected MexicoXmlWriter(File file, M model)
           
 
Method Summary
protected  void addAllFeature(XmlNode factorXmlNode, Collection<Feature> features)
           
 void addParameter(XmlNode xmlNode, String parameterName, Object value)
           
 String formatDate(Date toFormat)
           
 
Methods inherited from class fr.reseaumexico.model.writer.XmlWriter
getRootElement, write
 
Methods inherited from class java.io.OutputStreamWriter
close, flush, getEncoding, write, write, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MexicoXmlWriter

protected MexicoXmlWriter(File file,
                          M model)
                   throws IOException
Throws:
IOException
Method Detail

addParameter

public void addParameter(XmlNode xmlNode,
                         String parameterName,
                         Object value)

addAllFeature

protected void addAllFeature(XmlNode factorXmlNode,
                             Collection<Feature> features)

formatDate

public String formatDate(Date toFormat)


Copyright © 2011-2012 Code Lutin. All Rights Reserved.