Class OperationsXml

    • Method Detail

      • writeOperationsFile

        public void writeOperationsFile()
        Store the all of the operation train objects in the default place, including making a backup if needed
      • load

        protected void load()
      • createFile

        protected java.io.File createFile​(java.lang.String fullPathName,
                                          boolean backupFile)
      • writeFile

        protected void writeFile​(java.lang.String filename)
                          throws java.io.FileNotFoundException,
                                 java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • readFile

        public abstract void readFile​(java.lang.String filename)
                               throws org.jdom2.JDOMException,
                                      java.io.IOException
        Parameters:
        filename - The string file name.
        Throws:
        org.jdom2.JDOMException - Due to XML parsing error
        java.io.IOException - Due to trouble accessing named file
      • setDirty

        public void setDirty​(boolean b)
      • isDirty

        public boolean isDirty()
      • getFileLocation

        public static java.lang.String getFileLocation()
        Absolute path to location of Operations files.

        Default is in the user's files path, but can be set to anything.

        Returns:
        The string path name.
        See Also:
        FileUtil.getUserFilesPath()
      • setFileLocation

        public static void setFileLocation​(java.lang.String location)
        Set path to location of Operations files.

        Default is in the user's files path, but can be set to anything.

        Parameters:
        location - path to file, including trailing file separator.
      • checkFileName

        public static boolean checkFileName​(java.lang.String name)
        Checks name for the file control characters:
        Parameters:
        name - The string to check for a valid file name.
        Returns:
        true if name is okay, false if name contains a control character.
      • save

        public static void save()
        Saves operation files that have been modified.
      • areFilesDirty

        public static boolean areFilesDirty()
        Checks to see if any operations files are dirty
        Returns:
        True if any operations parameters have been modified.