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.
        name - the name to check
        true if present; false otherwise
      • readFile

        void readFile​(java.lang.String name)
               throws JDOMException,
        Read the contents of a NameFile XML file into this object. Note that this does not clear any existing entries.
        name - File name to read
        JDOMException - if the file can't be parsed - 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.
        the default filename