DwCMetadata: R6 metadata class

DwCMetadataR Documentation

R6 metadata class

Description

R6 class that represents metadata in DwC

Format

R6Class object.

Details

The DwCMetadata class exists as a handling class for the encapsulation and handling of metadata being presented

Methods

Public methods


Method importFromLivingNorwayHTML()

Retrieve metadata information from a HTML file that has been created with a Living Norway HTML tag schema

Usage
DwCMetadata$importFromLivingNorwayHTML(fileLocation, fileEncoding = "", ...)
Arguments
fileLocation

A character scalar containing the location of the HTML file

fileEncoding

A character scalar. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written

...

A set of arguments to be passed to the xml_new_root function to define namespace information. The values returned by the helper function getDefaultEMLDefinitionInfo will be used unless overwritten by user input here. In addition, arguments required by the EML standard but not provided here (such as the packageID attribute) will be otherwise auto-generated


Method importFromLivingNorwayRMD()

Retrieve metadata information from a RMD file that has been created with a Living Norway HTML tag schema

Usage
DwCMetadata$importFromLivingNorwayRMD(fileLocation, fileEncoding = "", ...)
Arguments
fileLocation

A character scalar containing the location of the RMD file

fileEncoding

A character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written

...

A set of arguments to be passed to the xml_new_root function to define namespace information. The values returned by the helper function getDefaultEMLDefinitionInfo will be used unless overwritten by user input here. In addition, arguments required by the EML standard but not provided here (such as the packageID attribute) will be otherwise auto-generated


Method importFromEML()

Retrieve metadata information from an Ecological Metadata Language (EML) file

Usage
DwCMetadata$importFromEML(fileLocation, fileEncoding = "")
Arguments
fileLocation

A character scalar containing the location of the RMD file

fileEncoding

A character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written


Method importFromDwCArchive()

Retrieve metadata information from a Darwin Core archive file

Usage
DwCMetadata$importFromDwCArchive(fileLocation, fileEncoding = "")
Arguments
fileLocation

A character scalar containing the location of the RMD file

fileEncoding

A character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written


Method exportToEML()

Export the metadata as an EML XML file

Usage
DwCMetadata$exportToEML(fileLocation, fileEncoding = "")
Arguments
fileLocation

A character scalar containing the location to store the EML fiøe

fileEncoding

A character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written


Method new()

Initialise a metadata object from an import file

Usage
DwCMetadata$new(fileLocation, fileEncoding = "", fileType = NA, ...)
Arguments
fileLocation

A character scalar containing the location of the import file

fileEncoding

A character string. If non-empty, declares the encoding to be used on a file so the character data can be re-encoded as they are written

fileType

A character scalar stating the type of the file. File type can be either "rmarkdown", "html", "eml", or "darwincore". If NA then the file type will be determined from the file extension

...

A set of arguments to be passed to the xml_new_root function to define namespace information. The values returned by the helper function getDefaultEMLDefinitionInfo will be used unless overwritten by user input here. In addition, arguments required by the EML standard but not provided here (such as the packageID attribute) will be otherwise auto-generated


Method print()

Print the metadata information to the console

Usage
DwCMetadata$print()

Method getTitle()

Retrieve the title of the dataset

Usage
DwCMetadata$getTitle(lang = NA)
Arguments
lang

A character scalar that specifies the language of the title to return. This is useful when the title has multiple translations in the metadata


Method getCreatorInfo()

Retrieve the information of the dataset creators

Usage
DwCMetadata$getCreatorInfo(lang = NA)
Arguments
lang

A character scalar that specifies the language of the elements to return. This is useful when the elements have multiple translations in the metadata


Method getAbstract()

Retrieve the dataset abstract

Usage
DwCMetadata$getAbstract(lang = NA)
Arguments
lang

A character scalar that specifies the language of the elements to return. This is useful when the elements have multiple translations in the metadata


Method clone()

The objects of this class are cloneable with this method.

Usage
DwCMetadata$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


LivingNorway/LivingNorwayR documentation built on Jan. 11, 2024, 5:07 a.m.