Class AbstractFileReferencingCodeGenerator

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, CodeGenerator, adams.flow.core.FlowContextHandler, Serializable
    Direct Known Subclasses:
    Image, Include, Input

    public abstract class AbstractFileReferencingCodeGenerator
    extends AbstractCodeGenerator
    Ancestor for code generators that deal with files and need to have control over the filename being added to the LaTeX document.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_SuppliedDir

        protected String m_SuppliedDir
        the supplied directory.
      • m_RemoveExtension

        protected boolean m_RemoveExtension
        whether to remove the extension.
    • Constructor Detail

      • AbstractFileReferencingCodeGenerator

        public AbstractFileReferencingCodeGenerator()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractCodeGenerator
      • pathTypeTipText

        public String pathTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultSuppliedDir

        protected String getDefaultSuppliedDir()
        Returns the default for the supplied directory.
        Returns:
        the default
      • setSuppliedDir

        public void setSuppliedDir​(String value)
        Sets the directory to use instead.
        Parameters:
        value - the directory
      • getSuppliedDir

        public String getSuppliedDir()
        Returns the directory to use instead.
        Returns:
        the directory
      • suppliedDirTipText

        public String suppliedDirTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getDefaultRemoveExtension

        protected boolean getDefaultRemoveExtension()
        Returns the default for removing the extension.
        Returns:
        the default
      • setRemoveExtension

        public void setRemoveExtension​(boolean value)
        Sets whether to remove the file extension.
        Parameters:
        value - true if to remove
      • getRemoveExtension

        public boolean getRemoveExtension()
        Returns whether to remove the file extension.
        Returns:
        true if to remove
      • removeExtensionTipText

        public String removeExtensionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • processFile

        protected String processFile​(adams.core.io.PlaceholderFile file)
        Processes the file according to the path type.
        Parameters:
        file - the file to process
        Returns:
        the processed file name