Class NameFile


  • public class NameFile
    extends XmlFile
    Represents a set of standard names and aliases in memory.

    This class doesn't provide tools for defining the names and aliases; that's done manually, or at least not done here, to create the file.

    This automatically initializes from the default file if requested from the InstanceManager.

    • Method Detail

      • names

        public java.util.Set<java.lang.String> names()
      • checkName

        public boolean checkName​(java.lang.String name)
        Check to see if a name is present in the file.
        Parameters:
        name - the name to check
        Returns:
        true if present; false otherwise
      • readFile

        void readFile​(java.lang.String name)
               throws JDOMException,
                      java.io.IOException
        Read the contents of a NameFile XML file into this object. Note that this does not clear any existing entries.
        Parameters:
        name - File name to read
        Throws:
        JDOMException - if the file can't be parsed
        java.io.IOException - from underlying IO operations
      • defaultNameFilename

        protected static java.lang.String defaultNameFilename()
        Get the filename for the default file, including location. This is here to allow easy override in tests.
        Returns:
        the default filename