Package adams.data.io.input
Class AbstractSimpleJsonReportReader<T extends Report>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractReportReader<T>
-
- adams.data.io.input.AbstractSimpleJsonReportReader<T>
-
- Type Parameters:
T
- the type of report to use
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractReportReader>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,ReportReader<T>
,Serializable
,Comparable
- Direct Known Subclasses:
DefaultSimpleJsonReportReader
public abstract class AbstractSimpleJsonReportReader<T extends Report> extends AbstractReportReader<T>
Abstract ancestor for reports to be written in CSV format.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_EXTENSION
the file extension.-
Fields inherited from class adams.data.io.input.AbstractReportReader
m_Input, m_Stopped
-
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 AbstractSimpleJsonReportReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
determineParentID(Report report)
Tries to determine the parent ID for the current report.String
getFormatDescription()
Returns a string describing the format (used in the file chooser).String[]
getFormatExtensions()
Returns the extension(s) of the format.String
globalInfo()
Returns a string describing the object.protected List<T>
readData()
Performs the actual reading.-
Methods inherited from class adams.data.io.input.AbstractReportReader
checkData, cleanUp, compareTo, defineOptions, destroy, equals, forCommandLine, forName, getDefaultFormatExtension, getInput, getReaders, inputTipText, isStopped, newInstance, postRead, read, reset, setInput, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
FILE_EXTENSION
public static final String FILE_EXTENSION
the file extension.- See Also:
- Constant Field Values
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescription
in interfaceFileFormatHandler
- Specified by:
getFormatDescription
in classAbstractReportReader<T extends Report>
- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the format.- Specified by:
getFormatExtensions
in interfaceFileFormatHandler
- Specified by:
getFormatExtensions
in classAbstractReportReader<T extends Report>
- Returns:
- the extension(s) (without the dot!)
-
determineParentID
protected int determineParentID(Report report)
Tries to determine the parent ID for the current report.- Specified by:
determineParentID
in classAbstractReportReader<T extends Report>
- Parameters:
report
- the report to determine the ID for- Returns:
- the parent database ID, -1 if it cannot be determined
-
-