ExtractorEml {bdpar}R Documentation

Class to handle email files with eml extension

Description

This class inherits from the Instance class and implements the functions of extracting the text and the date from an eml type file.

Details

The way to indicate which part to choose in the email, when is a multipart email, is through the "extractorEML.mpaPartSelected" field of bdpar.Options variable.

Note

To be able to use this class it is necessary to have Python installed.

Inherit

This class inherits from Instance and implements the obtainSource and obtainDate abstracts functions.

Super class

bdpar::Instance -> ExtractorEml

Methods

Public methods

Inherited methods

Method new()

Creates a ExtractorEml object.

Usage
ExtractorEml$new(path, PartSelectedOnMPAlternative = NULL)
Arguments
path

A character value. Path of the eml file.

PartSelectedOnMPAlternative

A character value. Configuration to read the eml files. If it is NULL, checks if is defined in the "extractorEML.mpaPartSelected" field of bdpar.Options variable.


Method obtainDate()

Obtains the date of the eml file. Calls the function read_emails and obtains the date of the file indicated in the path and then transforms it into the generic date format, that is "%a %b %d %H:%M:%S %Z %Y" (Example: "Thu May 02 06:52:36 UTC 2013").

Usage
ExtractorEml$obtainDate()

Method obtainSource()

Obtains the source of the eml file. Calls the function read_emails and obtains the source of the file indicated in the path. In addition, it initializes the data with the initial source.

Usage
ExtractorEml$obtainSource()

Method getPartSelectedOnMPAlternative()

Gets of PartSelectedOnMPAlternative variable.

Usage
ExtractorEml$getPartSelectedOnMPAlternative()
Returns

Value of PartSelectedOnMPAlternative variable.


Method setPartSelectedOnMPAlternative()

Gets of PartSelectedOnMPAlternative variable.

Usage
ExtractorEml$setPartSelectedOnMPAlternative(PartSelectedOnMPAlternative)
Arguments
PartSelectedOnMPAlternative

A character value. The new value of PartSelectedOnMPAlternative variable.


Method toString()

Returns a character representing the instance

Usage
ExtractorEml$toString()
Returns

Instance character representation


Method clone()

The objects of this class are cloneable with this method.

Usage
ExtractorEml$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

bdpar.Options, ExtractorSms, ExtractorYtbid, Instance


[Package bdpar version 3.1.0 Index]