MetadataInformation-class {MacrobondAPI}R Documentation

MetadataInformation class

Description

A MetadataInformation object contains information about a type of metadata attribute.

Objects from the Class

You get an instance of this class by calling GetMetadataInformation.

Methods

getName

signature(object = "MetadataInformation"): The name of the metadata attribute.

getDescription

signature(m = "MetadataInformation"): A short description of the metadata attribute.

getComment

signature(m = "MetadataInformation"): An optional comment that further describes the metadata attribute.

getValueType

signature(m = "MetadataInformation"): Get the type of the value. This can be "character", "logical", "numeric", "integer" or "POSIXlt".

getCanHaveMultipleValues

signature(m = "MetadataInformation"): If TRUE, then a Metadata object can have several values of this type.

getIsDatabaseEntity

signature(m = "MetadataInformation"): If TRUE, then this value corresponds to an Entity in the database that can be retrieved by FetchOneEntity.

getUsesValueList

signature(m = "MetadataInformation"): If TRUE, then this type of metadata uses a list of possible values and only values from that list can be used. Information about a specific value can be found by calling getValueInformation.

getCanListValues

signature(m = "MetadataInformation"): If TRUE, then the possible values can be listed using the ListAllValues function.

listAllValues

signature(m = "MetadataInformation"): Get a list of all possible values for a metadata type that uses a value list. The result is a matrix with the columns "Name", "Description" and "Comment".

getValueInformation

signature(m = "MetadataInformation", value = "character"): Get a list with the Name, Description and Comment for a value.

getValuePresentationText

signature(m = "MetadataInformation", value = "character"): Format a value as a presentable text.

arrangeValue

signature(m = "MetadataInformation", values="ANY"): Arrange the values in hierarchical order. This is typically used with values of the "Region" attribute to organize them into order of region, sub-region, sub-sub-region etc. Usually country, state, city etc. This method is available with Macrobond application 1.23.14 or later.

show

signature(object = "MetadataInformation"): Show an overview of the object.

See Also

GetMetadataInformation, Metadata

Examples

# Get information about the TimeDim metadata attribute
metaInfoTimeDim <- GetMetadataInformation("TimeDim")
show(metaInfoTimeDim)
listAllValues(metaInfoTimeDim)

# Get a presentation text for the region code "us". You typically obtain metadata values, like the region code, using getFirstMetadataValue.
metaInfoRegion <- GetMetadataInformation("Region")
getValuePresentationText(metaInfoRegion, "us")

[Package MacrobondAPI version 1.1-5 Index]