geoflow_data_accessor: Geoflow data accessor class

geoflow_data_accessorR Documentation

Geoflow data accessor class

Description

This class models a data accessor to be used by geoflow

Format

R6Class object.

Details

geoflow_data_accessor

Value

Object of R6Class for modelling a data accessor

Super class

geoflow::geoflowLogger -> geoflow_data_accessor

Public fields

id

accessor ID

software_type

accessor software type

definition

accessor definition

packages

list of packages required for the accessor

download

a download function handler

list

a function handler to list resources in case of a data directory

Methods

Public methods

Inherited methods

Method new()

Initializes the data ccessor

Usage
geoflow_data_accessor$new(
  id = NULL,
  software_type = NULL,
  definition,
  packages = list(),
  download,
  list = NULL
)
Arguments
id

accessor ID

software_type

accessor software type

definition

accessor definition

packages

list of packages required for the accessor

download

download function handler

list

list function handler


Method setId()

Sets accessor ID

Usage
geoflow_data_accessor$setId(id)
Arguments
id

accessor ID to set


Method setSoftwareType()

Sets software type

Usage
geoflow_data_accessor$setSoftwareType(software_type)
Arguments
software_type

software type


Method setPackages()

Sets list of packages required for the accessor

Usage
geoflow_data_accessor$setPackages(packages)
Arguments
packages

a vecto of package names


Method setDefinition()

Sets accessor definition

Usage
geoflow_data_accessor$setDefinition(definition)
Arguments
definition

accessor definition


Method setDownload()

Set download handler (a function with arguments resource, file, path, unzip (TRUE/FALSE) and optional software)

Usage
geoflow_data_accessor$setDownload(download)
Arguments
download

an object of class function


Method setList()

Set list handler (a function with no arguments)

Usage
geoflow_data_accessor$setList(list)
Arguments
list

an object of class function


Method checkPackages()

Check that all packages required for the software are available, if yes, import them in the R session, and return a data.frame giving the packages names and version. If one or more packages are unavailable, an error is thrown and user informed of the missing packages.

Usage
geoflow_data_accessor$checkPackages()

Method clone()

The objects of this class are cloneable with this method.

Usage
geoflow_data_accessor$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Examples

## Not run: 
  access <- geoflow_data_accessor$new(
   id = "some-id",
   software_type = "some-software",
   definition = "definition",
   packages = list(),
   download = function(resource, file, path, software, unzip){},
   list = function(resource, software){}
 )

## End(Not run)


geoflow documentation built on Dec. 12, 2025, 5:08 p.m.