| geoflow_entity | R Documentation |
This class models a entity object
R6Class object.
geoflow_entity
Object of R6Class for modelling a entity object
identifiersentity identifiers
datesentity dates
languageentity language
typesentity types
titlesentity titles
descriptionsentity descriptions
subjectsentity subjects
formatsentity formats
contactsentity contacts
relationsentity relations
rightsentity rights
spatial_extentspatial extent
spatial_bboxspatial bounding box
geo_bboxgeographic bounding box (in EPSG:4326 / WGS 84)
sridentity srid
temporal_extententity temporal extent
provenanceentity provenance
dataentity data
statusentity status
resourcesentity resources
localesentity locales
new()Initializes an object of class geoflow_entity
geoflow_entity$new()
setShinyEditorMode()Set mode for geoflow-shiny
geoflow_entity$setShinyEditorMode(mode = c("creation", "edition"))modemode
getShinyEditorMode()Get mode for geoflow-shiny
geoflow_entity$getShinyEditorMode()
the shiny editor mode
getAllowedKeyValuesFor()Retrieves keys allowed for a given tabular field name. eg. "Identifier"
geoflow_entity$getAllowedKeyValuesFor(field)
fieldfield name
the list of valid keys for the field considered
addLocalesFromValues()Adds locales to entity from kvp values
geoflow_entity$addLocalesFromValues(values)
valuesvalues
setIdentifier()Set an identifier given a key. Default key is "id", but others can be specified, eg "doi".
geoflow_entity$setIdentifier(key = "id", id)
keyidentifier key. Default is "id"
ididentifier value
addDate()Adds a date
geoflow_entity$addDate(dateType, date)
dateTypedate type, object of class character
datedate, object of class Date or POSIXt
setLanguage()Set the language used for the entity description (metadata). Default is "eng".
geoflow_entity$setLanguage(language)
languagelanguage
writeDataResource()writes a data resource. Deprecrated Note: TODO to review in line with 'writeWorkflowJobDataResource
geoflow_entity$writeDataResource(obj = NULL, resourcename, type = "shp")
objobject
resourcenameresource name
typetype of resosurce
setType()Set the type of description. By default a generic type (key = "generic") is defined to "dataset", and will be used as default type for actions that perform metadata production / publication.
geoflow_entity$setType(key = "generic", type)
keytype key. Default is "generic"
typetype value
setTitle()Sets title
geoflow_entity$setTitle(key = "title", title)
keytitle key. Default is "title"
titletitle value
setDescription()Sets description
geoflow_entity$setDescription(key, description)
keydescription key. Default is "abstract"
descriptiondescription value
addSubject()Adds a subject
geoflow_entity$addSubject(subject)
subjectobject of class geoflow_subject
addFormat()Adds a format
geoflow_entity$addFormat(format)
formatobject of class geoflow_format
addContact()Adds a contact
geoflow_entity$addContact(contact)
contactobject of class geoflow_contact
addRelation()Adds a relation
geoflow_entity$addRelation(relation)
relationobject of class geoflow_relation
addRight()Adds a right
geoflow_entity$addRight(right)
rightobject of class geoflow_right
setSpatialExtent()Set spatial extent. Various ways can be used to set the spatial extent 1) with a WKT string,
2) with a bbox, object of class matrix, or 3) specifying a data object (from sf).
The crs (coordinate reference system) should be specified with the crs SRID (number).
The spatial extent is not necessarily a bounding box but can be one or more geometries.
geoflow_entity$setSpatialExtent(wkt = NULL, bbox = NULL, data = NULL, crs = NA)
wkta WKT string
bboxa bbox
dataan object of class sf
crscrs
setSpatialBbox()Set spatial bbox. Various ways can be used to set the spatial extent 1) with a WKT string,
2) with a bbox, object of class matrix, or 3) specifying a data object (from sf).
The crs (coordinate reference system) should be specified with the crs SRID (number).
geoflow_entity$setSpatialBbox(wkt = NULL, bbox = NULL, data = NULL, crs = NA)
wkta WKT string
bboxa bbox
dataan object of class sf
crscrs
setGeographicBbox()Set geographic bbox (in EPGS:4326 / WGS 84), by converting (if needed) the spatial bbox
geoflow_entity$setGeographicBbox()
setSrid()Sets entity SRID
geoflow_entity$setSrid(srid)
sridsrid
setTemporalExtent()Sets temporal extent. The temporal extent can be a year, date instant or interval
geoflow_entity$setTemporalExtent(str)
strobject of class numeric (case of year) or character
setProvenance()Sets entity provenance
geoflow_entity$setProvenance(provenance)
provenanceobject of class geoflow_provenance
setData()Sets entity data object
geoflow_entity$setData(data)
dataobject of class geoflow_data
addData()Adds entity data object
geoflow_entity$addData(data)
dataobject of class geoflow_data
getEntityJobDirname()Gets entity job directory name. In case entity is identified with a DOI, the '/' (slash) will be replaced by '_' (underscore) to make sure directory is created.
geoflow_entity$getEntityJobDirname()
get the name of entity job directory that will be created for the entity
getEntityJobDirPath()Gets entity job directory path. In the job directory, all entities subdirs will be created within a 'entities' directory.
geoflow_entity$getEntityJobDirPath(config, jobdir = NULL)
configgeoflow configuration object
jobdirrelative path of the job directory
the entity job directory path
prepareEntityJobDir()Function called internally by geoflow that creates the entity directory and relevant sub-directories. The default sub-directories will include 'data' and 'metadata'. Other sub-directories may be created depnding on the actions enabled in the workflow (and if their target directory is different from 'data'/'metadata').
geoflow_entity$prepareEntityJobDir(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
copyDataToJobDir()This function will look at data object(s) associated to the entity (previously set with
setData or added with addData), and will try to (download)/copy the data source to the
geoflow job directory.
geoflow_entity$copyDataToJobDir(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
copyStylesToJobDir()This function checks for the availability of layer styles (set as entity resource) that would have been added with DBI handlers from a special DB 'layer_styles' table
geoflow_entity$copyStylesToJobDir(config)
configgeoflow config object
enrichWithDatatypes()Function that will scan zip data files and resolve data objects sourceType and uploadType
geoflow_entity$enrichWithDatatypes(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
enrichWithData()This function will enrich the entity data objects with data features (vector data) or coverages (grid data). This method will overwrite
spatial metadata such as the bounding box (unless global option skipDynamicBbox is enabled). Note that the user spatial extent is not overwriten
since it may contain finer geometries than a bounding box.
geoflow_entity$enrichWithData(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
enrichSpatialCoverageFromDB()This function computes spatial coverage from DB (table, view or query)
without having to deal with a full data download. It is triggered when the global option
skipDataDownload is enabled.
geoflow_entity$enrichSpatialCoverageFromDB(config)
configgeoflow config object
enrichWithFeatures()This function will enrich the entity data objects with data features (vector data). This method will overwrite
spatial metadata such as the bounding box (unless global option skipDynamicBbox is enabled). Note that the user spatial extent is not overwriten
since it may contain finer geometries than a bounding box.
geoflow_entity$enrichWithFeatures(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
enrichWithCoverages()This function will enrich the entity data objects with data coverages (grid data). This method will overwrite
spatial metadata such as the bounding box (unless global option skipDynamicBbox is enabled). Note that the user spatial extent is not overwriten
since it may contain finer geometries than a bounding box.
geoflow_entity$enrichWithCoverages(config, jobdir = NULL)
configgeoflow config object
jobdirrelative path of the job directory
prepareFeaturesToUpload()This function will 1) check (in case of upload is requested) if the type of source and upload are both different on files formats(eg. csv,shp,gpkg) and 2) process automatically to conversion from source to upload type.
geoflow_entity$prepareFeaturesToUpload(config)
configgeoflow config object
enrichWithIdentifiers()Function that will enrich entity with identifiers needed across multiple actions
geoflow_entity$enrichWithIdentifiers(config)
configgeoflow config object
enrichWithRelations()This function that will enrich the entity with relations. At now this is essentially related to adding
relations if a Geoserver (geosapi) publishing action is enabled. Relations added will depend on the
enrich_with_relation_* options set in a) the geosapi action, ie.
1) add WMS auto-generated thumbnail (if option enrich_with_relation_wms_thumbnail is TRUE)
2) add WMS base URL relation (if option enrich_with_relation_wms is TRUE)
3) for vector spatial representation type:
- add WFS base URL relation (if option enrich_with_relation_wfs is TRUE)
- add WFS auto-generated links as convenience for data download links (if option enrich_with_relation_wfs_download_links is TRUE)
4) for grid spatial representation type:
- add WCS base URL relation (if option enrich_with_relation_wcs is TRUE)
b) in the geonapi action (for adding a CSW metadata URL)
b) in the ows4R action (for adding a CSW metadata URL)
geoflow_entity$enrichWithRelations(config)
configgeoflow config object
enrichWithSubjects()Enrichs the entity with subjects. If no subject specify in Subjects, automatically add keyword from dictionary to 'theme' category
geoflow_entity$enrichWithSubjects(config, exclusions = c())
configgeoflow config object
exclusionsexclusions
enrichWithVocabularies()Enrichs the entity with vocabularies
geoflow_entity$enrichWithVocabularies(config)
configgeoflow config object
enrichWithFormats()Enrichs the entity with formats
geoflow_entity$enrichWithFormats(config)
configgeoflow config object
enrichWithMetadata()Enrichs the entity properties with entity metadata from other properties.
geoflow_entity$enrichWithMetadata(config)
configgeoflow config object
getContacts()Get the entity contacts
geoflow_entity$getContacts(pretty = FALSE)
prettyto prettify the output as data.frame
a list of geoflow_contact or a data.frame
getSubjects()Get the entity subjects
geoflow_entity$getSubjects(pretty = FALSE, keywords = FALSE)
prettyto prettify the output as data.frame
keywordsto add keywords to the output or not. Default is FALSE
a list of geoflow_subject or a data.frame
getRelations()Get the entity relations
geoflow_entity$getRelations(pretty = FALSE)
prettyto prettify the output as data.frame
a list of geoflow_relation or a data.frame
setStatus()Set a simple status either "draft" or "published". This method is required to deal with systems that manage DOIs, such as Zenodo (with zen4R) or Dataverse (with atom4R) publishing actions (Used internally by geoflow).
geoflow_entity$setStatus(system, status)
systema system name eg. "zenodo", "dataverse"
statusa status for entity resource "draft" or "published"
getJobResource()Get an entity job resource path
geoflow_entity$getJobResource(config, resourceType, filename)
configa geoflow config object
resourceTypetype of resource, matching a sub-directory within the entity job directory
filenamefilename
the file path of the job resource
getJobDataResource()Get an entity job data resource path
geoflow_entity$getJobDataResource(config, filename)
configa geoflow config object
filenamefilename
the file path of the job data resource
getJobMetadataResource()Get an entity job metadata resource path
geoflow_entity$getJobMetadataResource(config, filename)
configa geoflow config object
filenamefilename
the file path of the job metadata resource
addResource()Adds a resource to the entity
geoflow_entity$addResource(id, resource)
idid of the resource
resourceresource
asDataFrame()Methods to export the geoflow_entity as data.frame using key-based syntax.
geoflow_entity$asDataFrame(line_separator = NULL)
line_separatora line separator. By default, the default line separator will be used.
an object of class data.frame giving the entities using key-based syntax
clone()The objects of this class are cloneable with this method.
geoflow_entity$clone(deep = FALSE)
deepWhether to make a deep clone.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.