Package jmri.jmrix.can.cbus.eventtable
Class CbusEventTableXmlFile
- java.lang.Object
-
- jmri.jmrit.XmlFile
-
- jmri.jmrix.can.cbus.eventtable.CbusEventTableXmlFile
-
public class CbusEventTableXmlFile extends XmlFile
Class to provide access to the EventTableData.xml file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.XmlFile
XmlFile.Validate
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CanSystemConnectionMemo
memo
protected java.lang.String
oldFileLocation
-
Fields inherited from class jmri.jmrit.XmlFile
dtdLocation, xsltLocation
-
-
Constructor Summary
Constructors Constructor Description CbusEventTableXmlFile(CanSystemConnectionMemo memo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultFileName()
Get the full filename, including directory.java.io.File
getFile(boolean store)
Get the XML File for this connection.java.lang.String
getFileLocation()
Absolute path to directory of Event Table file.java.lang.String
getFileName()
Get the Event Table Filename, no directory.static void
migrate(java.nio.file.Path fromPath, java.lang.String newLocation, java.lang.String systemPrefix)
-
Methods inherited from class jmri.jmrit.XmlFile
addDefaultInfo, backupFileName, checkFile, createFileNameWithDate, dumpElement, findFile, getBuilder, getDefaultDtdLocation, getDefaultValidate, getDtdLocation, getProcessingInstructionHRef, getProcessingInstructionType, getRoot, getValidate, makeBackupFile, makeBackupFile, newDocument, newDocument, revertBackupFile, rootFromFile, rootFromInputStream, rootFromName, rootFromURL, setDefaultDtdLocation, setDefaultValidate, setDtdLocation, setValidate, userFileChooser, userFileChooser, writeXML, xmlDir
-
-
-
-
Field Detail
-
memo
final CanSystemConnectionMemo memo
-
oldFileLocation
protected final java.lang.String oldFileLocation
-
-
Constructor Detail
-
CbusEventTableXmlFile
public CbusEventTableXmlFile(@Nonnull CanSystemConnectionMemo memo)
-
-
Method Detail
-
getDefaultFileName
public java.lang.String getDefaultFileName()
Get the full filename, including directory.- Returns:
- String of file path.
-
getFileName
public java.lang.String getFileName()
Get the Event Table Filename, no directory.- Returns:
- just the filename.
-
getFile
public java.io.File getFile(boolean store)
Get the XML File for this connection. Migrates from previous single instance Event Table.- Parameters:
store
- true to create new File if File does not exist.- Returns:
- File, or if store is false and File not found, returns null.
-
getFileLocation
public java.lang.String getFileLocation()
Absolute path to directory of Event Table file. No trailing file separator.- Returns:
- path to location
-
migrate
public static void migrate(java.nio.file.Path fromPath, java.lang.String newLocation, java.lang.String systemPrefix) throws java.io.IOException
- Throws:
java.io.IOException
-
-