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.StringdirectoryNameprotected java.lang.StringxmlElement
-
Constructor Summary
Constructors Modifier Constructor Description protectedTrainCustomCommon(java.lang.String dirName, java.lang.String xmlElement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddCsvFile(java.io.File csvFile)Adds one CSV file path to the collection of files to be processed.booleancheckProcessReady()booleandoesCommonFileExist()Checks to see if the common file existsbooleandoesExcelFileExist()java.io.FilegetCommonFile()The common file contains a list of CSV files that need to be processed.java.lang.StringgetCommonFileName()java.lang.StringgetDirectoryName()java.lang.StringgetDirectoryPathName()java.io.FilegetExcelFile()java.lang.StringgetFileName()booleanisProcessAlive()voidload(org.jdom2.Element options)booleanprocess()Processes the CSV files using a Custom external program that reads the file of file names.voidsetCommonFileName(java.lang.String name)voidsetDirectoryName(java.lang.String name)voidsetFileName(java.lang.String name)voidstore(org.jdom2.Element options)booleanwaitForProcessToComplete()
-
-
-
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()
-
doesExcelFileExist
public boolean doesExcelFileExist()
-
getExcelFile
public java.io.File getExcelFile()
-
doesCommonFileExist
public boolean doesCommonFileExist()
Checks to see if the common file exists- Returns:
- true if the common file exists
-
getCommonFile
public java.io.File getCommonFile()
The common file contains a list of CSV files that need to be processed.- Returns:
- the common file.
-
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.
-
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
-
load
public void load(org.jdom2.Element options)
-
store
public void store(org.jdom2.Element options)
-
-