A class for getting schema properties.
Value
List of of data frames. Create a list from a schema object
Creates a data.frame with the fields name and type
data frame with type and name Get schema references
Parses $ref calls in a schema. Can retrieve internal ('"$ref":"#/definitions/someDef") or external references ('"$ref":"schemas/datacite/datacite.json"').
For external references, it can handle both pointers and references to entire schemas.
This function navigates between parent and child schemas by manipulating
variables in the package environment the
.
data frame with name or type. Process Array Items
Processes array items so they can be added to a data frame.
data frames with name and type for array items that are objects or character strings atomic (string, null, Boolean, etc) array items.
Public fields
schema_path
(
character(1)
)
path to the schema file.schema_list_out
(
list()
)
List of data frames with schema properties.wdds_version
(
character(1)
)
version of wdds usedcurrent_schema_path
(
character(1)
)
current schema file pathcurrent_schema_dir
(
character(1)
)
current schema directory pathcurrent_sub_schema_dir
(
character(1)
)
current sub schema directory pathparent_schema_path
(
character(1)
)
parent schema file pathparent_schema_dir
(
character(1)
)
parent schema directoryarray_items
(
c()
)
array itemsarray_items_skip
(
logical(1)
)
array items to skiparray_items_parent
(
logical(1)
)
parent array items
Methods
Method new()
Creates a new instance of this R6 class.
Usage
schema_obj$new(schema_path, wdds_version = "latest")
Method create_schema_list()
Create an expanded schema object
Produces a list of data frame with name and type for the schema. This is a recursive set of function and may be expanded to get other properties.