| BiodbConnBase | R Documentation |
BiodbConn for encapsulating all needed information for
database access.Base class of BiodbConn for encapsulating all needed information for
database access.
Base class of BiodbConn for encapsulating all needed information for
database access.
This is the base class for BiodbConn and BiodbDbInfo.
When defining a new connector class, your class must not inherit from
BiodbBaseConn but at least from BiodbConn (or
BiodbRemoteConn or any subclass of BiodbConn).
Its main purpose is to store property values. Those values are initialized
from YAML files. The default definition file is located inside the package
in "inst/definitions.yml" and is loaded at Biodb startup. However you can
define your own files and load them using the
BiodbMain::loadDefinitions() method.
Arguments to the contructor are:
other: Another object inheriting from BiodbBaseConn, and
from which property values will be copied.
db.class: The class of the database ("mass.csv.file",
"comp.csv.file", ...).
properties: Some properties to set at initialization.
new()New instance initializer. Connector objects must not be created directly. Instead, you create new connector instances through the BiodbFactory instance.
BiodbConnBase$new(other = NULL, db.class = NULL, properties = NULL, cfg = NULL)
otherAnother BiodbConnBase instance as a model from which to copy property values.
db.classThe class of the connector (i.e.: "mass.csv.file").
propertiesSome new values for the properties.
cfgThe BiodbConfig instance from which will be taken some property values.
Nothing.
print()Prints a description of this connector.
BiodbConnBase$print()
Nothing.
hasProp()Tests if this connector has a property.
BiodbConnBase$hasProp(name)
nameThe name of the property to check.
Returns true if the property name exists.
getPropSlots()Gets the slot fields of a property.
BiodbConnBase$getPropSlots(name)
nameThe name of a property.
Returns a character vector containing all slot names defined.
hasPropSlot()Tests if a slot property has a specific slot.
BiodbConnBase$hasPropSlot(name, slot)
nameThe name of a property.
slotThe slot name to check.
Returns TRUE if the property name exists and has the
slot slot defined, and FALSE otherwise."
propExists()Checks if property exists.
BiodbConnBase$propExists(name)
nameThe name of a property.
Returns TRUE if the property name exists, and FALSE
otherwise.
isSlotProp()Tests if a property is a slot property.
BiodbConnBase$isSlotProp(name)
nameThe name of a property.
Returns TRUE if the property is a slot propert, FALSE otherwise.
getPropValSlot()Retrieve the value of a slot of a property.
BiodbConnBase$getPropValSlot(name, slot, hook = TRUE)
nameThe name of a property.
slotThe slot name inside the property.
hookIf set to TRUE, enables the calls to hook methods associated with the property. Otherwise, all calls to hook methods are disabled.
The value of the slot slot of the property name.
updatePropertiesDefinition()Update the definition of properties.
BiodbConnBase$updatePropertiesDefinition(def)
defA named list of property definitions. The names of the list must be the property names.
Nothing.
getEntryFileExt()Returns the entry file extension used by this connector.
BiodbConnBase$getEntryFileExt()
A character value containing the file extension.
getDbClass()Gets the Biodb name of the database associated with this connector.
BiodbConnBase$getDbClass()
A character value containing the Biodb database name.
getConnClassName()Gets the name of the associated connector OOP class.
BiodbConnBase$getConnClassName()
Returns the connector OOP class name.
getConnClass()Gets the associated connector OOP class.
BiodbConnBase$getConnClass()
Returns the connector OOP class.
getEntryClassName()Gets the name of the associated entry class.
BiodbConnBase$getEntryClassName()
Returns the name of the associated entry class.
getEntryClass()Gets the associated entry class.
BiodbConnBase$getEntryClass()
Returns the associated entry class.
getEntryIdField()Gets the name of the corresponding database ID field in entries.
BiodbConnBase$getEntryIdField()
Returns the name of the database ID field.
getPropertyValue()Gets a property value.
BiodbConnBase$getPropertyValue(name, hook = TRUE)
nameThe name of the property.
hookIf set to TRUE, enables the calls to hook methods associated with the property. Otherwise, all calls to hook methods are disabled.
The value of the property.
setPropertyValue()Sets the value of a property.
BiodbConnBase$setPropertyValue(name, value)
nameThe name of the property.
valueThe new value to set the property to.
Nothing.
setPropValSlot()Set the value of the slot of a property.
BiodbConnBase$setPropValSlot(name, slot, value, hook = TRUE)
nameThe name of the property.
slotThe name of the property's slot.
valueThe new value to set the property's slot to.
hookIf set to TRUE, enables the calls to hook methods associated with the property. Otherwise, all calls to hook methods are disabled.
Nothing.
getBaseUrl()Returns the base URL.
BiodbConnBase$getBaseUrl()
THe baae URL.
setBaseUrl()Sets the base URL.
BiodbConnBase$setBaseUrl(url)
urlA URL as a character value.
Nothing.
getWsUrl()Returns the web sevices URL.
BiodbConnBase$getWsUrl()
setWsUrl()Sets the web sevices URL.
BiodbConnBase$setWsUrl(ws.url)
ws.urlA URL as a character value.
Nothing.
getToken()Returns the access token.
BiodbConnBase$getToken()
setToken()Sets the access token.
BiodbConnBase$setToken(token)
tokenThe token to use to access the database, as a character value.
Nothing.
getName()Returns the full database name.
BiodbConnBase$getName()
getEntryContentType()Returns the entry content type.
BiodbConnBase$getEntryContentType()
getSchedulerNParam()Returns the N parameter for the scheduler.
BiodbConnBase$getSchedulerNParam()
setSchedulerNParam()Sets the N parameter for the scheduler.
BiodbConnBase$setSchedulerNParam(n)
nThe N parameter as a whole number.
Nothing.
getSchedulerTParam()Returns the T parameter for the scheduler.
BiodbConnBase$getSchedulerTParam()
setSchedulerTParam()Sets the T parameter for the scheduler.
BiodbConnBase$setSchedulerTParam(t)
tThe T parameter as a whole number.
Nothing.
getUrls()Returns the URLs.
BiodbConnBase$getUrls()
getUrl()Returns a URL.
BiodbConnBase$getUrl(name)
nameThe name of the URL to retrieve.
The URL as a character value.
setUrl()Sets a URL.
BiodbConnBase$setUrl(name, url)
nameThe name of the URL to set.
urlThe URL value.
Nothing.
getXmlNs()Returns the XML namespace.
BiodbConnBase$getXmlNs()
clone()The objects of this class are cloneable with this method.
BiodbConnBase$clone(deep = FALSE)
deepWhether to make a deep clone.
Sub-classes BiodbDbInfo and BiodbConn.
# Create an instance with default settings:
mybiodb <- biodb::newInst()
# Accessing BiodbConnBase methods when using a BiodbDbInfo object
dbinf <- mybiodb$getDbsInfo()$get('comp.csv.file')
# Test if a property exists
dbinf$hasProp('name')
# Get a property value
dbinf$getPropertyValue('name')
# Get a property value slot
dbinf$getPropValSlot('urls', 'base.url')
# Terminate instance.
mybiodb$terminate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.