pivot_format

pivot_format

Format

R6Class object.

Value

Object of R6Class for modelling a mapping format

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Public fields

id

id

pkg

pkg

reader

reader

checker

checker

constructor

constructor

Methods


Method new()

Initializes pivot format. Method is used to instantiate a pivot_format, given a unique id, the name of package used (for information only). A format is then defined by string expressions (using sprintf formatting) to read metadata properties (reader), one for checking existence of properties (checker), and an expression to create metadata objects (constructor). In case the constructor is NULL, then no conversion to this metadata format will be possible.

Usage

pivot_format$new(id, pkg, reader = NULL, checker = NULL, constructor = NULL)

Arguments

id

id

pkg

pkg

reader

reader

checker

checker

constructor

constructor


Method clone()

The objects of this class are cloneable with this method.

Usage

pivot_format$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

  #example on how geometa format is defined as pivot format
  pivot_format$new(
    id = "geometa", pkg = "geometa",
    reader = "%s[[%s]]", checker = "!is.null(%s[[%s]])",
    constructor = "ISOMetadata$new"
  )
#> <pivot_format>
#>   Public:
#>     checker: !is.null(%s[[%s]])
#>     clone: function (deep = FALSE) 
#>     constructor: ISOMetadata$new
#>     id: geometa
#>     initialize: function (id, pkg, reader = NULL, checker = NULL, constructor = NULL) 
#>     pkg: geometa
#>     reader: %s[[%s]]