fhm.edu.fem.util.io
Class FEMINSaver

java.lang.Object
  extended by fhm.edu.fem.util.io.FEMINSaver

public class FEMINSaver
extends java.lang.Object

Class Description: Used to save new FEMIN files based on the data contained by the FEMManager

Author:
Thomas Woellert (thomas@woellert.net), Stefan Weissbach (weissbst@gmx.de)

Field Summary
protected static Logger localLogger
           
 
Constructor Summary
FEMINSaver()
          Create a new FEMINSaver
 
Method Summary
 boolean save(java.io.File outFile, boolean femPlotterCompatible)
          Save all data (which is stored in the FEMManager) to the given file in FEMIN style
protected  boolean writeBorders(java.io.StringWriter writer, BorderList borderList)
          Write the Borders to the file
protected  boolean writeCalculations(java.io.StringWriter writer, java.util.List<Calculation> calculationList)
          Write the Calculations to the file
protected  boolean writeCloseFooter(java.io.StringWriter writer)
          Write the closing footer of the file
protected  boolean writeElements(java.io.StringWriter writer, boolean femPlotterCompatible, ElementList elementList)
          Write the Elements to the file
protected  boolean writeFEMApproach(java.io.StringWriter writer, boolean femPlotterCompatible, int femApproach)
          Write the FEM Approach to the file
protected  boolean writeNodes(java.io.StringWriter writer, boolean femPlotterCompatible, int femApproach, NodeList nodeList)
          Write the Nodes to the file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localLogger

protected static Logger localLogger
Constructor Detail

FEMINSaver

public FEMINSaver()
Create a new FEMINSaver

Method Detail

save

public boolean save(java.io.File outFile,
                    boolean femPlotterCompatible)
Save all data (which is stored in the FEMManager) to the given file in FEMIN style

Parameters:
outFile, - the file to save to
femPlotterCompatible, - true if the file should be saved FEM_PLOTTER compatible
Returns:
true if all went well, false otherwise

writeBorders

protected boolean writeBorders(java.io.StringWriter writer,
                               BorderList borderList)
Write the Borders to the file

Parameters:
writer, - the writer to use
borderList, - the border list to write out
Returns:
true if all went well, false otherwise

writeCalculations

protected boolean writeCalculations(java.io.StringWriter writer,
                                    java.util.List<Calculation> calculationList)
Write the Calculations to the file

Parameters:
writer, - the writer to use
calculationList, - the calculation list to write out
Returns:
true if all went well, false otherwise

writeCloseFooter

protected boolean writeCloseFooter(java.io.StringWriter writer)
Write the closing footer of the file

Parameters:
writer, - the writer to use
Returns:
true if all went well, false otherwise

writeElements

protected boolean writeElements(java.io.StringWriter writer,
                                boolean femPlotterCompatible,
                                ElementList elementList)
Write the Elements to the file

Parameters:
writer, - the writer to use
femPlotterCompatible, - true if FEM_PLOTTER compatible
elementList, - the element list to write out
Returns:
true if all went well, false otherwise

writeFEMApproach

protected boolean writeFEMApproach(java.io.StringWriter writer,
                                   boolean femPlotterCompatible,
                                   int femApproach)
Write the FEM Approach to the file

Parameters:
writer, - the writer to use
femPlotterCompatible, - true if FEM_PLOTTER compatible
femApproach, - the approach to write out
Returns:
true if all went well, false otherwise

writeNodes

protected boolean writeNodes(java.io.StringWriter writer,
                             boolean femPlotterCompatible,
                             int femApproach,
                             NodeList nodeList)
Write the Nodes to the file

Parameters:
writer, - the writer to use
femPlotterCompatible, - true if FEM_PLOTTER compatible
femApproach, - the approach to determine how to write certain things to the file
nodeList, - the node list to write to the file
Returns:
true if all went well, false otherwise