Learn R Programming

datapack (version 1.4.1)

validate: Validate a SystemMetadata object.

Description

Validate a system metadata object, ensuring that required fields are present and of the right type.

Usage

validate(x, ...)

# S4 method for SystemMetadata validate(x, ...)

Arguments

x

the instance to be validated

...

(Additional parameters)

Value

logical, TRUE if the SystemMetadata object is valid, else a list of strings detailing errors

See Also

SystemMetadata-class

Examples

Run this code
# NOT RUN {
library(XML)
doc <- xmlParseDoc(system.file("testfiles/sysmeta.xml", package="datapack"), asText=FALSE)
sysmeta <- new("SystemMetadata")
sysmeta <- parseSystemMetadata(sysmeta, xmlRoot(doc))
valid <- validate(sysmeta)
# }

Run the code above in your browser using DataLab