Class AbstractResultItem
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.output.AbstractResultItem
-
- All Implemented Interfaces:
CleanUpHandler
,LoggingSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractNestableResultItem
,ResultItem
,ResultItem
,ResultItem
public abstract class AbstractResultItem extends LoggingObject implements CleanUpHandler
Container for a data to be stored in result history.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.core.Instances
m_Header
the header.protected StringBuilder
m_Log
the log.protected SimpleLogPanel
m_LogPanel
the log component.protected String
m_Name
the name of the item.protected OutputTabbedPane
m_TabbedPane
the tabbed pane with the generated output.protected Date
m_Timestamp
the timestamp.static int
MAX_RELATIONNAME_LENGTH
the maximum length for the relationname when assembling the name.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResultItem(weka.core.Instances header)
Initializes the item.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.protected abstract String
createName()
Creates the name from the members.weka.core.Instances
getHeader()
Returns the stored training set header.SimpleLogPanel
getLogPanel()
Returns the log panel.String
getName()
Returns the name of the item.OutputTabbedPane
getTabbedPane()
The tabbed pane for the results.boolean
hasHeader()
Returns whether an training set header is present.void
invalidateName()
Invalidates the name.void
logError(String msg, Throwable t)
Logs the exception.void
logMessage(String msg)
Logs the message.abstract String
toString()
Returns a short description of the container.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
MAX_RELATIONNAME_LENGTH
public static final int MAX_RELATIONNAME_LENGTH
the maximum length for the relationname when assembling the name.- See Also:
- Constant Field Values
-
m_Timestamp
protected Date m_Timestamp
the timestamp.
-
m_Name
protected String m_Name
the name of the item.
-
m_Header
protected weka.core.Instances m_Header
the header.
-
m_Log
protected StringBuilder m_Log
the log.
-
m_LogPanel
protected transient SimpleLogPanel m_LogPanel
the log component.
-
m_TabbedPane
protected transient OutputTabbedPane m_TabbedPane
the tabbed pane with the generated output.
-
-
Method Detail
-
createName
protected abstract String createName()
Creates the name from the members.- Returns:
- the name
-
getName
public String getName()
Returns the name of the item.- Returns:
- the name
-
invalidateName
public void invalidateName()
Invalidates the name.
-
hasHeader
public boolean hasHeader()
Returns whether an training set header is present.- Returns:
- true if available
-
getHeader
public weka.core.Instances getHeader()
Returns the stored training set header.- Returns:
- the header, null if not present
-
getTabbedPane
public OutputTabbedPane getTabbedPane()
The tabbed pane for the results.- Returns:
- the tabbed pane
-
getLogPanel
public SimpleLogPanel getLogPanel()
Returns the log panel.- Returns:
- the log panel
-
logMessage
public void logMessage(String msg)
Logs the message.- Parameters:
msg
- the log message
-
logError
public void logError(String msg, Throwable t)
Logs the exception.- Parameters:
msg
- the log messaget
- the exception
-
toString
public abstract String toString()
Returns a short description of the container.
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
-