diff --git a/DESCRIPTION b/DESCRIPTION index 65ee1e1f..3c81b6ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: EMLeditor Title: View and Edit EML Metadata -Version: 1.2.0 +Version: 1.3.0 Authors@R: c( person(given="Robert", family="Baker", email="robert_baker@nps.gov", role = c("aut", "cre"), @@ -20,7 +20,8 @@ BugReports: https://github.com/doi-NPS/EMLeditor/issues Encoding: UTF-8 Roxygen: list(markdown = TRUE) Remotes: - doi-NPS/QCkit + github::doi-nps/QCkit, + github::doi-nps/NPSdatastore Imports: httr, readr, @@ -43,7 +44,8 @@ Imports: mockr, rlang, ISOcodes, - sf + sf, + NPSdatastore Suggests: stargazer, knitr, diff --git a/NAMESPACE b/NAMESPACE index 77d8e86f..ba51458c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -45,6 +45,7 @@ export(set_lit) export(set_methods) export(set_missing_data) export(set_new_creator) +export(set_permissions) export(set_producing_units) export(set_project) export(set_protocol) diff --git a/NEWS.md b/NEWS.md index 70d87b52..d690b1d9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,14 @@ -# EMLeditor v1.2.1 (Development version) +# EMLeditor v1.3.0 ("Angel's Landing") +## 2026-09-23 + * New release v1.3.0, "Angel's Landing" + * Deprecated `set_cui`, `set_cui_marking` and `set_cui_code` in favor of `set_permissions` + * Add helper function `.build_access` in utils.R; incorporate `.build_access` into `set_permissions` to add an informative block to the access element in EML. + * Update get_title to explicitly get the dataset title, not just the first title. + +## 2026-09-22 + * Bug fix for `set_int_rights` when force == TRUE + * Bug fix for `set_permissions` when force == TRUE + ## 2026-09-02 * Bug fix for `set_cross_references`. Make sure cross reference URL is added to metadata! diff --git a/R/editEMLfunctions.R b/R/editEMLfunctions.R index dea83d87..88e07bea 100644 --- a/R/editEMLfunctions.R +++ b/R/editEMLfunctions.R @@ -422,6 +422,7 @@ set_content_units <- function(eml_object, park_units, #' Adds CUI dissemination codes to metadata #' #' @description +#' `r lifecycle::badge("deprecated")` #' `set_cui_code()` adds Controlled Unclassified Information (CUI) dissemination codes to EML metadata. These codes determine who can or cannot have access to the data. Unless you have a specific mandate to restrict data, all data should be available to the public. if the CUI dissemination code is PUBLIC, the CUI marking should also be PUBLIC (`see set_cui_marking()`) and the license should be set to CC0 or public domain (see `set_int_rights()`). If your data contains CUI and you need to set the CUI dissemination code to anything other than PUBLIC, please be prepared to provide a legal justification in the form of the appropriate CUI marking (see `set_cui_marking()`). #' #' @details `set_cui_code()` adds a CUI dissemination code to the tag CUI under additionalMetadata/metadata. The available choices for CUI dissemination codes at NPS are (pay attention to the spaces!): @@ -452,6 +453,9 @@ set_cui_code <- function(eml_object, force = FALSE, NPS = TRUE) { + #add in deprecation + lifecycle::deprecate_soft(when = "1.3.0", "set_cui()", "set_permissions()") + cui_code <- toupper(cui_code) # verify CUI code entry; stop if does not equal one of six valid codes listed above: cui_code <- match.arg(cui_code) @@ -534,7 +538,7 @@ set_cui_code <- function(eml_object, #' Adds CUI to metadata #' #' @description -#' #' `r lifecycle::badge("deprecated")` +#' `r lifecycle::badge("deprecated")` #' set_cui adds CUI dissemination codes to EML metadata #' #' @details set_cui adds a CUI code to the tag CUI under additionalMetadata/metadata. @@ -553,11 +557,16 @@ set_cui_code <- function(eml_object, #' \dontrun{ #' set_cui(eml_object, "PUBFUL") #' } -set_cui <- function(eml_object, cui_code = c("PUBLIC", "NOCON", "DL ONLY", - "FEDCON", "FED ONLY"), - force = FALSE, NPS = TRUE) { +set_cui <- function(eml_object, + cui_code = c("PUBLIC", + "NOCON", + "DL ONLY", + "FEDCON", + "FED ONLY"), + force = FALSE, + NPS = TRUE) { #add in deprecation - lifecycle::deprecate_soft(when = "0.1.5", "set_cui()", "set_cui_code()") + lifecycle::deprecate_soft(when = "0.1.5", "set_cui()", "set_permissions()") cui_code <- toupper(cui_code) # verify CUI code entry; stop if does not equal one of six valid codes listed above: @@ -637,7 +646,7 @@ set_cui <- function(eml_object, cui_code = c("PUBLIC", "NOCON", "DL ONLY", #' The function sets the CUI marking for the data package #' -#' @description `r lifecycle::badge("experimental")` +#' `r lifecycle::badge("deprecated")` #' The Controlled Unclassified Information (CUI) marking is different from the CUI dissemination code. The CUI dissemination code (set `set_cui_code()`) sets who can have access to the data package. The CUI marking set by `set_cui_marking()` specifies the reason (if any) that the data are being restricted. #' If the CUI dissemination code is set to PUBLIC, the CUI marking must also be PUBLIC. #' If the CUI dissemination code is set to anything other than PUBLIC, the CUI marking must be set to SP-NPSR, SP-HISTP or SP-ARCHR. @@ -662,12 +671,15 @@ set_cui <- function(eml_object, cui_code = c("PUBLIC", "NOCON", "DL ONLY", #' eml_object <- set_cui_marking(eml_object, "PUBLIC") #' } set_cui_marking <- function (eml_object, - cui_marking = c("PUBLIC", - "SP-NPSR", - "SP-HISTP", - "SP-ARCHR"), - force = FALSE, - NPS = TRUE) { + cui_marking = c("PUBLIC", + "SP-NPSR", + "SP-HISTP", + "SP-ARCHR"), + force = FALSE, + NPS = TRUE) { + + #add in deprecation + lifecycle::deprecate_soft(when = "1.3.0", "set_cui_marking()", "set_permissions()") cui_marking <- toupper(cui_marking) # verify CUI code entry; stop if does not equal one of six valid codes listed above: @@ -726,7 +738,7 @@ set_cui_marking <- function (eml_object, return(invisible(eml_object)) } - #if CUI markings already exist, ask if they should be replaced/changed? + #if CUI markings already exist, ask if they should be replaced/changed? if (force == FALSE) { cat("Your metadata already contains the CUI marking: ", crayon::blue$bold(existing_cui_marking), @@ -806,6 +818,191 @@ set_cui_marking <- function (eml_object, } + +#' Adds information about file access permission levels. +#' +#' @description These permissions are only for file download access (including the EML metadata in .xml format). The actual reference landing page will not be restricted. For more information on CUI markings, please visit the [CUI Markings](https://www.archives.gov/cui/registry/category-marking-list) list maintained by the National Archives. For a list of legal authorities, use `NPSdatastore::get_legal_authority`. +#' +#' @details The details for the data package restriction (or public access), including the reason, the level, and the CUI code and links to relevant documentation, email addresses for contact and a person responsible for the decision will all be populated in a dedicated additionalMetadata element. The access module will be populated with a minimal schema valid information describing access levels. +#' +#' +#' @inheritParams set_title +#' @param access String. one of either "PUBLIC", "RESTRICTED", or "INTERNAL". +#' @param legal_authority_id Integer. Defaults to NULL for PUBLIC access. for RESTRICTED or INTERNAL, legal_authority must be set to a number between 1 and 31 that corresponds to the legal authority in DataStore. Use `NPSdatastore::get_legal_authority` to generate a list along with definitions. +#' @param contact_email String. Defaults to NULL for PUBLIC access. for RESTRICTED or INTERNAL, an email address must be supplied. It will be used to request more information about a restricted source. It is suggested that this be a group email rather than an individual due to potential staff turnover. +#' @param authority_designator String. Defaults to NULL for PUBLIC access. for RESTRICTED or INTERNAL, the name of the person who is responsible for restricting the files attached to the reference. +#' +#' @return an EML-formatted R object +#' @export +#' +#' @examples +#' \dontrun{ +#' eml_object <- set_permissions(eml_object, "PUBLIC") +#' } +set_permissions <- function (eml_object, + access = c("PUBLIC", "RESTRICTED", "INTERNAL"), + legal_authority_id = NULL, + contact_email = NULL, + authority_designator = NULL, + force = FALSE, + NPS = TRUE) { + #test that access is either "PUBLIC", "RESTRICTED", or "INTERNAL" + access <- toupper(access) + access <- match.arg(access) + + if (!access == "PUBLIC") { + # test legal authority is numeric + if (!is.numeric(legal_authority_id)) { + if (is.numeric(!legal_authority_id)) { + cli::cli_abort(c(x = paste0("The legal_authority_id parameter ", + "must be an integer between 1 and 31 (inclusive)."))) + } + } + # test legal authority is an integer within correct range + if((!legal_authority_id %% 1 == 0) && + legal_authority_id > 0 && + legal_authority_id < 32) { + cli::cli_abort(c(x = paste0("The legal_authority_id parameter must be ", + "an integer between 1 and 31 (inclusive)."))) + } + + # test for valid contact email format (approximate) + if (!grepl("^[[:alnum:].+_-]+@[[:alnum:].-]+\\.[[:alpha:]]{2,}$", + contact_email)) { + cli::cli_abort(c(x = paste0("The contact_email must be a valid ", + "email address."))) + } + + # use API to get legal authority information: + authorities <- NPSdatastore::get_legal_authority() + authority <- authorities[legal_authority_id,] + + my_cui <- list( + metadata = list( + distribution = list(accessLevel = access, + type = authority$type, + label = authority$label, + marking = authority$marking, + contactEmail = contact_email, + authorityDesignator = authority_designator, + description = authority$description, + onlineUrl = authority$information)), + id = "permissions") + } + else { + my_cui <- list( + metadata = list( + distribution = list(access_level = access)), id = "permissions") + } + + # --- NEW: build and set the native element --- + eml_object$access <- .build_access(access) + + # get existing additionalMetadata elements: + add_meta <- eml_object$additionalMetadata + + #if no additional metadata at all.... + if (is.null(add_meta)) { + eml_object$additionalMetadata <- list(my_cui) + } + if(!is.null(add_meta)){ + + #helps track lists of different lengths/hierarchies + x <- length(add_meta) + + # Is CUI already specified in the old context of CUI + exist_cui <- NULL + seq <- NULL + for (i in seq_along(add_meta)) { + if (suppressWarnings(stringr::str_detect(add_meta[i], + "CUI|accessLevel")) == TRUE) { + seq <- i + #handle legacy CUI: + exist_cui <- add_meta[[i]]$metadata$CUI + #handle current CUI + if (is.null(exist_cui)) { + exist_cui <- add_meta[[i]]$metadata$distribution$accessLevel + } + } + } + + # scripting route: + # existence of strong_good implies the existence of strong_bad! + if (force == TRUE) { + if (is.null(seq)) { + if (x == 1) { + eml_object$additionalMetadata <- list(my_cui, + eml_object$additionalMetadata) + } + # if already multiple elements in additional metadata, requires + # extra nesting + if (x > 1) { + eml_object$additionalMetadata[[x + 1]] <- my_cui + } + } else { + # replace existing CuI element in additional_metadata + eml_object$additionalMetadata[[seq]] <- my_cui + } + } + + # interactive route: + if (force == FALSE) { + # If no existing CUI, add it in: + if (is.null(exist_cui)) { + # if only one element in additional metadata + if (x == 1) { + eml_object$additionalMetadata <- list(my_cui, + eml_object$additionalMetadata) + } + # if already multiple elements in additional metadata, requires + # extra nesting + if (x > 1) { + eml_object$additionalMetadata[[x + 1]] <- my_cui + } + cli::cli_inform(paste0("No previous permissions were detected. ", + "Your permissions have been set to ", + .strong_good(access), ".")) + if (access == "RESTRICTED") { + cli::cli_inform(c(paste0("The permissions have been set to ", + "{.strong {authority$label}} and ", + "the CUI marking has been set to ", + "{.strong {authority$marking}}."))) + } + } + # If existing CUI, stop. + if (!is.null(exist_cui)) { + cli::cli_inform(paste0("Permission were previously specified as ", + .strong_good(exist_cui), + ". Would you like to update it?")) + var1 <- .get_user_input() #1 = yes, 2 = no + if (var1 == 1) { + eml_object$additionalMetadata[[seq]] <- my_cui + cli::cli_inform(paste0("Your permissions have been set to ", + .strong_good(access), ".")) + if (stringr::str_detect(access, "RESTRICTED|INTERNAL")) { + cli::cli_inform(c(paste0("The CUI label has been set to ", + "{.strong {authority$label}} and ", + "the CUI marking has been set to ", + "{.strong {authority$marking}}."))) + } + } + if (var1 == 2) { + cat("Your original permissions info was retained") + } + } + } + } + # Set NPS publisher, if it doesn't already exist + if (NPS == TRUE) { + eml_object <- .set_npspublisher(eml_object) + } + + # add/updated EMLeditor and version to metadata: + eml_object <- .set_version(eml_object) + + return(eml_object) +} + #' adds DRR connection #' #' @description set_drr adds the DOI of an associated DRR @@ -2275,13 +2472,31 @@ set_int_rights <- function(eml_object, restrict <- "This product has been determined to contain Controlled Unclassified Information (CUI) or to be otherwise restricted by the National Park Service, and is intended for specific purposes. It is not published under an open license. Unauthorized access, use, and distribution are prohibited." # get CUI info from additionalMetadata: - cui <- eml_object$additionalMetadata - cui2 <- NULL #record CUI dissemination code - for(i in seq_along(cui)){ - if("CUI" %in% names(cui[[i]][["metadata"]])){ - cui2 <- cui[[i]][["metadata"]][["CUI"]] + .find_existing_cui <- function(add_meta) { + found <- NULL + for (i in seq_along(add_meta)) { + entry_meta <- add_meta[[i]][["metadata"]] + # legacy CUI key + if ("CUI" %in% names(entry_meta)) { + found <- entry_meta[["CUI"]] + } + # current key, non-PUBLIC access (set_permissions()'s naming) + if (!is.null(entry_meta[["distribution"]][["accessLevel"]])) { + found <- entry_meta[["distribution"]][["accessLevel"]] + } + # current key, PUBLIC access (set_permissions() uses different + # casing for this specific case - see note above) + if (!is.null(entry_meta[["distribution"]][["access_level"]])) { + found <- entry_meta[["distribution"]][["access_level"]] + } } + found } + + # get CUI info from additionalMetadata: + cui <- eml_object$additionalMetadata + cui2 <- .find_existing_cui(cui) + # Verbose option with feedback: if(force == FALSE){ # enforce CUI info prior to setting license: @@ -2314,7 +2529,7 @@ set_int_rights <- function(eml_object, if(cui2 != "PUBLIC"){ cat("Your CUI is set to ", crayon::blue$bold(cui2), ".") writeLines(paste0("To use a CC0 or public domain license", - " your CUI must be PUBLIC.")) + " your CUI must be PUBLIC.")) cat("Use", crayon::bold$green("set_cui()"), "to change your CUI.") } } @@ -2339,21 +2554,17 @@ set_int_rights <- function(eml_object, #silent option for scripting: if(force == TRUE){ #if no CUI specified, stop. + if(is.null(cui2)){ - return() + cli::cli_abort(c(x = paste0( + "No CUI/access-level information found on eml_object. ", + "set_permissions() must be called before set_int_rights() ", + "when force = TRUE." + ))) } #if CUI has been specified: if(!is.null(cui2)){ - # retrieve just the cell containing the CUI code: - # get CUI info from additionalMetadata: - cui <- eml_object$additionalMetadata - cui2 <- NULL #record CUI dissemination code - for(i in seq_along(cui)){ - if("CUI" %in% names(cui[[i]][["metadata"]])){ - cui2 <- cui[[i]][["metadata"]][["CUI"]] - } - } if(license == "CC0" || license == "public"){ if(cui2 == "PUBLIC"){ @@ -2365,7 +2576,7 @@ set_int_rights <- function(eml_object, } } if(cui2 != "PUBLIC"){ - return() + return() } } if(license == "restricted"){ diff --git a/R/getEMLfunctions.R b/R/getEMLfunctions.R index 15e3383d..b7638c57 100644 --- a/R/getEMLfunctions.R +++ b/R/getEMLfunctions.R @@ -167,8 +167,6 @@ get_additional_info <- function(eml_object) { #' #' @description get_title returns a text string that is the title of the data package #' -#' @details accesses all of the tags (there can be several, if each file was given a separate title). Assumes that the first instance of <title> referes to the entire data package and returns it as a text string, ignoring the contents of all other <title> tags. -#' #' @inheritParams get_begin_date #' @return a text string #' @export @@ -177,7 +175,7 @@ get_additional_info <- function(eml_object) { #' get_title(eml_object) #' } get_title <- function(eml_object) { - doc <- get_eml_simple(eml_object, "title")[1] + doc <- eml_object[["dataset"]][["title"]] if (is.null(doc)) { doc <- NA } diff --git a/R/utils.R b/R/utils.R index b2907983..b474020f 100644 --- a/R/utils.R +++ b/R/utils.R @@ -49,7 +49,9 @@ globalVariables(c("UnitCode", "definition", "unit", "formatString", - "attributeDefinition" + "attributeDefinition", + "distribution", + "strong_good" )) @@ -327,3 +329,47 @@ globalVariables(c("UnitCode", if (NPS) eml_object <- .set_npspublisher(eml_object) .set_version(eml_object) } + + +#Call .strong_good for bold, blue font in cli messages +.strong_good <- function(x) crayon::bold(crayon::blue(x)) + + +#' Build access component of EML +#' +#' @inheritParams set_permissions +#' +#' @returns acc +#' @noRd +#' +#' @examples +#' \dontrun{ +#' .build_access("PUBLIC") +#' .build_access("INTERNAL", "edward_abbey@nps.gov")} +.build_access <- function(access, contact_email = NULL) { + if (access == "PUBLIC") { + list( + allow = list( + principal = "public", + permission = "read" + ), + order = "allowFirst", + scope = "document", + authSystem = "https://irma.nps.gov/DataStore" + ) + } else { + # RESTRICTED or INTERNAL: deny public read. + # No <allow> block — contact_email/authority info belongs in + # additionalMetadata, not in access, and including an allow here would + # misleadingly imply a specific grant of access via this record. + list( + deny = list( + principal = "public", + permission = "read" + ), + order = "denyFirst", + scope = "document", + authSystem = "https://irma.nps.gov/DataStore" + ) + } +} diff --git a/docs/404.html b/docs/404.html index 12f28eef..c1f1fd7b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -20,7 +20,7 @@ <a class="navbar-brand me-2" href="https://doi-nps.github.io/EMLeditor/index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index 1c565ab1..cb4c0255 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 3788e3e9..867dbab9 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/LICENSE.html b/docs/LICENSE.html index d38ac8f5..4161e8e8 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/articles/a01_prereqs.html b/docs/articles/a01_prereqs.html index eb41bf99..2a9f3fd6 100644 --- a/docs/articles/a01_prereqs.html +++ b/docs/articles/a01_prereqs.html @@ -20,7 +20,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/articles/a02_EML_creation_script.html b/docs/articles/a02_EML_creation_script.html index a63a36ee..4d7af3ce 100644 --- a/docs/articles/a02_EML_creation_script.html +++ b/docs/articles/a02_EML_creation_script.html @@ -20,7 +20,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -458,35 +458,38 @@ <h2 id="add-nps-specific-fields-to-eml">Add NPS specific fields to EML<a class=" elements and fields. For instance, unit connections, DOIs, referencing a DRR, etc. More information about these functions can be found at: <a href="https://doi-nps.github.io/EMLeditor/" class="uri">https://doi-nps.github.io/EMLeditor/</a>.</p> <div class="section level3"> -<h3 id="add-controlled-unclassified-information-cui-codes">Add Controlled Unclassified Information (CUI) codes<a class="anchor" aria-label="anchor" href="#add-controlled-unclassified-information-cui-codes"></a> +<h3 id="add-file-access-permissions-and-justifications">Add file access permissions and justifications<a class="anchor" aria-label="anchor" href="#add-file-access-permissions-and-justifications"></a> </h3> -<p>This is a required step, using the function -<code><a href="../reference/set_cui_code.html">set_cui_code()</a></code>. It is important to indicate not only that +<p>This is a required step. It is important to indicate not only that your data package contains CUI, but also to inform users if your data package does NOT contain CUI because empty fields can be ambiguous (does -it not contain CUI ordid the creators just miss that step?). You can -choose from one of five CUI dissemination codes. Watch out for the -spaces! These are:</p> -<ul> -<li>PUBLIC - Does NOT contain CUI.</li> -<li>FED ONLY - Contains CUI. Only federal employees should have access -(similar to “internal only” in DataStore).</li> -<li>FEDCON - Contains CUI. Only federal employees and federal -contractors should have access (also very much like current “internal -only” setting in DataStore).</li> -<li>DL ONLY - Contains CUI. Should only be available to a named list of -individuals (where and how to list those individuals TBD)</li> -<li>NOCON - Contains CUI. Federal, state, local, or tribal employees may -have access, but contractors cannot. More information about these codes -can be found at: <a href="https://www.archives.gov/cui/registry/limited-dissemination" class="external-link uri">https://www.archives.gov/cui/registry/limited-dissemination</a> -</li> -</ul> +it not contain CUI or did the creators just miss that step?).</p> +<p>You can choose from one of three file restriction levels: “PUBLIC”, +“INTERNAL” or “RESTRICTED” where internal will require NPS network or +VPN to access and “RESTRICTED” will be restricted to a named list of +individuals. It is not expected that many data packages will be +“RESTRICTED” and RESTRICTED data packages may need additional +information in added via the web interface (such as who can download the +files).</p> +<p>You must also select a justification for choosing INTERNAL or +RESTRICTED. These are codes from 1-32 (inclusive). The full list of +codes and their justifications can be accessed using +<code><a href="https://rdrr.io/pkg/NPSdatastore/man/get_legal_authority.html" class="external-link">NPSdatastore::get_legal_authority</a></code></p> +<p>If you choose INTERNAL or RESTRICTED you must also supply a contact +email address for people who want to request access (we suggest a group +email rather than in individual person’s email due to frequent personnel +turnover) and a specific person’s name who is responsible for making the +decision to restrict the file downloads.</p> <div class="sourceCode" id="cb23"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span><span class="va">my_metadata</span> <span class="op"><-</span> <span class="fu">EMLeditor</span><span class="fu">::</span><span class="fu"><a href="../reference/set_cui_code.html">set_cui_code</a></span><span class="op">(</span><span class="va">my_metadata</span>, <span class="st">"PUBLIC"</span><span class="op">)</span></span> -<span><span class="co"># note that in this case I have added the CUI code to the original R object, </span></span> -<span><span class="co"># "my_metadata" but by giving it a new name, i.e. "my_meta2" I could have</span></span> -<span><span class="co"># created a new R object. Sometimes creating a new R object is preferable </span></span> -<span><span class="co"># because if you make a mistake you don't need to start over again.</span></span></code></pre></div> +<code class="sourceCode R"><span><span class="co"># For public references:</span></span> +<span><span class="va">my_metadata</span> <span class="op"><-</span> <span class="fu">EMLeditor</span><span class="fu">::</span><span class="fu"><a href="../reference/set_permissions.html">set_permissions</a></span><span class="op">(</span><span class="va">my_metadata</span>, <span class="st">"PUBLIC"</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># For Internal references. Make sure you have selected the correct legal_authority_id!</span></span> +<span><span class="va">my_metadata</span> <span class="op"><-</span> <span class="fu">EMLeditor</span><span class="fu">::</span><span class="fu"><a href="../reference/set_permissions.html">set_permissions</a></span><span class="op">(</span><span class="va">my_metadata</span>, </span> +<span> access <span class="op">=</span> <span class="st">"INTERNAL"</span>,</span> +<span> legal_authority_id <span class="op">=</span> <span class="fl">1</span>,</span> +<span> contact_email <span class="op">=</span> <span class="st">"network_email@nps.gov"</span>,</span> +<span> authority_designator <span class="op">=</span> <span class="st">"Edward Abbey"</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level3"> <h3 id="intellectual-rights">Intellectual Rights<a class="anchor" aria-label="anchor" href="#intellectual-rights"></a> @@ -496,13 +499,14 @@ <h3 id="intellectual-rights">Intellectual Rights<a class="anchor" aria-label="an just keep. However, NPS has some specific regulations about what can and cannot be in the intellectualRights tag. Use <code><a href="../reference/set_int_rights.html">set_int_rights()</a></code> to replace the text with NPS-approved -text. Note: You must first add the CUI dissemination code using -<code><a href="../reference/set_cui.html">set_cui()</a></code> as the dissemination code and license must agree. -That is, you cannot give a data package with a PUBLIC dissemination code -a “restricted” license (and vise versa: a restricted data package that -contains CUI cannot have a public domain or CC0 license). You can choose -from one of three options, but <strong>for most public NPS data -packages, the CC0 license is appropriate</strong>:</p> +text. Note: You must first set the data package permissions with +<code><a href="../reference/set_permissions.html">set_permissions()</a></code> above, as the access permissions and +license must agree. That is, you cannot give a data package with a +PUBLIC dissemination code a “restricted” license (and vice versa: an +INTERNAL data package that contains CUI cannot have a public domain or +CC0 license). You can choose from one of three options, but <strong>for +most public NPS data packages, the CC0 license is +appropriate</strong>:</p> <ul> <li><p>“CC0”: This is the default license for all public NPS data packages: <strong>“The person who associated a work with this deed has @@ -577,7 +581,7 @@ <h3 id="set-the-language">Set the language<a class="anchor" aria-label="anchor" <p>This is the human language (as opposed to computer language) that the data package and metadata are constructed in. Examples include English, Spanish, Navajo, etc. A full list of available languages is available -from the Libraryof Congress. Please use the “English Name of Language” +from the Library of Congress. Please use the “English Name of Language” as an input. The function will then convert your input to the appropriate 3-character ISO 639-2 code.Available languages: <a href="https://www.loc.gov/standards/iso639-2/php/code_list.php" class="external-link uri">https://www.loc.gov/standards/iso639-2/php/code_list.php</a></p> <div class="sourceCode" id="cb27"><pre class="downlit sourceCode r"> diff --git a/docs/articles/a03_Template_edits.html b/docs/articles/a03_Template_edits.html index d0143a86..0e41f80d 100644 --- a/docs/articles/a03_Template_edits.html +++ b/docs/articles/a03_Template_edits.html @@ -24,7 +24,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/articles/index.html b/docs/articles/index.html index b426b5bc..bccc0797 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/authors.html b/docs/authors.html index 78f4be2e..610c4a8f 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -66,13 +66,13 @@ <h2 id="citation">Citation</h2> <p>Baker R, Patterson J (2026). <em>EMLeditor: View and Edit EML Metadata</em>. -R package version 1.2.0, <a href="https://github.com/doi-nps/EMLeditor" class="external-link">https://github.com/doi-nps/EMLeditor</a>. +R package version 1.3.0, <a href="https://github.com/doi-nps/EMLeditor" class="external-link">https://github.com/doi-nps/EMLeditor</a>. </p> <pre>@Manual{, title = {EMLeditor: View and Edit EML Metadata}, author = {Robert Baker and Judd Patterson}, year = {2026}, - note = {R package version 1.2.0}, + note = {R package version 1.3.0}, url = {https://github.com/doi-nps/EMLeditor}, }</pre> </div> diff --git a/docs/index.html b/docs/index.html index 47e5b466..a36b6a92 100644 --- a/docs/index.html +++ b/docs/index.html @@ -22,7 +22,7 @@ <a class="navbar-brand me-2" href="index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index d28214ec..7f2ba28e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,7 +7,7 @@ articles: a03_Template_edits: a03_Template_edits.html a04_Editing_fixing_eml: a04_Editing_fixing_eml.html a05_advanced_functionality: a05_advanced_functionality.html -last_built: 2026-09-02T17:08Z +last_built: 2026-09-24T00:48Z urls: reference: https://doi-nps.github.io/EMLeditor/reference article: https://doi-nps.github.io/EMLeditor/articles diff --git a/docs/reference/EMLeditor-package.html b/docs/reference/EMLeditor-package.html index 91d2f5eb..bafbef78 100644 --- a/docs/reference/EMLeditor-package.html +++ b/docs/reference/EMLeditor-package.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_abstract.html b/docs/reference/get_abstract.html index e9efac1b..e3bff3b0 100644 --- a/docs/reference/get_abstract.html +++ b/docs/reference/get_abstract.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_additional_info.html b/docs/reference/get_additional_info.html index 4935404f..53ae2795 100644 --- a/docs/reference/get_additional_info.html +++ b/docs/reference/get_additional_info.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_author_list.html b/docs/reference/get_author_list.html index a0e931cd..9cb77c2a 100644 --- a/docs/reference/get_author_list.html +++ b/docs/reference/get_author_list.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_begin_date.html b/docs/reference/get_begin_date.html index 59f4c738..1c5362ac 100644 --- a/docs/reference/get_begin_date.html +++ b/docs/reference/get_begin_date.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_citation.html b/docs/reference/get_citation.html index 71293534..3a139356 100644 --- a/docs/reference/get_citation.html +++ b/docs/reference/get_citation.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_content_units.html b/docs/reference/get_content_units.html index 293b41e2..fa218984 100644 --- a/docs/reference/get_content_units.html +++ b/docs/reference/get_content_units.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_cui.html b/docs/reference/get_cui.html index 3af2fd9e..d426a41a 100644 --- a/docs/reference/get_cui.html +++ b/docs/reference/get_cui.html @@ -9,7 +9,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_cui_code.html b/docs/reference/get_cui_code.html index 68dff6fe..11958d92 100644 --- a/docs/reference/get_cui_code.html +++ b/docs/reference/get_cui_code.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_cui_marking.html b/docs/reference/get_cui_marking.html index b3ce64d8..c28927ae 100644 --- a/docs/reference/get_cui_marking.html +++ b/docs/reference/get_cui_marking.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_doi.html b/docs/reference/get_doi.html index 8279eb89..06b6bddd 100644 --- a/docs/reference/get_doi.html +++ b/docs/reference/get_doi.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_drr_doi.html b/docs/reference/get_drr_doi.html index f35d663b..0840fb03 100644 --- a/docs/reference/get_drr_doi.html +++ b/docs/reference/get_drr_doi.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_drr_title.html b/docs/reference/get_drr_title.html index 473182aa..afdd3a1c 100644 --- a/docs/reference/get_drr_title.html +++ b/docs/reference/get_drr_title.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_ds_id.html b/docs/reference/get_ds_id.html index 3e40cfbb..e6da9cd2 100644 --- a/docs/reference/get_ds_id.html +++ b/docs/reference/get_ds_id.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_end_date.html b/docs/reference/get_end_date.html index 5bbbabbd..cdaede4b 100644 --- a/docs/reference/get_end_date.html +++ b/docs/reference/get_end_date.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_file_info.html b/docs/reference/get_file_info.html index 87a190a9..ffd7b894 100644 --- a/docs/reference/get_file_info.html +++ b/docs/reference/get_file_info.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_lit.html b/docs/reference/get_lit.html index 34c2f56f..514cafca 100644 --- a/docs/reference/get_lit.html +++ b/docs/reference/get_lit.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_methods.html b/docs/reference/get_methods.html index c1fb2f87..d40d3855 100644 --- a/docs/reference/get_methods.html +++ b/docs/reference/get_methods.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_producing_units.html b/docs/reference/get_producing_units.html index 9019dea5..c2155898 100644 --- a/docs/reference/get_producing_units.html +++ b/docs/reference/get_producing_units.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_publisher.html b/docs/reference/get_publisher.html index 41366fcb..e86585c9 100644 --- a/docs/reference/get_publisher.html +++ b/docs/reference/get_publisher.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/get_title.html b/docs/reference/get_title.html index cffe26cd..f232707f 100644 --- a/docs/reference/get_title.html +++ b/docs/reference/get_title.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">EMLeditor</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.2.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">1.3.0</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -62,10 +62,6 @@ <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#argumen <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> <p>a text string</p> </div> - <div class="section level2"> - <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> - <p>accesses all of the </p><title> tags (there can be several, if each file was given a separate title). Assumes that the first instance of <title> referes to the entire data package and returns it as a text string, ignoring the contents of all other <title> tags. -

Examples

diff --git a/docs/reference/index.html b/docs/reference/index.html index 03c20f62..c35200af 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -7,7 +7,7 @@ EMLeditor - 1.2.0 + 1.3.0
-

#' [Deprecated] +

[Deprecated] set_cui adds CUI dissemination codes to EML metadata

diff --git a/docs/reference/set_cui_code.html b/docs/reference/set_cui_code.html index d8fe89cd..ff9dcf0a 100644 --- a/docs/reference/set_cui_code.html +++ b/docs/reference/set_cui_code.html @@ -1,5 +1,7 @@ -Adds CUI dissemination codes to metadata — set_cui_code • EMLeditor +Adds CUI dissemination codes to metadata — set_cui_code • EMLeditor Skip to contents @@ -7,7 +9,7 @@ EMLeditor - 1.2.0 + 1.3.0 - - - - - -
-
-
- -
-

[Experimental] -The Controlled Unclassified Information (CUI) marking is different from the CUI dissemination code. The CUI dissemination code (set set_cui_code()) sets who can have access to the data package. The CUI marking set by set_cui_marking() specifies the reason (if any) that the data are being restricted. -If the CUI dissemination code is set to PUBLIC, the CUI marking must also be PUBLIC. -If the CUI dissemination code is set to anything other than PUBLIC, the CUI marking must be set to SP-NPSR, SP-HISTP or SP-ARCHR.

-
- -
-

Usage

-
set_cui_marking(
-  eml_object,
-  cui_marking = c("PUBLIC", "SP-NPSR", "SP-HISTP", "SP-ARCHR"),
-  force = FALSE,
-  NPS = TRUE
-)
-
- -
-

Arguments

- - -
eml_object
-

is an EML-formatted R object, either generated in R or imported (typically from an EML-formatted .xml file) using EML::read_eml(, from="xml").

- - -
cui_marking
-

String. One of four options, "PUBLIC", "SP-NPSR", "SP-HISTP" or "SP-ARCHR" are available.

- - -
force
-

logical. Defaults to false. If set to FALSE, a more interactive version of the function requesting user input and feedback. Setting force = TRUE facilitates scripting.

- - -
NPS
-

Logical. Defaults to TRUE. Most NPS users should leave this as the default. Only under specific circumstances should it be set to FALSE: if you are not publishing with NPS, if you need to set the publisher location to some place other than the Fort Collins Office (e.g. you are NOT working on a data package) or your product is "for" the NPS but not "by" the NPS and you need to specify a different agency, set NPS = FALSE. When NPS=TRUE, the function will over-write existing publisher info and inject NPS as the publisher along the the Central Office in Fort Collins as the location. Additionally, it sets the "for or by NPS" field to TRUE and specifies the originating agency as NPS.

- -
-
-

Value

-

an EML-formatted R object

-
-
-

Details

-

CUI markings are the legal justification for why data are being restricted from the public. If data contain no CUI, the CUI marking must be set to PUBLIC (and the CUI dissemination code must be set to PUBLIC and the license must be set to CC0 or Public Domain). If the data contain CUI (i.e. the CUI dissemination code is not PUBLIC), you must use the CUI marking to provide a legal justification for why the data are restricted. Only one CUI marking can be applied. At NPS, the following markings are available:

-

PUBLIC: The data contain no CUI, dissemination is not restricted. -SP-NPSR: "National Park System Resources" - This material contains information concerning the nature and specific location of a National Park System resource that is endangered, threatened, rare, or commercially valuable, of mineral or paleontological objects within System units, or of objects of cultural patrimony within System units. -SP-HISTP: "Historic Properties" - This material contains information related to the location, character, or ownership of historic property. -SP-ARCHR: "Archaeological Resources" - This material contains information related to information about the nature and location of any archaeological resource for which the excavation or removal requires a permit or other permission.

-

For more information on CUI markings, please visit the CUI Markings list maintained by the National Archives.

-
- -
-

Examples

-
if (FALSE) { # \dontrun{
-eml_object <- set_cui_marking(eml_object, "PUBLIC")
-} # }
-
-
-
- - -
- - - -
- - - - - - - diff --git a/docs/reference/set_data_urls.html b/docs/reference/set_data_urls.html index 798016fa..80a1d752 100644 --- a/docs/reference/set_data_urls.html +++ b/docs/reference/set_data_urls.html @@ -7,7 +7,7 @@ EMLeditor - 1.2.0 + 1.3.0