convert_metadata: convert_metadata

View source: R/geometa_mapping.R

convert_metadataR Documentation

convert_metadata

Description

convert_metadata is a tentative generic metadata converter to convert from one source object, represented in a source metadata object model in R (eg eml) to a target metadata object, represented in another target metadata object model (eg geometa ISOMetadata). This function relies on a list of mapping rules defined to operate from the source metadata object to the target metadata object. This list of mapping rules is provided in a tabular format. A version is embedded in geometa and can be returned with getMappings.

Usage

convert_metadata(obj, from, to, mappings, verbose)

Arguments

obj

a metadata object given in one of the mapping formats known by geometa. The object should be a valid id as listed by getMappingFormats, supported as source format (from is TRUE).

from

a valid mapping format id (see getMappingFormats) that indicates the metadata model / format used for the argument obj

to

a valid mapping format id (see getMappingFormats) to convert to

mappings

a data.frame giving the reference mapping rules to convert metadata object. This data.frame is by default the output of getMappings.

verbose

print debugging messages. Default is FALSE

Value

an metadata object in the model specified as to argument

Note

This function is mainly used internally in as generic methods to convert from one metadata format to another. It is exported for extension to user custom metadata formats or for debugging purpose. This converter is still experimental.

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


geometa documentation built on May 29, 2024, 10:31 a.m.