Class AbstractMultiObjectExport
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.multiobjectexport.AbstractMultiObjectExport
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
- Direct Known Subclasses:
AbstractMultiObjectExportWithPreferredExtensions
public abstract class AbstractMultiObjectExport extends AbstractOptionHandler
Ancestor for schemes that can export multiple objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
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 AbstractMultiObjectExport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(String[] names, Object[] objects)Checks the data.protected List<AbstractObjectExporter>determineExporters(String name, Object obj, MessageCollection errors)Determines the exporters to use for the object.protected StringdetermineExtension(AbstractObjectExporter exporter)Returns the extension for the given exporter.protected String[]disambiguateNames(String[] names)Ensures that the names are unique.protected abstract StringdoExport(String[] names, Object[] objects)Performs the actual export of the objects using the given names.Stringexport(String[] names, Object[] objects)Exports the objects using the given names.protected List<AbstractObjectExporter>pruneExporters(List<AbstractObjectExporter> exporters)Prunes the list of exporters to use.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
-
-
-
Method Detail
-
disambiguateNames
protected String[] disambiguateNames(String[] names)
Ensures that the names are unique.- Parameters:
names- the names- Returns:
- the unique names
-
check
protected String check(String[] names, Object[] objects)
Checks the data.- Parameters:
names- the names for the objectsobjects- the objects- Returns:
- null if successful, otherwise error message
-
pruneExporters
protected List<AbstractObjectExporter> pruneExporters(List<AbstractObjectExporter> exporters)
Prunes the list of exporters to use. Removes PlainTextExporter in favor of RenderedPlainTextExporter.- Parameters:
exporters- the exporters- Returns:
- the updated list
-
determineExporters
protected List<AbstractObjectExporter> determineExporters(String name, Object obj, MessageCollection errors)
Determines the exporters to use for the object.- Parameters:
name- the name of the objectobj- the object to determine the exporter forerrors- for storing errors- Returns:
- the exporters
-
determineExtension
protected String determineExtension(AbstractObjectExporter exporter)
Returns the extension for the given exporter.- Parameters:
exporter- the exporter to get the extension for- Returns:
- the extension to use
-
doExport
protected abstract String doExport(String[] names, Object[] objects)
Performs the actual export of the objects using the given names.- Parameters:
names- the names for the objectsobjects- the objects- Returns:
- null if successful, otherwise error message
-
-