Scrapes all polyhedra in data folder to save a representation which
is accesible by the final users upon call to getPolyhedron()
.
PolyhedraDatabase.class
R6Class
object.
polyhedra.rds.file
path of rds database file
sources.config
Sources configuration for scraping different sources
ledger
rr ledger of scraping process
data
Polyhedra data from different sources
initialize()
Initializes the object
existsSource(source)
Determines if the source exists on the database
getPolyhedraSourceDir(source)
Retrieves polyhedra dir of a source
addSource(source)
Adds a new source to the database
configPolyhedraRDSPath()
config path for rds database file
existsPolyhedron(source,polyhedron.name)
Determines if the polyhedron exists on the database
getPolyhedron(source, polyhedron.name, strict)
Retrieves a polyhedron by source and name
addPolyhedron(source, polyhedron, overwrite, save.on.change = FALSE)
Adds a polyhedron by source and name, if orverwrite is TRUE, it will update any existing one by that source and name
configPolyhedraSource(source.config, source.filenames, max.quant)
Scrapes all polyhedra in the given directory for adding to db or testing
schedulePolyhedraSources(sources.config, source.filenames, max.quant,
test)
Scrapes files applying parameter sources.config
cover(sources, covering.code, polyhedra.names = NULL,
max.quant = 0, save.on.change = FALSE, seed = NULL)
Cover all polyhedron with specified code
scrape(mode = "scrape.queued",
sources = names(self$sources.config),
max.quant = 0, time2scrape.source = 30,
save.on.change = FALSE, skip.still.queued = FALSE)
Scrape file with specified parameters
saveRDS = function(save.on.change = TRUE)
Save state in file when specified
getAvailablePolyhedra(sources,search.string)
Retrieves all polyhedron within the source those names match with search.string