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.AbstractConversion
Turns 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 HtmlCode
m_HtmlAfterTable
the HTML code to inject after the table.protected HtmlCode
m_HtmlBeforeTable
the HTML code to inject before the table.protected boolean
m_OnlyTableCode
whether to generate only table code.protected String
m_Title
the title to use.
-
Constructor Summary
Constructors Constructor Description SpreadSheetToHTML()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
accepts()
Returns the class that is accepted as input.void
defineOptions()
Adds options to the internal list of options.protected Object
doConvert()
Performs the actual conversion.Class
generates()
Returns the class that is generated as output.HtmlCode
getHtmlAfterTable()
Returns the HTML code to inject after the table.HtmlCode
getHtmlBeforeTable()
Returns the HTML code to inject before the table.boolean
getOnlyTableCode()
Returns whether to omit surrounding body/html tags.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
getTitle()
Returns the HTML title.String
globalInfo()
Returns a string describing the object.String
htmlAfterTableTipText()
Returns the tip text for this property.String
htmlBeforeTableTipText()
Returns the tip text for this property.String
onlyTableCodeTipText()
Returns the tip text for this property.void
setHtmlAfterTable(HtmlCode value)
Sets the HTML code to inject after the table.void
setHtmlBeforeTable(HtmlCode value)
Sets the HTML code to inject before the table.void
setOnlyTableCode(boolean value)
Sets whether to omit surrounding body/html tags.void
setTitle(String value)
Sets the HTML title.String
titleTipText()
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:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in 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:
accepts
in interfaceadams.data.conversion.Conversion
- Specified by:
accepts
in classadams.data.conversion.AbstractConversion
- Returns:
- the class
-
generates
public Class generates()
Returns the class that is generated as output.- Specified by:
generates
in interfaceadams.data.conversion.Conversion
- Specified by:
generates
in classadams.data.conversion.AbstractConversion
- Returns:
- the class
-
-