Package adams.doc.latex.generator
Class AbstractFileReferencingCodeGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.doc.latex.generator.AbstractCodeGenerator
-
- adams.doc.latex.generator.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
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractFileReferencingCodeGenerator.PathType
Determines how to process the file path.
-
Field Summary
Fields Modifier and Type Field Description protected AbstractFileReferencingCodeGenerator.PathType
m_PathType
how to process the file path.protected boolean
m_RemoveExtension
whether to remove the extension.protected String
m_SuppliedDir
the supplied directory.-
Fields inherited from class adams.doc.latex.generator.AbstractCodeGenerator
m_FlowContext, m_NoVariableExpansion, m_Skip
-
-
Constructor Summary
Constructors Constructor Description AbstractFileReferencingCodeGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected AbstractFileReferencingCodeGenerator.PathType
getDefaultPathType()
Returns the default path type to use.protected boolean
getDefaultRemoveExtension()
Returns the default for removing the extension.protected String
getDefaultSuppliedDir()
Returns the default for the supplied directory.AbstractFileReferencingCodeGenerator.PathType
getPathType()
Returns how to process the file name.boolean
getRemoveExtension()
Returns whether to remove the file extension.String
getSuppliedDir()
Returns the directory to use instead.String
pathTypeTipText()
Returns the tip text for this property.protected String
processFile(adams.core.io.PlaceholderFile file)
Processes the file according to the path type.String
removeExtensionTipText()
Returns the tip text for this property.void
setPathType(AbstractFileReferencingCodeGenerator.PathType value)
Sets how to process the file name.void
setRemoveExtension(boolean value)
Sets whether to remove the file extension.void
setSuppliedDir(String value)
Sets the directory to use instead.String
suppliedDirTipText()
Returns the tip text for this property.-
Methods inherited from class adams.doc.latex.generator.AbstractCodeGenerator
check, doGenerate, ensureTrailingNewLine, ensureTrailingNewLine, escape, expand, expandEscape, generate, getAdditionalInformation, getFlowContext, getNoVariableExpansion, getQuickInfo, getRequiredPackages, getSkip, noVariableExpansionTipText, setFlowContext, setNoVariableExpansion, setSkip, skipTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_PathType
protected AbstractFileReferencingCodeGenerator.PathType m_PathType
how to process the file path.
-
m_SuppliedDir
protected String m_SuppliedDir
the supplied directory.
-
m_RemoveExtension
protected boolean m_RemoveExtension
whether to remove the extension.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractCodeGenerator
-
getDefaultPathType
protected AbstractFileReferencingCodeGenerator.PathType getDefaultPathType()
Returns the default path type to use.- Returns:
- the default
-
setPathType
public void setPathType(AbstractFileReferencingCodeGenerator.PathType value)
Sets how to process the file name.- Parameters:
value
- the type
-
getPathType
public AbstractFileReferencingCodeGenerator.PathType getPathType()
Returns how to process the file name.- Returns:
- the type
-
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
-
-