Skip to contents

Check existing JD+ object

Usage

check_information(jws, idx_sap = NULL, idx_sai = NULL)

Arguments

jws

the workspace object

idx_sap

the index (or the indices) of the SA-Processing (s) to check

idx_sai

the index (or the indices) of the SA-Item(s) to check.

Value

This function return either a boolean (TRUE) if the SAI and the SAP exist in the WS, or an error specifying the not found object.

Details

If the object idx_sai is NULL then the function will only check if the workspace contains a SA-Processing at the index idx_sap. If the object idx_sap is NULL then the function will check if every SA-Processing of the workspace contains a SA-Item at the index idx_sai. If the object idx_sap is NULL and idx_sai is NULL then the function will check nothing.

If the object idx_sap and / or idx_sai have a length > 1 then the checks are iterated over all the indices.

Examples


# library("rjd3workspace")
# ws <- rjd3workspace::.jws_open(file = "ws_production.xml")
#
# # Check if the SA-Item n°3 in the SA-Processing n°1 exist
# check_information(jws = ws, idx_sap = 1, idx_sai = 3)
#
# # Check if the SA-Items 1, 2 and 5 in the SA-Processing n°1 exist
# check_information(jws = ws, idx_sap = 1, idx_sai = c(1, 2, 5))