| BiodbDownloadable-class {biodb} | R Documentation |
The class must be inherited by any remote database class that allows download
of its whole content. The hidden/private method .doDownload() must be
implemented by the database class.
download():
Downloads the database content locally.
Returned value: None.
getDownloadPath():
Gets the path where the downloaded content is written.
Returned value: The path where the downloaded database is written.
isDownloaded():
Tests if the database has been downloaded.
Returned value: TRUE if the database content has already been downloaded.
isExtracted():
Tests if the downloaded database has been extracted (in case the database needs extraction).
Returned value: TRUE if the downloaded database content has been extracted, FALSE otherwise.
# Creating a connector class for a downloadable database:
FooDownloadableDb <- methods::setRefClass('FooDownloadableDb',
contains=c('BiodbRemotedbConn', 'BiodbDownloadable'),
methods=list(
# ... other methods ...
# BiodbDownloadable methods
.doDownload=function() {
# Download the database
},
.doExtractDownload=function() {
# Extract data from the downloaded file(s)
}
))