BiodbDbsInfo-class {biodb}R Documentation

A class for describing the available databases.

Description

The unique instance of this class is handle by the BiodbMain class and accessed through the getDbsInfo() method.

Methods

checkIsDefined(db.id)

:

Checks if a database is defined. Throws an error if the specified id does not correspond to a defined database.

db.id: A character vector of database IDs.

Returned value: None.

define(def, package = "biodb")

:

Define databases from a structured object, normally loaded from a YAML file.

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.

Returned value: None.

get(db.id = NULL, drop = TRUE)

:

Gets information on a database.

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.

Returned value: A list of BiodbDbInfo instances corresponding to the specified database IDs.

getAll()

:

Gets informations on all databases.

Returned value: A list of all BiodbDbInfo instances.

getIds()

:

Gets the database IDs.

Returned value: A character vector containing all the IDs of the defined databases.

isDefined(db.id)

:

Tests if a database is defined.

db.id: A database ID, as a character string.

Returned value: TRUE if the specified id corresponds to a defined database, FALSE otherwise.

See Also

BiodbMain and child class BiodbDbInfo.

Examples

# 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()


[Package biodb version 1.0.4 Index]