Class ListPackages
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.source.wekapackagemanageraction.AbstractWekaPackageManagerAction
-
- adams.flow.source.wekapackagemanageraction.ListPackages
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,FlowContextHandler,Serializable
public class ListPackages extends AbstractWekaPackageManagerAction
Lists the packages.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classListPackages.ListTypeThe type of list to generate.static classListPackages.OutputFormatHow to output the packages.
-
Field Summary
Fields Modifier and Type Field Description protected ListPackages.ListTypem_ListTypethe type of list to generate.protected ListPackages.OutputFormatm_OutputFormatthe output format.-
Fields inherited from class adams.flow.source.wekapackagemanageraction.AbstractWekaPackageManagerAction
m_FlowContext
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ListPackages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.ObjectdoExecute(MessageCollection errors)Executes the action.Class[]generates()The types of data the action generates.ListPackages.ListTypegetListType()Returns the type of list to generate.ListPackages.OutputFormatgetOutputFormat()Returns the type of output format to generate.protected List<weka.core.packageManagement.Package>getPackages()Returns the packages to output.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.StringlistTypeTipText()Returns the tip text for this property.StringoutputFormatTipText()Returns the tip text for this property.voidsetListType(ListPackages.ListType value)Sets the type of list to generate.voidsetOutputFormat(ListPackages.OutputFormat value)Sets the type of output format to generate.-
Methods inherited from class adams.flow.source.wekapackagemanageraction.AbstractWekaPackageManagerAction
check, execute, getFlowContext, setFlowContext
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_ListType
protected ListPackages.ListType m_ListType
the type of list to generate.
-
m_OutputFormat
protected ListPackages.OutputFormat m_OutputFormat
the output format.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setListType
public void setListType(ListPackages.ListType value)
Sets the type of list to generate.- Parameters:
value- the type
-
getListType
public ListPackages.ListType getListType()
Returns the type of list to generate.- Returns:
- the type
-
listTypeTipText
public String listTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutputFormat
public void setOutputFormat(ListPackages.OutputFormat value)
Sets the type of output format to generate.- Parameters:
value- the type
-
getOutputFormat
public ListPackages.OutputFormat getOutputFormat()
Returns the type of output format to generate.- Returns:
- the type
-
outputFormatTipText
public String outputFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractWekaPackageManagerAction- Returns:
- null if no info available, otherwise short string
-
generates
public Class[] generates()
The types of data the action generates.- Specified by:
generatesin classAbstractWekaPackageManagerAction- Returns:
- the output types
-
getPackages
protected List<weka.core.packageManagement.Package> getPackages() throws Exception
Returns the packages to output.- Returns:
- the packages
- Throws:
Exception- if retrieval of packages fails
-
doExecute
public Object doExecute(MessageCollection errors)
Executes the action.- Specified by:
doExecutein classAbstractWekaPackageManagerAction- Parameters:
errors- for collecting errors- Returns:
- the generated output, null if failed to generated
-
-