Package adams.data.conversion
Class SpreadSheetToHTML
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.AbstractConversion
-
- adams.data.conversion.SpreadSheetToHTML
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.ShallowCopySupporter<adams.data.conversion.AbstractConversion>,adams.core.SizeOfHandler,adams.core.Stoppable,adams.data.conversion.Conversion,Serializable
public class SpreadSheetToHTML extends adams.data.conversion.AbstractConversionTurns a spreadsheet into an HTML table.
Valid options are:
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-title <java.lang.String> (property: title) The title to use for the HTML title tag. default:
-html-before-table <adams.core.base.HtmlCode> (property: htmlBeforeTable) The HTML code to inject before the table. default:
-html-after-table <adams.core.base.HtmlCode> (property: htmlAfterTable) The HTML code to inect after the table. default:
-only-table-code <boolean> (property: onlyTableCode) If enabled, only the table code gets generated without surrounding body/ html tags. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected HtmlCodem_HtmlAfterTablethe HTML code to inject after the table.protected HtmlCodem_HtmlBeforeTablethe HTML code to inject before the table.protected booleanm_OnlyTableCodewhether to generate only table code.protected Stringm_Titlethe title to use.
-
Constructor Summary
Constructors Constructor Description SpreadSheetToHTML()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classaccepts()Returns the class that is accepted as input.voiddefineOptions()Adds options to the internal list of options.protected ObjectdoConvert()Performs the actual conversion.Classgenerates()Returns the class that is generated as output.HtmlCodegetHtmlAfterTable()Returns the HTML code to inject after the table.HtmlCodegetHtmlBeforeTable()Returns the HTML code to inject before the table.booleangetOnlyTableCode()Returns whether to omit surrounding body/html tags.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringgetTitle()Returns the HTML title.StringglobalInfo()Returns a string describing the object.StringhtmlAfterTableTipText()Returns the tip text for this property.StringhtmlBeforeTableTipText()Returns the tip text for this property.StringonlyTableCodeTipText()Returns the tip text for this property.voidsetHtmlAfterTable(HtmlCode value)Sets the HTML code to inject after the table.voidsetHtmlBeforeTable(HtmlCode value)Sets the HTML code to inject before the table.voidsetOnlyTableCode(boolean value)Sets whether to omit surrounding body/html tags.voidsetTitle(String value)Sets the HTML title.StringtitleTipText()Returns the tip text for this property.-
Methods inherited from class adams.data.conversion.AbstractConversion
checkData, cleanUp, convert, getAdditionalInformation, getInput, getInput, getOutput, getOutput, getOwner, reset, setInput, setOwner, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Title
protected String m_Title
the title to use.
-
m_HtmlBeforeTable
protected HtmlCode m_HtmlBeforeTable
the HTML code to inject before the table.
-
m_HtmlAfterTable
protected HtmlCode m_HtmlAfterTable
the HTML code to inject after the table.
-
m_OnlyTableCode
protected boolean m_OnlyTableCode
whether to generate only table code.
-
-
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 classadams.core.option.AbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classadams.data.conversion.AbstractConversion- Returns:
- null if no info available, otherwise short string
-
setTitle
public void setTitle(String value)
Sets the HTML title.- Parameters:
value- the title for the HTML page
-
getTitle
public String getTitle()
Returns the HTML title.- Returns:
- the title of the HTML page
-
titleTipText
public String titleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHtmlBeforeTable
public void setHtmlBeforeTable(HtmlCode value)
Sets the HTML code to inject before the table.- Parameters:
value- the HTML code
-
getHtmlBeforeTable
public HtmlCode getHtmlBeforeTable()
Returns the HTML code to inject before the table.- Returns:
- the HTML code
-
htmlBeforeTableTipText
public String htmlBeforeTableTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHtmlAfterTable
public void setHtmlAfterTable(HtmlCode value)
Sets the HTML code to inject after the table.- Parameters:
value- the HTML code
-
getHtmlAfterTable
public HtmlCode getHtmlAfterTable()
Returns the HTML code to inject after the table.- Returns:
- the HTML code
-
htmlAfterTableTipText
public String htmlAfterTableTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnlyTableCode
public void setOnlyTableCode(boolean value)
Sets whether to omit surrounding body/html tags.- Parameters:
value- true if to omit html/body tags
-
getOnlyTableCode
public boolean getOnlyTableCode()
Returns whether to omit surrounding body/html tags.- Returns:
- true if to omit html/body tags
-
onlyTableCodeTipText
public String onlyTableCodeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
accepts
public Class accepts()
Returns the class that is accepted as input.- Specified by:
acceptsin interfaceadams.data.conversion.Conversion- Specified by:
acceptsin classadams.data.conversion.AbstractConversion- Returns:
- the class
-
generates
public Class generates()
Returns the class that is generated as output.- Specified by:
generatesin interfaceadams.data.conversion.Conversion- Specified by:
generatesin classadams.data.conversion.AbstractConversion- Returns:
- the class
-
-