Package adams.data.io.input
Class EmlEmailFileReader
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,EmailFileReader<Object>,EmailReader<Object>,Serializable
public class EmlEmailFileReader extends AbstractEmailFileReader<Object>
Reads emails stored in EML files.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-input <adams.core.io.PlaceholderFile> (property: input) The file to read the email from. default: ${CWD}- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEmlEmailFileReader.EmailType
-
Field Summary
Fields Modifier and Type Field Description protected EmlEmailFileReader.EmailTypem_EmailTypewhat type of email to return.-
Fields inherited from class adams.data.io.input.AbstractEmailFileReader
m_Input
-
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 EmlEmailFileReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected ObjectdoRead()Performs the actual reading.StringemailTypeTipText()Returns the tip text for this property.Classgenerates()Returns the type of email class the reader returns.EmlEmailFileReader.EmailTypegetEmailType()Returns the type of email to return.StringgetFormatDescription()Returns the description of the file format.String[]getFormatExtensions()Returns the extension(s) of the file format (without dot).StringglobalInfo()Returns a string describing the object.voidsetEmailType(EmlEmailFileReader.EmailType value)Sets what type of email to return.-
Methods inherited from class adams.data.io.input.AbstractEmailFileReader
check, getDefaultFormatExtension, getInput, inputTipText, setInput
-
Methods inherited from class adams.data.io.input.AbstractEmailReader
read
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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.data.io.input.EmailReader
read
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_EmailType
protected EmlEmailFileReader.EmailType m_EmailType
what type of email to return.
-
-
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 classAbstractEmailFileReader<Object>
-
setEmailType
public void setEmailType(EmlEmailFileReader.EmailType value)
Sets what type of email to return.- Parameters:
value- the type
-
getEmailType
public EmlEmailFileReader.EmailType getEmailType()
Returns the type of email to return.- Returns:
- the type
-
emailTypeTipText
public String emailTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getFormatDescription
public String getFormatDescription()
Returns the description of the file format.- Returns:
- the description
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the file format (without dot).- Returns:
- the extensions (no dot!)
-
generates
public Class generates()
Returns the type of email class the reader returns.- Returns:
- the type of email
-
doRead
protected Object doRead()
Performs the actual reading.- Specified by:
doReadin classAbstractEmailReader<Object>- Returns:
- the email that was read, null in case of error
-
-