Package adams.doc.latex.generator
Class ImportContent
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.doc.latex.generator.AbstractCodeGenerator
-
- adams.doc.latex.generator.ImportContent
-
- 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 class ImportContent extends AbstractCodeGenerator
Imports the content of the specified file. By default, the content gets escaped to make it valid LaTeX.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-skip <boolean> (property: skip) If enabled, the code generation gets skipped. default: false
-no-var-expansion <boolean> (property: noVariableExpansion) If enabled, variable expansion gets skipped. default: false
-import <adams.core.io.PlaceholderFile> (property: import) The file to import the content from. default: ${CWD}-escape <boolean> (property: escape) If enabled, the content of the import file get escaped to make it valid LaTeX. default: true
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Escapewhether to escape the content.protected adams.core.io.PlaceholderFilem_Importthe file to import.-
Fields inherited from class adams.doc.latex.generator.AbstractCodeGenerator
m_FlowContext, m_NoVariableExpansion, m_Skip
-
-
Constructor Summary
Constructors Constructor Description ImportContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringdoGenerate()Generates the actual code.StringescapeTipText()Returns the tip text for this property.booleangetEscape()Returns whether to escape the content of the import file.adams.core.io.PlaceholderFilegetImport()Returns the file to import the content.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.String[]getRequiredPackages()Returns the list of required LaTeX packages for this code generator.StringglobalInfo()Returns a string describing the object.StringimportTipText()Returns the tip text for this property.voidsetEscape(boolean value)Sets whether to escape the content of the import file.voidsetImport(adams.core.io.PlaceholderFile value)Sets the file to import the content.-
Methods inherited from class adams.doc.latex.generator.AbstractCodeGenerator
check, ensureTrailingNewLine, ensureTrailingNewLine, escape, expand, expandEscape, generate, getAdditionalInformation, getFlowContext, getNoVariableExpansion, getSkip, noVariableExpansionTipText, setFlowContext, setNoVariableExpansion, setSkip, skipTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractCodeGenerator
-
setImport
public void setImport(adams.core.io.PlaceholderFile value)
Sets the file to import the content.- Parameters:
value- the file
-
getImport
public adams.core.io.PlaceholderFile getImport()
Returns the file to import the content.- Returns:
- the file
-
importTipText
public String importTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEscape
public void setEscape(boolean value)
Sets whether to escape the content of the import file.- Parameters:
value- true if to escape
-
getEscape
public boolean getEscape()
Returns whether to escape the content of the import file.- Returns:
- true if to escape
-
escapeTipText
public String escapeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getRequiredPackages
public String[] getRequiredPackages()
Returns the list of required LaTeX packages for this code generator.- Specified by:
getRequiredPackagesin interfaceCodeGenerator- Specified by:
getRequiredPackagesin classAbstractCodeGenerator- Returns:
- the packages
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceCodeGenerator- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classAbstractCodeGenerator- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual code.- Specified by:
doGeneratein classAbstractCodeGenerator- Returns:
- the generated code
-
-