GeoNetwork often encodes links as a single string separated by |, e.g.:
|Darstellungsdienst (WMS)|https://...|OGC:WMS|||.
This helper splits such a string into named columns and pads missing parts
up to 6 elements.
Arguments
- x
Character string as found inside a <link> XML node.
Value
A one-row tibble with columns:
link_name
link_desc
link_url
link_protocol
link_mime
link_order
Details
The order used here is:
link name
link description
link URL
link protocol (e.g. "OGC:WMS")
MIME type
order
Note: In many Berlin GDI records the first field (link name) is empty,
and the actual meaningful text is in the second field (description).
Examples
parse_gn_link("|Darstellungsdienst (WMS)|https://example.org/wms?|OGC:WMS|||")
#> # A tibble: 1 × 6
#> link_name link_desc link_url link_protocol link_mime link_order
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 "" Darstellungsdienst (WMS) https:/… OGC:WMS "" ""