Learn R Programming

bdpar (version 1.0.1)

ResourceHandler: Class that handles different types of resources

Description

Class that handles different types of resources.

Usage

ResourceHandler

Arguments

Constructor

ResourceHandler$new()

Methods

  • isLoadResource: from the resource path, it is checked if they have already been loaded. In this case, the list of the requested resource is returned. Otherwise, the resource variable is added to the list of resources, and the resource list is returned. In the event that the resource file does not exist, NULL is returned.

    • Usage: isLoadResource(pathResource)

    • Arguments:

      • pathResource: (character) resource file path.

  • getResources: gets of resources variable.

    • Usage: getResources()

    • Value: value of resources variable.

  • setResources: sets of resources.

    • Usage: setResources(resources)

    • Arguments:

      • resources: (list) the new value of resources.

  • getNamesResources: gets of names of resources.

    • Usage: getNamesResources()

    • Value: value of names of resources.

Private fields

  • resources: (list) variable that stores the lists of the different types of resources.

Details

It is a class that allows store the resources that are needed in the Pipes to avoid having to repeatedly read from the file. File resources of type json are read and stored in memory.