ThreddsNode {thredds} | R Documentation |
A base representation that other nodes subclass from
Description
R6 base class for all other to inherit from
Public fields
url
character - possibly wrong but usually right!
node
xml2::xml_node
verbose
logical
prefix
xpath namespace prefix, NA or NULL or charcater() to ignore
tries
numeric number of requests attempts before failing
encoding
character, by default 'UTF-8'
base_url
character, the base URL for the service
Methods
Public methods
Method new()
initialize an instance of ThreddsNode
Usage
ThreddsNode$new( x, verbose = FALSE, n_tries = 3, prefix = NULL, ns_strip = FALSE, encoding = "UTF-8", base_url = "" )
Arguments
x
url or xml2::xml_node
verbose
logical, TRUE to be noisy (default FALSE)
n_tries
numeric, defaults to 3
prefix
character, the namespace to examine (default NULL, inherited when initialized)
ns_strip
logical, if TRUE then strip namespace (default FALSE)
encoding
character, by default 'UTF-8'
base_url
character, the base URL for the service
Method print()
print method
Usage
ThreddsNode$print(prefix = "", ...)
Arguments
prefix
character, to be printed before each line of output (like spaces)
...
other argum,ents (ignored for now)
Method GET()
Retrieve a node of the contents at this nodes URL
Usage
ThreddsNode$GET()
Returns
ThreddsNode or subclass or NULL
Method browse()
Browse the URL if possible
Usage
ThreddsNode$browse()
Method children_names()
Retrieve a vector of unique child names
Usage
ThreddsNode$children_names(...)
Arguments
...
further arguments for
xml_children_names
Returns
a vector of zero or more child names
Method clone()
The objects of this class are cloneable with this method.
Usage
ThreddsNode$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Note
Abstract class. For examples see CatalogNode