validateValueKindsFromDataFrame: validateValueKindsFromDataFrame

View source: R/JSON_library.R

validateValueKindsFromDataFrameR Documentation

validateValueKindsFromDataFrame

Description

Get a data.table of type names and kind names plus the kind (full object) from a data.frame of type names and kind names.

Usage

validateValueKindsFromDataFrame(typesAndKindsDataFrame,
  lsServerURL = racas::applicationSettings$client.service.persistence.fullpath)

Arguments

typesAndKindsDataFrame

data.frame with 2 columns: lsType and lsKind

lsServerURL

server to check against, currently ignored

Details

Column lsKind will be NULL if there is no value kind found.

Value

a data.table with columns lsTypeName (character), lsKindName (character), lsKind (full object kinds), and lsKindExists (boolean).

Examples

# Not run because this needs a server, example output is below.
# output <- validateValueKindsFromDataFrame(data.frame(lsType="numericValue", lsKind="time"))
output <- structure(list(
 lsTypeName = "numericValue", lsKindName = "time",
 lsKind = list(list(structure(list(id = 12, kindName = "time",
                                   lsType = structure(list(id = 7, typeName = "numericValue", version = 0),
                                                      .Names = c("id", "typeName", "version")),
                                   lsTypeAndKind = "numericValue_time", version = 0),
                              .Names = c("id", "kindName", "lsType", "lsTypeAndKind", "version")))),
 lsKindExists = TRUE), .Names = c("lsTypeName", "lsKindName", "lsKind", "lsKindExists"),
 sorted = c("lsTypeName", "lsKindName"), class = c("data.table", "data.frame"),
 row.names = c(NA, -1L))

mcneilco/racas documentation built on April 19, 2024, 1:12 p.m.