| geoflow_handler | R Documentation |
This class models a content handler. An handler is a method to handle
some content (eg entity or contact). It is mainly driven by a function that takes
as argument the handler considered (as self accessible object), a source
which identifiers the source to be handled, that can be of a different type (eg a URL, a file path)
depending on the handler, and a config object, as the overall configuration created by geoflow
initWorkflow function.
R6Class object.
geoflow_handler
Object of R6Class for modelling a handler
idhandler id
typehandler type (entity,contact,dictionary)
fundersfunders
authorsauthors
maintainermaintainer
defhandler definition
packageshandler packages
funhandler function
scripthandler script
optionsoptions
available_optionsavailable options
statusstatus
notesnotes
new()Initializes a geoflow_handler
geoflow_handler$new(
yaml = NULL,
id = NULL,
type = c("entity", "contact", "dictionary"),
funders = list(),
authors = list(),
maintainer = NULL,
def = "",
packages = list(),
fun = NULL,
script = NULL,
options = list(),
available_options = list(),
status = "stable",
notes = ""
)yamla YAML file
idid
typetype
fundersfunders
authorsauthors
maintainermaintainer
defdef
packageslist of packages required for the handler
funthe handler function having 2 arguments config and source
scripta handler script
optionsaction options
available_optionsavailable options for the action
statusstatus (experimental/stable/deprecated/superseded)
notesnotes
fromYAML()Reads handler properties from YAML file
geoflow_handler$fromYAML(file)
filefile
checkPackages()Check that all packages required for the handler 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.
geoflow_handler$checkPackages()
getOption()Get handler option value
geoflow_handler$getOption(option)
optionoption id
the option value, either specified through a workflow, or the default value
clone()The objects of this class are cloneable with this method.
geoflow_handler$clone(deep = FALSE)
deepWhether to make a deep clone.
This class is essentially called internally by geoflow to register default handlers for entities and contacts.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
## Not run:
handler <- geoflow_handler$new(
id = "some-id",
def = "some definition",
packages = list(),
fun = function(handler, source, config){},
available_options = list()
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.