BiodbDbsInfo | R Documentation |
A class for describing the available databases.
A class for describing the available databases.
The unique instance of this class is handle by the BiodbMain
class and accessed through the getDbsInfo()
method.
new()
New instance initializer. The class must not be instantiated directly. Instead, access the BiodbDbsInfo instance through the BiodbMain instance using the getDbsInfo() method.
BiodbDbsInfo$new(cfg)
cfg
The BiodbConfig instance.
Nothing.
define()
Define databases from a structured object, normally loaded from a YAML file.
BiodbDbsInfo$define(def, package = "biodb")
def
A named list of database definitions. The names of the list will be the IDs of the databases.
package
The package to which belong the new definitions.
Nothing.
getIds()
Gets the database IDs.
BiodbDbsInfo$getIds()
A character vector containing all the IDs of the defined databases.
isDefined()
Tests if a database is defined.
BiodbDbsInfo$isDefined(db.id)
db.id
A database ID, as a character string.
TRUE if the specified id corresponds to a defined database, FALSE otherwise.
checkIsDefined()
Checks if a database is defined. Throws an error if the specified id does not correspond to a defined database.
BiodbDbsInfo$checkIsDefined(db.id)
db.id
A character vector of database IDs.
Nothing.
get()
Gets information on a database.
BiodbDbsInfo$get(db.id = NULL, drop = TRUE)
db.id
Database IDs, as a character vector. If set to NULL, informations on all databases will be returned.
drop
If TRUE and only one database ID has been submitted, returns a single BiodbDbInfo instance instead of a list.
A list of BiodbDbInfo instances corresponding to the specified database IDs.
getAll()
Gets informations on all databases.
BiodbDbsInfo$getAll()
A list of all BiodbDbInfo instances."
print()
Prints informations about this instance, listing also all databases defined.
BiodbDbsInfo$print()
Nothing.
clone()
The objects of this class are cloneable with this method.
BiodbDbsInfo$clone(deep = FALSE)
deep
Whether to make a deep clone.
BiodbMain
and child class BiodbDbInfo
.
# Create an instance with default settings: mybiodb <- biodb::newInst() # Getting the entry content type of a database: db.inf <- mybiodb$getDbsInfo()$get('comp.csv.file') cont.type <- db.inf$getPropertyValue('entry.content.type') # Terminate instance. mybiodb$terminate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.