Class TrainCustomCommon
- java.lang.Object
-
- jmri.jmrit.operations.trains.excel.TrainCustomCommon
-
- Direct Known Subclasses:
TrainCustomManifest
,TrainCustomSwitchList
public abstract class TrainCustomCommon extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
directoryName
protected java.lang.String
xmlElement
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrainCustomCommon(java.lang.String dirName, java.lang.String xmlElement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addCsvFile(java.io.File csvFile)
Adds one CSV file path to the collection of files to be processed.boolean
checkProcessReady()
boolean
doesCommonFileExist()
Checks to see if the common file existsboolean
excelFileExists()
java.lang.String
getCommonFileName()
java.lang.String
getDirectoryName()
java.lang.String
getDirectoryPathName()
java.lang.String
getFileName()
boolean
isProcessAlive()
void
load(org.jdom2.Element options)
boolean
process()
Processes the CSV files using a Custom external program that reads the file of file names.void
setCommonFileName(java.lang.String name)
void
setDirectoryName(java.lang.String name)
void
setFileName(java.lang.String name)
void
store(org.jdom2.Element options)
boolean
waitForProcessToComplete()
-
-
-
Field Detail
-
xmlElement
protected final java.lang.String xmlElement
-
directoryName
protected java.lang.String directoryName
-
-
Constructor Detail
-
TrainCustomCommon
protected TrainCustomCommon(java.lang.String dirName, java.lang.String xmlElement)
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
-
setFileName
public void setFileName(java.lang.String name)
-
getCommonFileName
public java.lang.String getCommonFileName()
-
setCommonFileName
public void setCommonFileName(java.lang.String name)
-
getDirectoryName
public java.lang.String getDirectoryName()
-
setDirectoryName
public void setDirectoryName(java.lang.String name)
-
getDirectoryPathName
public java.lang.String getDirectoryPathName()
-
addCsvFile
public boolean addCsvFile(java.io.File csvFile)
Adds one CSV file path to the collection of files to be processed.- Parameters:
csvFile
- The File to add.- Returns:
- true if successful
-
process
public boolean process()
Processes the CSV files using a Custom external program that reads the file of file names.- Returns:
- True if successful.
-
excelFileExists
public boolean excelFileExists()
-
checkProcessReady
public boolean checkProcessReady()
-
isProcessAlive
public boolean isProcessAlive()
-
waitForProcessToComplete
public boolean waitForProcessToComplete() throws java.lang.InterruptedException
- Returns:
- true if process completes without a timeout, false if there's a timeout.
- Throws:
java.lang.InterruptedException
- if process thread is interrupted
-
doesCommonFileExist
public boolean doesCommonFileExist()
Checks to see if the common file exists- Returns:
- true if the common file exists
-
load
public void load(org.jdom2.Element options)
-
store
public void store(org.jdom2.Element options)
-
-