query_all_versions: Solr query all versions of a PID

View source: R/query_all_versions.R

query_all_versionsR Documentation

Solr query all versions of a PID

Description

This function uses a combination of arcticdatautils::get_all_versions() and a Solr query to return the query fields for all versions of the specified PID. Each row of the resulting data frame corresponds to a version and the columns are the query fields.

Usage

query_all_versions(mn, object_pid, fields = "*")

Arguments

mn

(MNode) The Member Node where the object should be searched for.

object_pid

(character) PID for the object that you want to return information about.

fields

(character) List of fields that you want returned in the data frame. Default returns all non NULL fields.

Value

(data.frame) Data frame with rows for each version of the PID and columns with each query field.

Author(s)

Sharis Ochs, sharisnochs@gmail.com

Examples

## Not run: 
cn <- dataone::CNode("PROD")
mn <- dataone::getMNode(cn, "urn:node:ARCTIC")

df <- query_all_versions(mn, "doi:10.18739/A27D2Q670", c("id", "title", "origin", "submitter"))
View(df)

## End(Not run)

NCEAS/datamgmt documentation built on June 5, 2023, 6:14 a.m.