|
17 | 17 | #' adhering to BCP 47 standards (e.g., `"en"` for English). Defaults to |
18 | 18 | #' `"en"`. For more details, see \href{https://tools.ietf.org/html/bcp47}{BCP |
19 | 19 | #' 47}. |
| 20 | +#' @param classification_property The instance of, or subclass of, or superclass |
| 21 | +#' of property. Defaults to \code{NA_character} when not used. |
| 22 | +#' @param classification_id The QID of the class. Defaults to |
| 23 | +#' \code{NA_character} when not used. |
| 24 | +#' @param equivalence_property An optional PID of a property already defined in |
| 25 | +#' the same Wikibase instance that records the equivalence of this new |
| 26 | +#' item with a property defined elsewhere, for example, on Wikidata or |
| 27 | +#' CIDOC-CRM. Defaults to \code{NA_character_}; if left missing, no |
| 28 | +#' equivalence relations is will be claimed. |
| 29 | +#' @param equivalence_id The identifier that uniquely identifies this item among |
| 30 | +#' another system's definitions. Defaults to |
| 31 | +#' \code{NA_character_}; if left missing, no equivalence relations is will be |
| 32 | +#' claimed. |
20 | 33 | #' @param action A character string indicating the action being performed. |
21 | 34 | #' Defaults to `"create_item"`. |
22 | 35 | #' @param log_file_name A character string specifying the name of the log file. |
|
42 | 55 | #' ) |
43 | 56 | #' @export |
44 | 57 |
|
45 | | -check_existing_item <- function(search_term, |
46 | | - language = "en", |
47 | | - equivalence_property = NA_character_, |
48 | | - equivalence_id = NA_character_, |
49 | | - classification_property = NA_character_, |
50 | | - classification_id = NA_character_, |
51 | | - action = "create_item", |
52 | | - log_file_name = NA_character_, |
53 | | - data_curator = person("Unknown", "Person"), |
54 | | - wikibase_api_url = "https://www.wikidata.org/w/api.php", |
55 | | - csrf = NULL, |
56 | | - ambiguity_handling = "return_null") { |
| 58 | +check_existing_item <- function( |
| 59 | + search_term, |
| 60 | + language = "en", |
| 61 | + equivalence_property = NA_character_, |
| 62 | + equivalence_id = NA_character_, |
| 63 | + classification_property = NA_character_, |
| 64 | + classification_id = NA_character_, |
| 65 | + action = "create_item", |
| 66 | + log_file_name = NA_character_, |
| 67 | + data_curator = person("Unknown", "Person"), |
| 68 | + wikibase_api_url = "https://www.wikidata.org/w/api.php", |
| 69 | + csrf = NULL, |
| 70 | + ambiguity_handling = "return_null") { |
57 | 71 | # Validate inputs |
58 | 72 | if (!is.character(search_term) || |
59 | 73 | length(search_term) != 1 || |
|
0 commit comments