|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.XmlFile
jmri.jmrit.operations.OperationsXml
public class OperationsXml
Loads and stores the operation setup using xml files.
| Field Summary |
|---|
| Fields inherited from class jmri.jmrit.XmlFile |
|---|
dtdLocation, xsltLocation |
| Constructor Summary | |
|---|---|
OperationsXml()
|
|
| Method Summary | |
|---|---|
String |
convertFromXmlComment(String comment)
Convert xml string comment to standard string format one character at a time, except when |
String |
convertToXmlComment(String comment)
Convert standard string to xml string one character at a time expect when a \n is found. |
protected File |
createFile(String fullPatnName,
boolean backupFile)
|
String |
getDefaultOperationsFilename()
|
static String |
getFileLocation()
Absolute path to location of Operations files. |
static String |
getOperationsDirectoryName()
|
String |
getOperationsFileName()
|
boolean |
isDirty()
|
protected void |
load()
|
protected void |
readFile(String filename)
|
void |
setDirty(boolean b)
|
static void |
setOperationsDirectoryName(String name)
|
void |
setOperationsFileName(String name)
|
protected void |
writeFile(String filename)
|
void |
writeFileIfDirty()
|
void |
writeOperationsFile()
Store the all of the operation train objects in the default place, including making a backup if needed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationsXml()
| Method Detail |
|---|
public void writeOperationsFile()
protected void load()
protected File createFile(String fullPatnName,
boolean backupFile)
protected void writeFile(String filename)
throws FileNotFoundException,
IOException
FileNotFoundException
IOException
protected void readFile(String filename)
throws JDOMException,
IOException
JDOMException
IOExceptionpublic void setDirty(boolean b)
public boolean isDirty()
public void writeFileIfDirty()
public String getDefaultOperationsFilename()
public static void setOperationsDirectoryName(String name)
public static String getOperationsDirectoryName()
public void setOperationsFileName(String name)
public String getOperationsFileName()
public static String getFileLocation()
Default is in the prefsDir, but can be set to anything.
XmlFile.prefsDir()public String convertToXmlComment(String comment)
comment - standard string
public String convertFromXmlComment(String comment)
comment - input xml comment string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||