Learn R Programming

bdpar (version 2.0.0)

ExtractorFactory: Class to handle the creation of Instance types

Description

ExtractorFactory class builds the appropriate Instance object according to the file extension.

Usage

ExtractorFactory

Arguments

Constructor

ExtractorFactory$new()

Methods

  • registerExtractor: adds an extractor to the list of extensions

    • Usage: registerExtractor(extension, extractor)

    • Arguments:

      • extension: (character) the name of the extension option.

      • extractor: (Object) the extractor of the new extension.

  • setExtractor: modifies the extractor of the one extension.

    • Usage: setExtractor(extension, extractor)

    • Arguments:

      • extension: (character) the name of the new extension.

      • extractor: (Instance) the value of the new extractor.

  • removeExtractor: removes a specific extractor throught the extension.

    • Usage: removeExtractor(extension)

    • Arguments:

      • extension: (character) the name of the extension to remove.

  • getAllExtractors: gets the list of extractors.

    • Usage: getAllExtractors()

    • Value: Value of extractors.

  • createInstance: builds the Instance object according to the file extension.

    • Usage: createInstance(path)

    • Value: the Instance corresponding object according to the file extension.

    • Arguments:

      • path: (character) path of the file to create an Instance.

See Also

ExtractorEml, ExtractorSms, ExtractorTwtid, ExtractorYtbid, Instance