Validate a SystemMetadata object.

Share:

Description

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

Usage

1
2
3
4
validate(x, ...)

## S4 method for signature '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

1
2
3
4
5
library(XML)
doc <- xmlParseDoc(system.file("testfiles/sysmeta.xml", package="datapack"), asText=FALSE)
sysmeta <- new("SystemMetadata")
sysmeta <- parseSystemMetadata(sysmeta, xmlRoot(doc))
valid <- validate(sysmeta)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.