jmri.jmrit.consisttool
Class ConsistFile

java.lang.Object
  extended by jmri.jmrit.XmlFile
      extended by jmri.jmrit.consisttool.ConsistFile

public class ConsistFile
extends XmlFile

Handle saving/restoring consist information to XML files. This class manipulates files conforming to the consist-roster-config DTD.

Author:
Paul Bender Copyright (C) 2008

Field Summary
 
Fields inherited from class jmri.jmrit.XmlFile
dtdLocation, xsltLocation
 
Constructor Summary
ConsistFile()
           
 
Method Summary
static String defaultConsistFilename()
          Return the filename String for the default Consist file, including location.
static String getFileLocation()
           
 void ReadFile()
          Read all consists from a file.
static void setFileLocation(String loc)
           
 void WriteFile(ArrayList<DccLocoAddress> consistList)
          Write all consists to a file.
 
Methods inherited from class jmri.jmrit.XmlFile
addDefaultInfo, backupFileName, checkFile, createFileNameWithDate, dumpElement, ensurePrefsPresent, findFile, getBuilder, getRootViaURI, getVerify, makeBackupFile, makeBackupFile, newDocument, newDocument, prefsDir, reportError1, reportError2, resourcesDir, revertBackupFile, rootFromFile, rootFromName, rootFromURL, scriptsDir, setScriptsFileLocationDefault, setUserFileLocationDefault, setVerify, userFileChooser, userFileChooser, userFileChooser, userFileChooser, userFileLocationDefault, writeXML, xmlDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsistFile

public ConsistFile()
Method Detail

ReadFile

public void ReadFile()
              throws JDOMException,
                     IOException
Read all consists from a file.

Throws:
JDOMException
IOException

WriteFile

public void WriteFile(ArrayList<DccLocoAddress> consistList)
               throws IOException
Write all consists to a file.

Parameters:
consistList - an ArrayList of consists to write
Throws:
JDOMException
IOException

getFileLocation

public static String getFileLocation()

setFileLocation

public static void setFileLocation(String loc)

defaultConsistFilename

public static String defaultConsistFilename()
Return the filename String for the default Consist file, including location.



Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads