Function to set the time series metadata of a SA-item (provider, source of the data...).
set_ts_metadata()
uses the metadata of another SA-item while put_ts_metadata()
allows to update a specific key with a new information.
Examples
# Change the file of a given item
file <- system.file("workspaces", "workspace_test.xml", package = "rjd3workspace")
jws <- jws_open(file)
jsap <- jws_sap(jws, 1)
jsai <- jsap_sai(jsap, 1)
nid <- rjd3providers::txt_change_file(get_ts_metadata(jsai, "@id"), "test.csv")
put_ts_metadata(jsap, 1, "@id", nid)
jsai <- jsap_sai(jsap, 1)
get_ts_metadata(jsai, "@id")
#> [1] "demetra://tsprovider/Txt/20111201/SERIES?datePattern=dd%2FMM%2Fyyyy&delimiter=SEMICOLON&file=test.csv#seriesIndex=3"