Class SimpleIDGenerator

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, ShallowCopySupporter<AbstractIDGenerator>, SizeOfHandler, Serializable, Comparable

    public class SimpleIDGenerator
    extends AbstractIDFilenameGenerator<Object>
    A simple ID generator that can make use of data provided by classes implementing IDHandler and DatabaseIDHandler.

    Valid options are:

    -D (property: debug)
        If set to true, scheme may output additional info to the console.
    -filename (property: makeFilename)
        If set to true, all characters that cannot appear in a filename are replaced
        with underscores '_'.
    -filename-replace <java.lang.String> (property: filenameReplaceChar)
        The character for replacing invalid characters in IDs that are used for
        filenames; use empty string for removing the invalid characters.
    -format <java.lang.String> (property: format)
        The format for the ID ({ID} = ID of IDHandler, {DBID} = database ID of DatabaseIDHandler
        default: {DBID}-{ID}
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • MISSING

        public static final String MISSING
        the missing string, if the object doesn't implement a certain interface.
        See Also:
        Constant Field Values
      • m_Format

        protected String m_Format
        the format of the ID to generate.
    • Constructor Detail

      • SimpleIDGenerator

        public SimpleIDGenerator()
    • Method Detail

      • setFormat

        public void setFormat​(String value)
        Sets the format for the ID.
        value - the format
      • getFormat

        public String getFormat()
        Returns the currently set format for the ID.
        the format
      • formatTipText

        public String formatTipText()
        Returns the tip text for this property.
        tip text for this property suitable for displaying in the GUI or for listing the options.