Klasse FileData

java.lang.Object
net.simplace.sim.io.FileData

public class FileData extends Object
Autor:
Andreas Enders
  • Konstruktordetails

    • FileData

      public FileData(String aPathname, String aContent, FWSimSession aActiveInSession, String aDivider, String aProjectID)
      Parameter:
      aPathname -
      aActiveInSession -
      aDivider -
      aProjectID -
      aLinesToRead -
    • FileData

      public FileData(String aPathname, String aContent, FWSimSession aActiveInSession)
      Parameter:
      aPathname -
      aActiveInSession -
      aLinesToRead -
  • Methodendetails

    • setCache

      public void setCache(FileData aFileData, boolean aWasUpdated)
      Parameter:
      aFileData -
      aWasUpdated -
    • getDataCache

      public String[][] getDataCache(Integer[] aLinesToRead, Integer aSkipHeaderLines) throws IOException
      If filename has changed or accessed for the first time the lines of the file are read from file system. If not they are just returned without reading again.
      Parameter:
      aLinesToRead -
      aSkipHeaderLines -
      Gibt zurück:
      Vector of lines in the file in the given order
      Löst aus:
      IOException
    • getRootElement

      public org.jdom2.Element getRootElement() throws IOException
      If filename has changed or accessed for the first time the root element of the file are read from file system. If not it is just returned without reading again.
      Gibt zurück:
      root element from xml file
      Löst aus:
      IOException
    • writeStringsToFile

      public void writeStringsToFile(Collection<String> aCollection)
      writes all strings to a file with given divider as one new line to the end of the opened file.
      Parameter:
      aCollection -
    • writeObjectsToFile

      public void writeObjectsToFile(Collection<Object> aCollection, LinkedHashMap<String,FWSimVariable<?>> aHeaderVariables, CSVInterface.DATA_MODE aDataMode)
      writes all objects to a file with given divider as one new line to the end of the opened file. For a null object the String "NULL" is written or 12.2363452 ==> 12.24
      Parameter:
      aCollection -
      aHeaderVariables -
    • writeToFile

      public void writeToFile(String aLine)
      writes all strings to a file with given divider as one new line to the end of the opened file.
      Parameter:
      aLine -
    • getSession

      public FWSimSession getSession()
      Gibt zurück:
      the activeInSession
    • closeFile

      public void closeFile()
      closes the file at the end of the writing or reading process. reset is called resetting the writer.
    • setUpdated

      public void setUpdated(boolean aIsUpdated)
    • isUpdated

      public boolean isUpdated()
    • getFile

      public File getFile()
    • getUniqueID

      public String getUniqueID()
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object