├── .Rbuildignore ├── .github ├── .gitignore └── workflows │ ├── R-CMD-check.yaml │ └── pkgdown.yaml ├── .gitignore ├── .travis.yml ├── DESCRIPTION ├── NAMESPACE ├── NEWS ├── R ├── AbstractTableDescriber.R ├── AuthenticationManager.R ├── CNode.R ├── CertificateManager.R ├── D1Client.R ├── D1Node.R ├── D1Object.R ├── EMLParser.R ├── MNode.R ├── auth_request.R ├── dataone-defunct.R ├── dataone-deprecated.R └── dataone-package.R ├── README.md ├── _pkgdown.yml ├── cran-comments.md ├── dataone.Rproj ├── docker-compose.yml ├── docker ├── .Rprofile ├── Dockerfile-devel ├── Dockerfile-stable ├── Dockerfile-texlive ├── rcheck.sh └── supervisord.conf ├── docs ├── 404.html ├── articles │ ├── index.html │ ├── v01-dataone-overview.html │ ├── v01-dataone-overview_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v02-dataone-federation.html │ ├── v02-dataone-federation_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v03-searching-dataone.html │ ├── v03-searching-dataone_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v04-download-data.html │ ├── v04-download-data_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v05-upload-data.html │ ├── v05-upload-data_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v06-update-package.html │ ├── v06-update-package_files │ │ └── header-attrs-2.6 │ │ │ └── header-attrs.js │ ├── v07-known-issues.html │ └── v07-known-issues_files │ │ └── header-attrs-2.6 │ │ └── header-attrs.js ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── index.html ├── link.svg ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml └── reference │ ├── AbstractTableDescriber-class.html │ ├── AuthenticationManager-class.html │ ├── AuthenticationManager.html │ ├── CNode-class.html │ ├── CNode.html │ ├── CertificateManager-class.html │ ├── CertificateManager.html │ ├── D1Client-class.html │ ├── D1Client-initialize.html │ ├── D1Client.html │ ├── D1Node-class.html │ ├── D1Node-initialize.html │ ├── D1Node.html │ ├── D1Object-class.html │ ├── D1Object-initialize.html │ ├── D1Object.html │ ├── EMLParser-class.html │ ├── EMLParser.html │ ├── MNode-class.html │ ├── MNode.html │ ├── Rplot001.png │ ├── addData.html │ ├── archive.html │ ├── asDataFrame.html │ ├── auth_delete.html │ ├── auth_get.html │ ├── auth_head.html │ ├── auth_post.html │ ├── auth_put.html │ ├── auth_put_post_delete.html │ ├── canRead.html │ ├── convert.csv.html │ ├── createD1Object.html │ ├── createDataPackage.html │ ├── createObject.html │ ├── d1IdentifierSearch.html │ ├── d1SolrQuery.html │ ├── d1_errors.html │ ├── data.characterEncoding.html │ ├── data.formatFamily.html │ ├── data.tableAttributeNames.html │ ├── data.tableAttributeOrientation.html │ ├── data.tableAttributeStorageTypes.html │ ├── data.tableAttributeTypes.html │ ├── data.tableFieldDelimiter.html │ ├── data.tableMissingValueCodes.html │ ├── data.tableQuoteCharacter.html │ ├── data.tableSkipLinesHeader.html │ ├── dataone-defunct.html │ ├── dataone-deprecated.html │ ├── dataone.html │ ├── describeObject.html │ ├── documented.d1Identifiers.html │ ├── documented.entityNames.html │ ├── documented.sizes.html │ ├── downloadCert.html │ ├── downloadObject.html │ ├── echoCredentials.html │ ├── encodeSolr.html │ ├── encodeUrlPath.html │ ├── encodeUrlQuery.html │ ├── evaluateAuth.html │ ├── generateIdentifier.html │ ├── getAuthExpires.html │ ├── getAuthMethod.html │ ├── getAuthSubject.html │ ├── getCN.html │ ├── getCapabilities.html │ ├── getCert.html │ ├── getCertExpires.html │ ├── getCertInfo.html │ ├── getCertLocation.html │ ├── getChecksum.html │ ├── getD1Object.html │ ├── getData.html │ ├── getDataObject.html │ ├── getDataPackage.html │ ├── getEndpoint.html │ ├── getErrorDescription.html │ ├── getFormat.html │ ├── getFormatId.html │ ├── getIdentifier.html │ ├── getMN.html │ ├── getMNode.html │ ├── getMNodeId.html │ ├── getMetadataMember.html │ ├── getObject.html │ ├── getPackage.html │ ├── getQueryEngineDescription.html │ ├── getSystemMetadata.html │ ├── getToken.html │ ├── getTokenInfo.html │ ├── get_user_agent.html │ ├── hasReservation.html │ ├── index.html │ ├── isAuthExpired.html │ ├── isAuthValid.html │ ├── isAuthorized.html │ ├── isCertExpired.html │ ├── listFormats.html │ ├── listMemberNodes.html │ ├── listNodes.html │ ├── listObjects.html │ ├── listQueryEngines.html │ ├── obscureAuth.html │ ├── obscureCert.html │ ├── parseCapabilities.html │ ├── parseSolrResult.html │ ├── ping.html │ ├── query.html │ ├── reserveIdentifier.html │ ├── resolve.html │ ├── restoreAuth.html │ ├── restoreCert.html │ ├── setMNodeId.html │ ├── setObsoletedBy.html │ ├── setPublicAccess.html │ ├── showAuth.html │ ├── showClientSubject.html │ ├── updateObject.html │ ├── updateSystemMetadata.html │ ├── uploadDataObject.html │ └── uploadDataPackage.html ├── inst ├── CITATION ├── COPYRIGHTS ├── WORDLIST ├── extdata │ ├── OwlNightj.csv │ ├── Strix-occidentalis-obs.csv │ ├── Strix-occidentalis-obs.csv.zip │ ├── WeatherInf.txt │ ├── collectionMethods.csv │ ├── filterObs.R │ ├── filterSpecies.R │ ├── filteredSpecies.csv │ ├── filteredSpecies.csv.zip │ ├── output.csv │ ├── sample-eml.xml │ ├── sample.csv │ ├── sample2-eml.xml │ └── strix-pacific-northwest.xml └── testfiles │ ├── sysmeta.xml │ ├── testDataTableParamsDoc-eml-2.1.0.xml │ └── testdoc-eml-2.1.0.xml ├── man ├── AbstractTableDescriber-class.Rd ├── AuthenticationManager-class.Rd ├── AuthenticationManager.Rd ├── CNode-class.Rd ├── CNode.Rd ├── CertificateManager-class.Rd ├── CertificateManager.Rd ├── D1Client-class.Rd ├── D1Client-initialize.Rd ├── D1Client.Rd ├── D1Node-class.Rd ├── D1Node-initialize.Rd ├── D1Node.Rd ├── D1Object-class.Rd ├── D1Object-initialize.Rd ├── D1Object.Rd ├── EMLParser-class.Rd ├── EMLParser.Rd ├── MNode-class.Rd ├── MNode.Rd ├── addData.Rd ├── archive.Rd ├── asDataFrame.Rd ├── auth_delete.Rd ├── auth_get.Rd ├── auth_head.Rd ├── auth_post.Rd ├── auth_put.Rd ├── auth_put_post_delete.Rd ├── canRead.Rd ├── convert.csv.Rd ├── createD1Object.Rd ├── createDataPackage.Rd ├── createObject.Rd ├── d1IdentifierSearch.Rd ├── d1SolrQuery.Rd ├── d1_errors.Rd ├── data.characterEncoding.Rd ├── data.formatFamily.Rd ├── data.tableAttributeNames.Rd ├── data.tableAttributeOrientation.Rd ├── data.tableAttributeStorageTypes.Rd ├── data.tableAttributeTypes.Rd ├── data.tableFieldDelimiter.Rd ├── data.tableMissingValueCodes.Rd ├── data.tableQuoteCharacter.Rd ├── data.tableSkipLinesHeader.Rd ├── dataone-defunct.Rd ├── dataone-deprecated.Rd ├── dataone.Rd ├── describeObject.Rd ├── documented.d1Identifiers.Rd ├── documented.entityNames.Rd ├── documented.sizes.Rd ├── downloadCert.Rd ├── downloadObject.Rd ├── echoCredentials.Rd ├── encodeSolr.Rd ├── encodeUrlPath.Rd ├── encodeUrlQuery.Rd ├── evaluateAuth.Rd ├── generateIdentifier.Rd ├── getAuthExpires.Rd ├── getAuthMethod.Rd ├── getAuthSubject.Rd ├── getCN.Rd ├── getCapabilities.Rd ├── getCert.Rd ├── getCertExpires.Rd ├── getCertInfo.Rd ├── getCertLocation.Rd ├── getChecksum.Rd ├── getD1Object.Rd ├── getData.Rd ├── getDataObject.Rd ├── getDataPackage.Rd ├── getEndpoint.Rd ├── getErrorDescription.Rd ├── getFormat.Rd ├── getFormatId.Rd ├── getIdentifier.Rd ├── getMN.Rd ├── getMNode.Rd ├── getMNodeId.Rd ├── getMetadataMember.Rd ├── getObject.Rd ├── getPackage.Rd ├── getQueryEngineDescription.Rd ├── getSystemMetadata.Rd ├── getToken.Rd ├── getTokenInfo.Rd ├── get_user_agent.Rd ├── hasReservation.Rd ├── isAuthExpired.Rd ├── isAuthValid.Rd ├── isAuthorized.Rd ├── isCertExpired.Rd ├── listFormats.Rd ├── listMemberNodes.Rd ├── listNodes.Rd ├── listObjects.Rd ├── listQueryEngines.Rd ├── obscureAuth.Rd ├── obscureCert.Rd ├── parseCapabilities.Rd ├── parseSolrResult.Rd ├── ping.Rd ├── query.Rd ├── reserveIdentifier.Rd ├── resolve.Rd ├── restoreAuth.Rd ├── restoreCert.Rd ├── setMNodeId.Rd ├── setObsoletedBy.Rd ├── setPublicAccess.Rd ├── showAuth.Rd ├── showClientSubject.Rd ├── updateObject.Rd ├── updateSystemMetadata.Rd ├── uploadDataObject.Rd └── uploadDataPackage.Rd ├── tests ├── testthat.R └── testthat │ ├── helper-base.R │ ├── test.AuthenticationManager.R │ ├── test.CNode.R │ ├── test.CertificateManager.R │ ├── test.D1Client.R │ ├── test.D1Node.R │ ├── test.MNode.R │ ├── test.SystemMetadata.R │ └── test.auth_request.R └── vignettes ├── package-diagram.png ├── v01-dataone-overview.Rmd ├── v02-dataone-federation.Rmd ├── v03-searching-dataone.Rmd ├── v04-download-data.Rmd ├── v05-upload-data.Rmd ├── v06-update-package.Rmd └── v07-known-issues.Rmd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^Meta$ 2 | ^doc$ 3 | ^.*\.Rproj$ 4 | ^\.Rproj\.user$ 5 | ^\.travis.yml$ 6 | cran-comments.md 7 | docker* 8 | docker/* 9 | docs 10 | ^_pkgdown\.yml$ 11 | ^docs$ 12 | ^pkgdown$ 13 | ^\.github$ 14 | -------------------------------------------------------------------------------- /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /.github/workflows/R-CMD-check.yaml: -------------------------------------------------------------------------------- 1 | # Workflow derived from https://github.com/r-lib/actions/tree/master/examples 2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help 3 | on: 4 | push: 5 | branches: [main, develop] 6 | pull_request: 7 | branches: [main, develop] 8 | 9 | name: R-CMD-check 10 | 11 | jobs: 12 | R-CMD-check: 13 | runs-on: ${{ matrix.config.os }} 14 | 15 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | config: 21 | - {os: macOS-latest, r: 'release'} 22 | - {os: windows-latest, r: 'release'} 23 | - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} 24 | - {os: ubuntu-latest, r: 'release'} 25 | - {os: ubuntu-latest, r: 'oldrel-1'} 26 | 27 | env: 28 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 29 | R_KEEP_PKG_SOURCE: yes 30 | 31 | steps: 32 | - uses: actions/checkout@v2 33 | 34 | - uses: r-lib/actions/setup-pandoc@v1 35 | 36 | - uses: r-lib/actions/setup-r@v1 37 | with: 38 | r-version: ${{ matrix.config.r }} 39 | http-user-agent: ${{ matrix.config.http-user-agent }} 40 | use-public-rspm: true 41 | 42 | - uses: r-lib/actions/setup-r-dependencies@v1 43 | with: 44 | extra-packages: rcmdcheck 45 | 46 | - uses: r-lib/actions/check-r-package@v1 47 | 48 | - name: Show testthat output 49 | if: always() 50 | run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true 51 | shell: bash 52 | 53 | - name: Upload check results 54 | if: failure() 55 | uses: actions/upload-artifact@main 56 | with: 57 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results 58 | path: check 59 | -------------------------------------------------------------------------------- /.github/workflows/pkgdown.yaml: -------------------------------------------------------------------------------- 1 | # Workflow derived from https://github.com/r-lib/actions/tree/master/examples 2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help 3 | on: 4 | push: 5 | branches: [main] 6 | release: 7 | types: [published] 8 | workflow_dispatch: 9 | 10 | name: pkgdown 11 | 12 | jobs: 13 | pkgdown: 14 | runs-on: ubuntu-latest 15 | env: 16 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - uses: r-lib/actions/setup-pandoc@v1 21 | 22 | - uses: r-lib/actions/setup-r@v1 23 | with: 24 | use-public-rspm: true 25 | 26 | - uses: r-lib/actions/setup-r-dependencies@v1 27 | with: 28 | extra-packages: pkgdown 29 | needs: website 30 | 31 | - name: Deploy package 32 | run: | 33 | git config --local user.name "$GITHUB_ACTOR" 34 | git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" 35 | Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Meta 2 | doc 3 | .Rproj.user 4 | .Rhistory 5 | .RData 6 | dataone/dataone.Rproj 7 | dataone_*.tar.gz 8 | vignettes/*.R 9 | vignettes/*.html 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: bionic 2 | language: r 3 | cache: packages 4 | warnings_are_errors: true 5 | sudo: false 6 | 7 | notifications: 8 | email: 9 | on_success: change 10 | on_failure: change 11 | 12 | addons: 13 | apt: 14 | packages: 15 | - librdf0 16 | - librdf0-dev 17 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: dataone 2 | Version: 2.2.2 3 | Date: 2022-06-08 4 | Title: R Interface to the DataONE REST API 5 | Authors@R: c( person("Matthew B.", "Jones", role = c("aut","cre"), email = "jones@nceas.ucsb.edu", comment=c(ORCID = "0000-0003-0077-4738")), 6 | person("Peter", "Slaughter", role = "aut", email = "slaughter@nceas.ucsb.edu", comment=c(ORCID = "0000-0002-2192-403X")), 7 | person("Rob", "Nahf", role = "aut", email = "rnahf@unm.edu"), 8 | person("Carl", "Boettiger", role = "aut", email = "cboettig@gmail.com", comment=c(ORCID = "0000-0002-1642-628X")), 9 | person("Chris", "Jones", role = "aut", email = "cjones@nceas.ucsb.edu", comment=c(ORCID = "0000-0002-8121-2341")), 10 | person("Bryce", "Mecum", role = "aut", email = "mecum@nceas.ucsb.edu", comment=c(ORCID = "0000-0002-0381-3766")), 11 | person("Jeanette", "Clark", role = "aut", email = "jclark@nceas.ucsb.edu", comment=c(ORCID = "0000-0003-4703-1974")), 12 | person("Jordan", "Read", role = "ctb", email = "jread@usgs.gov", comment=c(ORCID = "0000-0002-3888-6631")), 13 | person("Lauren", "Walker", role = "aut", email = "walker@nceas.ucsb.edu", comment=c(ORCID = "0000-0003-2192-431X")), 14 | person("Edmund", "Hart", role = "ctb", email = "edmund.m.hart@gmail.com", comment=c(ORCID = "0000-0001-7367-7969")), 15 | person("Scott", "Chamberlain", role = "ctb", email = "myrmecocystus@gmail.com", comment=c(ORCID = "0000-0003-1444-9135")), 16 | person("Regents of the University of California", role = c("cph"))) 17 | Description: Provides read and write access to data and metadata from 18 | the DataONE network of data repositories. 19 | Each DataONE repository implements a consistent repository application 20 | programming interface. Users call methods in R to access these remote 21 | repository functions, such as methods to query the metadata catalog, get 22 | access to metadata for particular data packages, and read the data objects 23 | from the data repository. Users can also insert and update data objects on 24 | repositories that support these methods. 25 | Depends: 26 | R (>= 3.1.1) 27 | Suggests: 28 | knitr, 29 | rmarkdown, 30 | testthat, 31 | digest, 32 | openssl (>= 0.9.3), 33 | xml2 34 | Imports: 35 | XML (>= 3.95-0.1), 36 | httr, 37 | methods, 38 | stringi, 39 | stringr, 40 | datapack (>= 1.4.0), 41 | plyr, 42 | parsedate, 43 | uuid, 44 | base64enc, 45 | jsonlite 46 | License: Apache License 2.0 47 | URL: https://github.com/DataONEorg/rdataone 48 | BugReports: https://github.com/DataONEorg/rdataone/issues 49 | Collate: 50 | 'AbstractTableDescriber.R' 51 | 'auth_request.R' 52 | 'D1Node.R' 53 | 'AuthenticationManager.R' 54 | 'CNode.R' 55 | 'CertificateManager.R' 56 | 'D1Object.R' 57 | 'MNode.R' 58 | 'D1Client.R' 59 | 'EMLParser.R' 60 | 'dataone-defunct.R' 61 | 'dataone-deprecated.R' 62 | 'dataone-package.R' 63 | Encoding: UTF-8 64 | VignetteBuilder: knitr 65 | RoxygenNote: 7.1.2 66 | -------------------------------------------------------------------------------- /R/dataone-defunct.R: -------------------------------------------------------------------------------- 1 | #' @title Defunct 2 | #' @description The following items are defunct in this release of dataone and are 3 | #' no longer supported. 4 | #' @name dataone-defunct 5 | #' @keywords internal 6 | #' @section These S4 methods are defunct: 7 | #' \itemize{ 8 | #' \item{\code{\link{D1Object}}}{: A representation of a DataObject} 9 | #' \itemize{ 10 | #' \item{\code{\link{D1Object-initialize}}}{: Initialize a D1Object} 11 | #' \item{\code{\link{getData}}}{: Get the data content of a specified D1Object.} 12 | #' \item{\code{\link{getIdentifier}}}{: Get the identifier of the D1Object.} 13 | #' \item{\code{\link{getFormatId}}}{: Get the formatId of the D1Object} 14 | #' \item{\code{\link{setPublicAccess}}}{: Add a Rule to the AccessPolicy to make the object publicly readable.} 15 | #' \item{\code{\link{canRead}}}{: Test whether the provided subject can read an object.} 16 | #' \item{\code{\link{asDataFrame}}}{: Return the D1Object as a data.frame.} 17 | #' \item{\code{\link{setObsoletedBy}}}{: Set a pid as being obsoleted by another pid.} 18 | #' } 19 | #' \item{\code{\link{D1Client}}}{: The DataONE client class used to download, update and search for data in the DataONE network} 20 | #' \itemize{ 21 | #' \item{\code{\link{d1SolrQuery}}}{: A method to query the DataONE solr endpoint of the Coordinating Node.} 22 | #' \item{\code{\link{d1IdentifierSearch}}}{: Query the DataONE Solr endpoint of the Coordinating Node.} 23 | #' \item{\code{\link{createDataPackage}}}{: Create a DataPackage on a DataONE Member Node} 24 | #' \item{\code{\link{getMN}}}{: Get a member node client based on its node identifier.} 25 | #' \item{\code{\link{convert.csv}}}{: Convert a DataFrame to Standard CSV.} 26 | #' \item{\code{\link{addData}}}{: Add a D1Object containing a data object to a DataPackage} 27 | #' \item{\code{\link{createD1Object}}}{: Create the Object in the DataONE System} 28 | #' \item{\code{\link{getD1Object}}}{: Download a data object from the DataONE Federation.} 29 | #' } 30 | #' \item{\code{EMLParser}}{: A representation of a DataObject} 31 | #' \itemize{ 32 | #' \item{\code{\link{documented.entityNames}}}{: The entity names associated with each table are returned.} 33 | #' \item{\code{\link{documented.d1Identifiers}}}{: Get the DataONE identifier associated with each table.} 34 | #' \item{\code{\link{documented.sizes}}}{: Get the table size.} 35 | #' } 36 | #' \item{\code{AbstractTableDescriber}}{: Base Class for Specific Metadata Parsers} 37 | #' \itemize{ 38 | #' \item{\code{\link{data.formatFamily}}}{: Get the table format family.} 39 | #' \item{\code{\link{data.tableFieldDelimiter}}}{: Get the table field delimiter.} 40 | #' \item{\code{\link{data.tableQuoteCharacter}}}{: Get the table quote character.} 41 | #' \item{\code{\link{data.characterEncoding}}}{: The character encoding used, for example "UTF-8"} 42 | #' \item{\code{\link{data.tableAttributeOrientation}}}{: Which way to the attribute headers run? Most data has a header row} 43 | #' \item{\code{\link{data.tableSkipLinesHeader}}}{: The specified number of lines are skipped.} 44 | #' \item{\code{\link{data.tableMissingValueCodes}}}{: the missing value codes are defined in the metadata document for} 45 | #' \item{\code{\link{data.tableAttributeNames}}}{: The attribute names are defined in the metadata document for} 46 | #' \item{\code{\link{data.tableAttributeTypes}}}{: The attributes' data types are defined in the metadata document for} 47 | #' \item{\code{\link{data.tableAttributeStorageTypes}}}{: The attributes' data storage types are defined in the metadata document for} 48 | #' } 49 | #' } 50 | NULL 51 | -------------------------------------------------------------------------------- /R/dataone-deprecated.R: -------------------------------------------------------------------------------- 1 | #' @title Deprecated 2 | #' @description The following items are deprecated in this release of dataone and will be 3 | #' removed in a future release 4 | #' @name dataone-deprecated 5 | #' @keywords internal 6 | #' @section These S4 methods are deprecated: 7 | #' \itemize{ 8 | #' \item{\code{\link{setObsoletedBy}}}{: Set a pid as being obsoleted by another pid.} 9 | #' \item{\code{\link{CertificateManager}}}{: Create a CertificateManager object.} 10 | #' \item{\code{\link{getCertLocation}}}{: Get the file path on disk of the client certificate file.} 11 | #' \item{\code{\link{showClientSubject}}}{: Get DataONE Identity as Stored in the CILogon Certificate.} 12 | #' \item{\code{\link{isCertExpired}}}{: Determine if an X.509 certificate has expired.} 13 | #' \item{\code{\link{getCertExpires}}}{: Show the date and time when an X.509 certificate expires.} 14 | #' \item{\code{\link{downloadCert}}}{: Open the CILogon Certificate download page in the default browser.} 15 | #' \item{\code{\link{obscureCert}}}{: Obscure the CILogon Client Certificate.} 16 | #' \item{\code{\link{restoreCert}}}{: Restore the CILogon client certificate by renaming it to its original location} 17 | #' } 18 | NULL -------------------------------------------------------------------------------- /R/dataone-package.R: -------------------------------------------------------------------------------- 1 | # 2 | # This work was created by the National Center for Ecological Analysis and Synthesis. 3 | # 4 | # Copyright 2015 Regents of the University of California 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | #' Search, download and upload data to the DataONE network. 19 | #' @description The R package \emph{dataone} provides read/write access to data and metadata from the 20 | #' \href{https://www.dataone.org/}{DataONE} network of 21 | #' Member Node data repositories. Member Nodes in DataONE are independent data repositories that have adopted the DataONE 22 | #' services for interoperability, making each of the repositories accessible to client tools such as the DataONE R Client 23 | #' using a standard interface. The DataONE R Client can be used to access data files and to write new data and metadata files 24 | #' to nodes in the DataONE network. 25 | #' @docType package 26 | #' @rdname dataone 27 | #' @aliases dataone 28 | #' @name dataone 29 | #' @author Matthew B. Jones (NCEAS) and Peter Slaughter (NCEAS) 30 | #' @section Classes: 31 | #' \itemize{ 32 | #' \item{\code{\link[=AuthenticationManager-class]{AuthenticationManager}}}{: AuthenticationManager provides methods to validate DataONE authentication.} 33 | #' \item{\code{\link[=CNode-class]{CNode}}}{: A CNode represents a DataONE Coordinating Node and can be used to access its services.} 34 | #' \item{\code{\link[=D1Client-class]{D1Client}}}{: The D1Client class contains methods that perform high level dataone tasks.} 35 | #' \item{\code{\link[=D1Node-class]{D1Node}}}{: A base class for CNode and MNode.} 36 | #' \item{\code{\link[=MNode-class]{MNode}}}{: MNode provides functions interacting with the a DataONE Member Node repository.} 37 | #' } 38 | #' @seealso A description of the \emph{dataone} R package is available with the command: \code{'vignette("dataone-overview")'}. 39 | NULL -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | destination: docs 2 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | ## Test environments 2 | 3 | * macOS 12.2: R 4.1.0 4 | * Ubuntu 18.04 R 4.1.3 5 | * Windows (via win-builder): x86_64-w64-mingw32 (64-bit) R Under development (unstable) (2022-06-08 r82470 ucrt) 6 | * Windows (via win-builder): x86_64-w64-mingw32 (64-bit) R 4.2.0 (2022-04-22 ucrt) 7 | * Windows (via win-builder): x86_64-w64-mingw32 (64-bit) R 4.1.3 (2022-03-10) 8 | * rhub::check_for_cran() 9 | * Windows Server 2008 R2 SP1, R-release, 32/64 bit 10 | * Windows Server 2022, R-devel, 64 bit 11 | * Fedora Linux, R-devel, clang, gfortran 12 | * Fedora Linux, R-devel, GCC 13 | * macOS 10.13.6 High Sierra, R-release, CRAN's setup 14 | * Apple Silicon (M1), macOS 11.6 Big Sur, R-release 15 | 16 | ## Changes since last release 17 | 18 | * Remove hash dependency (#293) 19 | * Add support for new method signature for D1Client (#252) 20 | * Ensure rightsHolder persists when uploading a data package (#292) 21 | * Fix bug where 'publc = TRUE' argument did not set public read on all objects (#285) 22 | * Account for edge case errors in 'archive()' (#236) 23 | 24 | ## R CMD check results 25 | 26 | * There were no NOTEs, ERRORs, or WARNINGs. 27 | 28 | ## Downstream dependencies 29 | 30 | * The downstream dependencies have been checked with revdepcheck::revdep_check(), without any problems being reported. -------------------------------------------------------------------------------- /dataone.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 4 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | PackageRoxygenize: rd,collate,namespace,vignette 19 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # docker run --rm -v $(pwd):/src/dev/codyn --name=codyn -it metamattj/codyn-check' 2 | tex: 3 | container_name: texlive 4 | dockerfile: docker/Dockerfile-texlive 5 | build: . 6 | command: sh 7 | r-check-stable: 8 | container_name: r_check_stable 9 | dockerfile: docker/Dockerfile-stable 10 | build: . 11 | volumes: 12 | - .:/src/rdataone 13 | working_dir: /src 14 | command: bash /root/rcheck.sh 15 | r-check-devel: 16 | container_name: r_check_devel 17 | dockerfile: docker/Dockerfile-devel 18 | build: . 19 | volumes: 20 | - .:/src/rdataone 21 | working_dir: /src 22 | links: 23 | - tex 24 | volumes_from: 25 | - tex 26 | #environment: 27 | # - PATH: ${PATH}:/usr/local/texlive/2014/bin/x86_64-linux/ 28 | command: bash /root/rcheck.sh 29 | -------------------------------------------------------------------------------- /docker/.Rprofile: -------------------------------------------------------------------------------- 1 | # Use RStudio's CRAN mirror by default 2 | options(repos = c(CRAN = "http://cran.rstudio.com")) 3 | -------------------------------------------------------------------------------- /docker/Dockerfile-devel: -------------------------------------------------------------------------------- 1 | ## Start with the rstudio daily image, which is built on a daily R build snapshot 2 | FROM rocker/rstudio-daily:verse 3 | MAINTAINER Matt Jones jones@nceas.ucsb.edu 4 | 5 | # Add the texlive path from our linked container 6 | ENV PATH $PATH:/usr/local/texlive/2014/bin/x86_64-linux/ 7 | 8 | # Copy check script into the container 9 | COPY docker /root 10 | 11 | CMD pwd 12 | -------------------------------------------------------------------------------- /docker/Dockerfile-stable: -------------------------------------------------------------------------------- 1 | ## Start with the ropensci image, and put our check code inline 2 | FROM rocker/ropensci 3 | MAINTAINER Matt Jones jones@nceas.ucsb.edu 4 | 5 | RUN apt-get update && \ 6 | apt-get install -y xvfb xauth xfonts-base 7 | 8 | # Copy check script into the container 9 | COPY docker /root 10 | 11 | CMD pwd 12 | -------------------------------------------------------------------------------- /docker/Dockerfile-texlive: -------------------------------------------------------------------------------- 1 | ## Start with the texlive image 2 | FROM cboettig/texlive 3 | MAINTAINER Matt Jones jones@nceas.ucsb.edu 4 | 5 | # Create a volume containing texlive that other containers can mount 6 | VOLUME /usr/local/texlive 7 | 8 | # Add the texlive path from our linked container 9 | ENV PATH $PATH:/usr/local/texlive/2014/bin/x86_64-linux/ 10 | 11 | # Configure supervisor to keep the container running 12 | COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf 13 | RUN mkdir -p /var/log/supervisor \ 14 | && chgrp staff /var/log/supervisor \ 15 | && chmod g+w /var/log/supervisor \ 16 | && chgrp staff /etc/supervisor/conf.d/supervisord.conf 17 | 18 | CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] 19 | -------------------------------------------------------------------------------- /docker/rcheck.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | # A shell wrapper to prepare and execute an R CMD check 3 | srcdir=$(ls) 4 | xvfb-run R CMD build $srcdir 5 | pkg=$(ls *.gz) 6 | xvfb-run R CMD check --as-cran $pkg 7 | rm $pkg 8 | echo "DONE" 9 | -------------------------------------------------------------------------------- /docker/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | logfile=/var/log/supervisor/supervisord.log 4 | pidfile = /tmp/supervisord.pid 5 | -------------------------------------------------------------------------------- /docs/articles/v01-dataone-overview_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v02-dataone-federation_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v03-searching-dataone_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v04-download-data_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v05-upload-data_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v06-update-package_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/articles/v07-known-issues_files/header-attrs-2.6/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('[data-toggle="tooltip"]').tooltip(); 13 | 14 | var cur_path = paths(location.pathname); 15 | var links = $("#navbar ul li a"); 16 | var max_length = -1; 17 | var pos = -1; 18 | for (var i = 0; i < links.length; i++) { 19 | if (links[i].getAttribute("href") === "#") 20 | continue; 21 | // Ignore external links 22 | if (links[i].host !== location.host) 23 | continue; 24 | 25 | var nav_path = paths(links[i].pathname); 26 | 27 | var length = prefix_length(nav_path, cur_path); 28 | if (length > max_length) { 29 | max_length = length; 30 | pos = i; 31 | } 32 | } 33 | 34 | // Add class to parent
  • , and enclosing
  • if in dropdown 35 | if (pos >= 0) { 36 | var menu_anchor = $(links[pos]); 37 | menu_anchor.parent().addClass("active"); 38 | menu_anchor.closest("li.dropdown").addClass("active"); 39 | } 40 | }); 41 | 42 | function paths(pathname) { 43 | var pieces = pathname.split("/"); 44 | pieces.shift(); // always starts with / 45 | 46 | var end = pieces[pieces.length - 1]; 47 | if (end === "index.html" || end === "") 48 | pieces.pop(); 49 | return(pieces); 50 | } 51 | 52 | // Returns -1 if not found 53 | function prefix_length(needle, haystack) { 54 | if (needle.length > haystack.length) 55 | return(-1); 56 | 57 | // Special case for length-0 haystack, since for loop won't run 58 | if (haystack.length === 0) { 59 | return(needle.length === 0 ? 0 : -1); 60 | } 61 | 62 | for (var i = 0; i < haystack.length; i++) { 63 | if (needle[i] != haystack[i]) 64 | return(i); 65 | } 66 | 67 | return(haystack.length); 68 | } 69 | 70 | /* Clipboard --------------------------*/ 71 | 72 | function changeTooltipMessage(element, msg) { 73 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 74 | element.setAttribute('data-original-title', msg); 75 | $(element).tooltip('show'); 76 | element.setAttribute('data-original-title', tooltipOriginalTitle); 77 | } 78 | 79 | if(ClipboardJS.isSupported()) { 80 | $(document).ready(function() { 81 | var copyButton = ""; 82 | 83 | $(".examples, div.sourceCode").addClass("hasCopyButton"); 84 | 85 | // Insert copy buttons: 86 | $(copyButton).prependTo(".hasCopyButton"); 87 | 88 | // Initialize tooltips: 89 | $('.btn-copy-ex').tooltip({container: 'body'}); 90 | 91 | // Initialize clipboard: 92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 93 | text: function(trigger) { 94 | return trigger.parentNode.textContent; 95 | } 96 | }); 97 | 98 | clipboardBtnCopies.on('success', function(e) { 99 | changeTooltipMessage(e.trigger, 'Copied!'); 100 | e.clearSelection(); 101 | }); 102 | 103 | clipboardBtnCopies.on('error', function() { 104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 105 | }); 106 | }); 107 | } 108 | })(window.jQuery || window.$) 109 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.10.1 2 | pkgdown: 1.6.1 3 | pkgdown_sha: ~ 4 | articles: 5 | v01-dataone-overview: v01-dataone-overview.html 6 | v02-dataone-federation: v02-dataone-federation.html 7 | v03-searching-dataone: v03-searching-dataone.html 8 | v04-download-data: v04-download-data.html 9 | v05-upload-data: v05-upload-data.html 10 | v06-update-package: v06-update-package.html 11 | v07-known-issues: v07-known-issues.html 12 | last_built: 2021-02-24T03:31Z 13 | 14 | -------------------------------------------------------------------------------- /docs/reference/Rplot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataONEorg/rdataone/97ef173bce6e4cb3bf09698324185964299a8df1/docs/reference/Rplot001.png -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | year <- sub("-.*", "", meta$Date) 2 | note <- sprintf("R package version %s", meta$Version) 3 | title <- meta$Title 4 | authors <- c( 5 | person("Matthew B.", "Jones", role = c("aut", "cre"), email = "jones@nceas.ucsb.edu"), 6 | person("Peter", "Slaughter", role = "aut", email = "slaughter@nceas.ucsb.edu"), 7 | person("Rob", "Nahf", role = "aut", email = "rnahf@unm.edu"), 8 | person("Carl", "Boettiger", role = "aut", email = "cboettig@gmail.com"), 9 | person("Chris", "Jones", role = "aut", email = "cjones@nceas.ucsb.edu"), 10 | person("Bryce", "Mecum", role = "aut", email = "mecum@nceas.ucsb.edu"), 11 | person("Jeanette", "Clark", role = "aut", email = "jeanetteclark@nceas.ucsb.edu"), 12 | person("Jordan", "Read", role = "ctb", email = "jread@usgs.gov"), 13 | person("Lauren", "Walker", role = "aut", email = "walker@nceas.ucsb.edu"), 14 | person("Edmund", "Hart", role = "ctb", email = "edmund.m.hart@gmail.com"), 15 | person("Scott", "Chamberlain", role = "ctb", email = "myrmecocystus@gmail.com")) 16 | bibentry(bibtype = "Manual", 17 | title = paste0("{dataone}: ", title), 18 | author = authors, 19 | year = year, 20 | note = note, 21 | url = "https://github.com/DataONEorg/rdataone", 22 | doi = "10.5063/F1M61H5X") 23 | -------------------------------------------------------------------------------- /inst/COPYRIGHTS: -------------------------------------------------------------------------------- 1 | This work was created by participants in the DataONE project, and is 2 | jointly copyrighted by participating institutions in DataONE. For 3 | more information on DataONE, see our web site at http://dataone.org. 4 | 5 | The dataone R package is copyright; 6 | Copyright (C) 2011-2016 Regents of the University of California 7 | 8 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 9 | except in compliance with the License. You may obtain a copy of the License at: 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software distributed under 14 | the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 15 | either express or implied. See the License for the specific language governing permissions 16 | and limitations under the License. 17 | -------------------------------------------------------------------------------- /inst/WORDLIST: -------------------------------------------------------------------------------- 1 | aaa 2 | aaddc 3 | ABI 4 | accessPolicy 5 | AccessPolicy 6 | Acknowledgements 7 | Allard 8 | asDataFrame 9 | AuthenticationManager 10 | Bagit 11 | baseURL 12 | Biocomplexity 13 | Budden 14 | cdf 15 | CertficateManager 16 | CertificateManager 17 | changePermission 18 | CharacterEncoding 19 | cilogon 20 | CILogon 21 | CiTO 22 | cn 23 | CN 24 | CNCore 25 | CNode 26 | CNs 27 | config 28 | createObject 29 | csv 30 | data's 31 | dataFrame 32 | DataFrame 33 | DATANET 34 | DataObject 35 | DataObjects 36 | dataONE 37 | DataONE 38 | datapack 39 | datapackage 40 | DataPackage 41 | datasource 42 | dateUploaded 43 | DDTHH 44 | dev 45 | DEV 46 | DIBBS 47 | dirPath 48 | discoverable 49 | doi 50 | DOI 51 | ecoinformatics 52 | eml 53 | EML 54 | EMLParser 55 | env 56 | FGDC 57 | fileName 58 | filesystem 59 | formatId 60 | formatID 61 | FormatId 62 | formatIdentifier 63 | generateIdentifier 64 | getCapabilities 65 | getCN 66 | getD 67 | getData 68 | getDataObject 69 | getDataPackage 70 | getErrorDescription 71 | getFormatId 72 | getIdentifier 73 | getMNode 74 | getOption 75 | getPackage 76 | getQueryEngineDescription 77 | getSystemMetadata 78 | Github 79 | Globus 80 | Gries 81 | GSI 82 | Habermann 83 | hasReservation 84 | HomeBrew 85 | http 86 | Http 87 | https 88 | httr 89 | implementers 90 | ITK 91 | json 92 | knb 93 | KNB 94 | Langauge 95 | lazyLoad 96 | lazyloading 97 | libcurl 98 | listFormats 99 | listNodes 100 | lucene 101 | MacPorts 102 | Michener 103 | mmm 104 | mn 105 | MNode 106 | MNs 107 | MNStorage 108 | nceas 109 | NCEAS 110 | obsoletedBy 111 | obsoletedByPid 112 | openssl 113 | ORCID 114 | ouput 115 | packageId 116 | params 117 | Parsers 118 | pid 119 | PID 120 | PLR 121 | POSIXct 122 | pre 123 | programmatically 124 | proxied 125 | queryEngineDescription 126 | RCurl 127 | redland 128 | Redland 129 | reserveIdentifier 130 | resourceMap 131 | ResourceMap 132 | resultList 133 | rightsholder 134 | rightsHolder 135 | rJava 136 | rnahf 137 | ropensci 138 | Rprofile 139 | Schildhauer 140 | searchTerm 141 | searchTerms 142 | seriesId 143 | setMNodeId 144 | SHA 145 | sid 146 | SIDs 147 | solr 148 | Solr 149 | solrQuery 150 | SSL 151 | Subclasses 152 | submitters 153 | superceded 154 | sysmeta 155 | SystemMetada 156 | systemmetadata 157 | SystemMetadata 158 | SytemMetadata 159 | tableDescriber 160 | TableDescriber 161 | THe 162 | ubuntu 163 | un 164 | unicode 165 | updateObject 166 | updateSystemMetadata 167 | uploadDataPackage 168 | URI 169 | uuid 170 | UUID 171 | Vieglais 172 | www 173 | XMLInternalDocument 174 | XPath 175 | Yeboah 176 | YYYY 177 | -------------------------------------------------------------------------------- /inst/extdata/Strix-occidentalis-obs.csv: -------------------------------------------------------------------------------- 1 | "countrynum","statenum","Route","RPID","Year","Aou","SpeciesTotal" 2 | 840,14,110,101,1971,3690,2 3 | 840,14,110,101,1974,3690,1 4 | 840,14,199,101,1974,3690,1 5 | 840,14,17,101,1975,3690,2 6 | 840,14,110,101,1976,3690,1 7 | 840,14,117,101,1978,3690,1 8 | 840,69,10,101,1978,3690,1 9 | 840,14,117,101,1980,3690,1 10 | 840,14,57,101,1981,3690,1 11 | 840,14,113,101,1981,3690,2 12 | 840,14,54,101,1982,3690,1 13 | 840,14,110,101,1983,3690,1 14 | 840,14,110,101,1985,3690,1 15 | 840,14,202,101,1986,3690,2 16 | 840,14,77,101,1987,3690,1 17 | 840,14,185,101,1987,3690,1 18 | 840,14,95,101,1989,3690,1 19 | 840,14,202,101,1991,3690,1 20 | 840,14,71,101,1992,3690,1 21 | 840,14,104,101,1992,3690,1 22 | 840,6,32,101,1993,3690,1 23 | 840,69,210,101,1993,3690,1 24 | 840,89,61,101,1994,3690,1 25 | 840,89,43,101,1995,3690,1 26 | 840,14,202,101,1996,3690,1 27 | 840,14,5,101,1997,3690,1 28 | 840,14,110,101,1997,3690,1 29 | 840,14,902,101,1997,3690,2 30 | 840,14,419,101,1999,3690,1 31 | 840,69,226,101,1999,3690,1 32 | 840,6,79,101,2000,3690,1 33 | 840,6,79,101,2001,3690,1 34 | 840,14,117,101,2001,3690,1 35 | 840,89,43,101,2001,3690,1 36 | 840,14,117,101,2002,3690,1 37 | 840,69,227,101,2002,3690,1 38 | 840,89,61,101,2002,3690,2 39 | 840,89,43,101,2003,3690,1 40 | 840,6,79,101,2004,3690,1 41 | 840,6,79,101,2006,3690,3 42 | 840,6,79,101,2007,3690,1 43 | 840,6,79,101,2008,3690,1 44 | 840,14,117,101,2009,3690,1 45 | 840,14,221,101,2014,3690,1 46 | -------------------------------------------------------------------------------- /inst/extdata/Strix-occidentalis-obs.csv.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataONEorg/rdataone/97ef173bce6e4cb3bf09698324185964299a8df1/inst/extdata/Strix-occidentalis-obs.csv.zip -------------------------------------------------------------------------------- /inst/extdata/WeatherInf.txt: -------------------------------------------------------------------------------- 1 | 2 | The Weather file (Weather.zip) contains the following columns: 3 | 4 | CountryNum The three digit code that identifies country where route is located. 5 | 6 | StateNumber The two digit numerical code that identifies the state, province, or territory where the route is located. 7 | 8 | Route The three digit code that identifies the route. 9 | 10 | RPID The run protocol identification number. Identifies protocol used to sample route. 11 | 12 | Year The year. The CountryNum, StateNum, Route, RPID, and Year columns uniquely identify a 13 | run of a route. 14 | 15 | Month The month the route was run (1-12). 16 | 17 | Day The day the route was run (1-31). 18 | 19 | ObsN Unique observer identification number. 20 | 21 | TotalSpp The total number of species recorded on that run of the route. 22 | 23 | StartTemp The temperature recorded at the beginning of the run of the route. 24 | 25 | EndTemp The temperature recorded at the end of the run of the route. 26 | 27 | TempScale The scale in which the temperatures were recorded. F stands for Fahrenheit; 28 | C stands for Celcius. 29 | 30 | StartWind The Beaufort wind speed code recorded at the beginning of the run of the route. 31 | 32 | EndWind The Beaufort wind speed code recorded at the end of the run of the route. 33 | 34 | StartSky The Weather Bureau sky code recorded at the beginning of the run of the route. 35 | 36 | EndSky The Weather Bureau sky code recorded at the end of the run of the route. 37 | 38 | StartTime The time the run of the route began, recorded in 24 hour local time. 39 | 40 | EndTime The time the run of the route ended, recorded in 24 hour local time. 41 | 42 | Assistant If someone assisted the observer by recording the data, then this column 43 | is 1, otherwise it is 0. 44 | 45 | RunType If this run is acceptable by BBS standards, then this column is 1, otherwise 46 | it is 0. 47 | 48 | 49 | There is one record in the Weather file for every run of a route per year. 50 | -------------------------------------------------------------------------------- /inst/extdata/collectionMethods.csv: -------------------------------------------------------------------------------- 1 | "TRAW","Trawl" 2 | "SEIN","Seine (general)" 3 | "BSEI","Beach Seine" 4 | "CSEI","Cliff Seine" 5 | "PSEI","Purse Seine" 6 | "HAND","Hand" 7 | "DNET","Dip Net" 8 | "SPOO","Spoon" 9 | "SSAM","Special hydrocarbon" 10 | "SHOV","Shovel" 11 | "WEIR","Weir" 12 | "DIVE","Diver" 13 | "VGRB","VV Grab" 14 | "GRAB","Grab" 15 | "SHOT","Shotgun" 16 | "POT","Pot" 17 | "LONG","Longline" 18 | "H&L","Hook & Line" 19 | "NISS","Modified Nissan bot." 20 | "SSED","Spec. sediment grab" 21 | "FORC","Forceps" 22 | "CORE","Core Sample" 23 | "SPEA","Spear" 24 | "GNET","Gill Net" 25 | "SUBM","Submersible" 26 | "COCU","Cookie Cutt.-Spatula" 27 | "TRIN","Tri-Net" 28 | "REGU","Regurgitated" 29 | "CAMU","Caged Mussel" 30 | "FDEA","Found dead" 31 | "DCAP","Died in captivity" 32 | "HAPS","Haps Core" 33 | "CONT","Contr. Muss from abl" 34 | "RAKE","Rake" 35 | "JIGG","Jigging" 36 | "STRA","Sediment Trap" 37 | "FILT","Filter" 38 | "TNDR","Tongue depressor" 39 | "LIVE","Live trap" 40 | 41 | -------------------------------------------------------------------------------- /inst/extdata/filterObs.R: -------------------------------------------------------------------------------- 1 | library(digest) 2 | library(uuid) 3 | 4 | # Read in species observation data 5 | speciesData <- read.csv(system.file("extdata/OwlNightj.csv", package="dataone")) 6 | # Very simple filter to extract entries for 'Strix occidentalis' 7 | varList <- c("countrynum","statenum","Route","RPID","Year","Aou","SpeciesTotal") 8 | strixOccidentalis <- speciesData[speciesData$Aou=="3690", varList] 9 | strixOccidentalis <- strixOccidentalis[order(strixOccidentalis$Year),] 10 | outfile <- sprintf("%s/Strix-occidentalis-obs.csv", tempdir()) 11 | write.csv(strixOccidentalis, file=outfile, row.names=FALSE) 12 | -------------------------------------------------------------------------------- /inst/extdata/filterSpecies.R: -------------------------------------------------------------------------------- 1 | library(digest) 2 | library(uuid) 3 | 4 | # Read in species observation data 5 | speciesData <- read.csv(system.file("extdata/sample.csv", package="dataone")) 6 | 7 | # Very simple filter to extract only the species of interest 8 | speciesData <- speciesData[speciesData$species=="MUSS",] 9 | outfile <- tempfile(pattern="filteredSpecies", fileext=".csv") 10 | write.csv(speciesData, file=outfile, row.names=FALSE) 11 | -------------------------------------------------------------------------------- /inst/extdata/filteredSpecies.csv.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataONEorg/rdataone/97ef173bce6e4cb3bf09698324185964299a8df1/inst/extdata/filteredSpecies.csv.zip -------------------------------------------------------------------------------- /inst/extdata/sample-eml.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Strix occidentalis Distribution in the Pacific Northwest. 4 | 5 | 6 | Connell 7 | Joseph 8 | 9 | jconnell@example.com 10 | 11 | 2015-12-14 12 | Strix occidentalis sightings in the Pacific Northwest. 13 | CC0, http://creativecommons.org/publicdomain/zero/1.0 14 | 15 | 16 | Northwest Oregon 17 | 18 | -124.07 19 | -123.22 20 | 45.53 21 | 44.47 22 | 23 | 24 | 25 | 26 | 27 | 2015 28 | 29 | 30 | 2015 31 | 32 | 33 | 34 | 35 | 36 | 37 | Connell 38 | Joseph 39 | 40 | jconnell@example.com 41 | 42 | 43 | 44 | This is the method description. 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /inst/testfiles/sysmeta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | doi:10.xxyy/AA/tesdoc123456789 5 | eml://ecoinformatics.org/eml-2.1.0 6 | 36281 7 | 24426711d5385a9ffa583a13d07af2502884932f 8 | CN=Matt Jones A729,O=Google,C=US,DC=cilogon,DC=org 9 | CN=Matt Jones A729,O=Google,C=US,DC=cilogon,DC=org 10 | 11 | 12 | public 13 | read 14 | 15 | 16 | CN=Matt Jones A729,O=Google,C=US,DC=cilogon,DC=org 17 | CN=Subject2,O=Google,C=US,DC=cilogon,DC=org 18 | write 19 | changePermission 20 | 21 | 22 | 23 | urn:node:KNB 24 | urn:node:mnUNM1 25 | urn:node:BADNODE 26 | 27 | true 28 | 2011-08-31T15:59:50.071163 29 | 2011-08-31T15:59:50.072921 30 | urn:node:KNB 31 | urn:node:KNB 32 | 33 | -------------------------------------------------------------------------------- /man/AbstractTableDescriber-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R 3 | \docType{class} 4 | \name{AbstractTableDescriber-class} 5 | \alias{AbstractTableDescriber-class} 6 | \title{Base Class for Specific Metadata Parsers} 7 | \description{ 8 | Classes that inherit from this class provide the format-specific ways to 9 | provide read.csv with parsing instructions. 10 | } 11 | \details{ 12 | This class defines the generic methods metadata parser classes need to implement 13 | to allow proper parsing of tabular data objects. Subclasses should: 14 | 1. provide method implementations for all generics 15 | 2. register the class to the tableDescriber.registry for the formats they claim to parse. 16 | 3. provide a 'constructor' method that accepts a D1Object as the first argument - the 17 | D1Object will be the metadata object to be parsed 18 | 19 | For example, the EMLParser registers itself as a handler for eml v2.0.0 - v2.1.1 20 | with the following. 21 | 22 | \code{ 23 | if (!exists("tableDescriber.registry")) tableDescriber.registry <- list() 24 | tableDescriber.registry[[ "eml://ecoinformatics.org/eml-2.0.0" ]] <- "EMLParser" 25 | tableDescriber.registry[[ "eml://ecoinformatics.org/eml-2.0.1" ]] <- "EMLParser" 26 | tableDescriber.registry[[ "eml://ecoinformatics.org/eml-2.1.0" ]] <- "EMLParser" 27 | tableDescriber.registry[[ "eml://ecoinformatics.org/eml-2.1.1" ]] <- "EMLParser" 28 | } 29 | 30 | Note that the key in the list is the DataONE formatIdentifier that can be 31 | found at "https://cn.dataone.org/cn/v2/formats". 32 | 33 | Subclass implementers should conform their methods to the behavior defined 34 | in the generic. 35 | } 36 | \author{ 37 | rnahf 38 | } 39 | -------------------------------------------------------------------------------- /man/AuthenticationManager-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \docType{class} 4 | \name{AuthenticationManager-class} 5 | \alias{AuthenticationManager-class} 6 | \title{Manage DataONE authentication.} 7 | \description{ 8 | AuthenticationManager provides mechanisms to validate DataONE authentication, 9 | when either a DataONE authentication token or X.509 Certificate is used. 10 | } 11 | \details{ 12 | Understanding how your identity is managed is important for working with DataONE, especially to 13 | avoid unexpected results. For example, depending your authorization status, searches may 14 | return only public records, or the full set of public and private records. Object and package 15 | retrievals might fail if some or all of the objects being retrieved are private. Creating or 16 | updating objects on DataONE nodes and reserving identifiers might fail if your 17 | authorization credentials are missing or expired. 18 | 19 | DataONE version 1.0 identifies you using CILogon-provided x509 certificates. DataONE has 20 | partnered with CILogon to provide a widely-accessible certificate issuing mechanism 21 | that allows DataONE users to use existing trusted institutional and public accounts. 22 | 23 | DataONE version 2.0 provides an addition authentication mechanism known as 24 | authentication tokens. For information about tokens and instructions for generating 25 | a token for use with the dataone R package, view the overview document by 26 | entering the command: \code{'vignette("dataone-overview")'}. DataONE authentication 27 | tokens can be obtained by signing in to your DataONE account at https://search.dataone.org. 28 | 29 | CILogon recognizes many identity providers, including many universities as well as 30 | Google, so most times users new to DataONE can get certificates using one 31 | of their existing accounts. For more information about the CILogon service, see 32 | \url{https://cilogon.org/?skin=DataONE} . 33 | } 34 | \section{Slots}{ 35 | 36 | \describe{ 37 | \item{\code{obscured}}{Value of type \code{"character"} Is authentication disabled (obscured)?} 38 | }} 39 | 40 | \section{Methods}{ 41 | 42 | \itemize{ 43 | \item{\code{\link{AuthenticationManager}}}{: Create an AuthenticationManager object.} 44 | \item{\code{\link{isAuthValid}}}{: Verify authentication for a member node.} 45 | \item{\code{\link{getToken}}}{: Get the value of the DataONE Authentication Token, if one exists.} 46 | \item{\code{\link{getCert}}}{: Get the DataONE X.509 Certificate location.} 47 | \item{\code{\link{getAuthMethod}}}{: Get the current valid authentication mechanism.} 48 | \item{\code{\link{getAuthSubject}}}{: Get the authentication subject.} 49 | \item{\code{\link{getAuthExpires}}}{: Get the expiration date of the current authentication method.} 50 | \item{\code{\link{isAuthExpired}}}{: Check if the currently valid authentication method has reached the expiration time.} 51 | \item{\code{\link{obscureAuth}}}{: Temporarily disable DataONE authentication.} 52 | \item{\code{\link{restoreAuth}}}{: Restore authentication (after being disabled with \code{obscureAuth}).} 53 | \item{\code{\link{showAuth}}}{: Display all authentication information.} 54 | \item{\code{\link{getTokenInfo}}}{: Display all authentication token information.} 55 | \item{\code{\link{getCertInfo}}}{: Display all X.509 certificate information.} 56 | 57 | } 58 | } 59 | 60 | \seealso{ 61 | \code{\link{dataone}}{ package description.} 62 | } 63 | -------------------------------------------------------------------------------- /man/AuthenticationManager.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{AuthenticationManager} 4 | \alias{AuthenticationManager} 5 | \alias{AuthenticationManager,ANY-method} 6 | \title{Create an AuthenticationManager object} 7 | \usage{ 8 | AuthenticationManager(...) 9 | 10 | \S4method{AuthenticationManager}{ANY}() 11 | } 12 | \arguments{ 13 | \item{...}{(Not yet used)} 14 | } 15 | \value{ 16 | the AuthenticationManager object 17 | } 18 | \description{ 19 | Construct an instance of AuthenticationManager to provide mechanisms to load, verify, and 20 | display DataONE authentication information. 21 | } 22 | -------------------------------------------------------------------------------- /man/CNode-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \docType{class} 4 | \name{CNode-class} 5 | \alias{CNode-class} 6 | \title{Provides R API to DataONE Coordinating Node services.} 7 | \description{ 8 | The CNode class provides methods that interact with a DataONE Coordinating Node. 9 | } 10 | \section{Slots}{ 11 | 12 | \describe{ 13 | \item{\code{endpoint}}{A character vector containing URL service endpoint for the Coordinating Node} 14 | 15 | \item{\code{services}}{A data.frame containing the supported service tiers for a CN} 16 | 17 | \item{\code{serviceUrls}}{A data.frame contains URL endpoints for certain services} 18 | }} 19 | 20 | \section{Methods}{ 21 | 22 | \itemize{ 23 | \item{\code{\link{CNode}}}{: Construct a CNode object.} 24 | \item{\code{\link{listFormats}}}{: List all object formats registered in DataONE.} 25 | \item{\code{\link{getFormat}}}{: Get information for a single DataONE object format } 26 | \item{\code{\link{getChecksum}}}{: Get the checksum for the data object associated with the specified pid.} 27 | \item{\code{\link{listNodes}}}{: Get the list of nodes associated with a CN.} 28 | \item{\code{\link{reserveIdentifier}}}{: Reserve a identifier that is unique in the DataONE network.} 29 | \item{\code{\link{hasReservation}}}{: Checks to determine if the supplied subject is the owner of the reservation of id.} 30 | \item{\code{\link{setObsoletedBy}}}{: Set a pid as being obsoleted by another pid} 31 | \item{\code{\link{getObject}}}{: Get the bytes associated with an object on this Coordinating Node.} 32 | \item{\code{\link{getSystemMetadata}}}{: Get the bytes associated with an object on this Coordinating Node.} 33 | \item{\code{\link{describeObject}}}{: Get a list of coordinating nodes holding a given pid.} 34 | \item{\code{\link{resolve}}}{: Get a list of coordinating nodes holding a given pid.} 35 | \item{\code{\link{getMNode}}}{: Get a reference to a node based on its identifier.} 36 | \item{\code{\link{echoCredentials}}}{: Echo the credentials used to make the call.} 37 | \item{\code{\link{isAuthorized}}}{: Check if an action is authorized for the specified identifier.} 38 | } 39 | } 40 | 41 | \seealso{ 42 | \code{\link{dataone}}{ package description.} 43 | } 44 | -------------------------------------------------------------------------------- /man/CNode.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{CNode} 4 | \alias{CNode} 5 | \alias{CNode,ANY-method} 6 | \alias{CNode,character-method} 7 | \title{Create a CNode object.} 8 | \usage{ 9 | CNode(x, ...) 10 | 11 | \S4method{CNode}{ANY}() 12 | 13 | \S4method{CNode}{character}(x) 14 | } 15 | \arguments{ 16 | \item{x}{The label for the DataONE environment to be using ('PROD','STAGING', 'STAGING2,'SANDBOX', 'SANDBOX2','DEV', 'DEV2')} 17 | 18 | \item{...}{(not yet used)} 19 | } 20 | \value{ 21 | the CNode object representing the DataONE environment 22 | } 23 | \description{ 24 | Create a CNode object. 25 | } 26 | \details{ 27 | For an explanation of DataONE Coordinating Nodes, see the 28 | section \emph{"DataONE Environments"} in the overview vignette by entering the R command: \code{vignette("dataone-overview")}. 29 | } 30 | \examples{ 31 | \dontrun{ 32 | cn <- CNode("PROD") 33 | } 34 | } 35 | \seealso{ 36 | \code{\link[=CNode-class]{CNode}}{ class description.} 37 | } 38 | -------------------------------------------------------------------------------- /man/CertificateManager-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \docType{class} 4 | \name{CertificateManager-class} 5 | \alias{CertificateManager-class} 6 | \title{CertficateManager provides mechanisms to obtain, load, verify, and display X509 certificates.} 7 | \description{ 8 | CertficateManager provides management functions for X.509 certificates that are 9 | used to authenticate connections to DataONE nodes over SSL. The X.509 certificates are issued 10 | by a recognized Certificate Authority, typically CILogon, and include fields that provide 11 | information about the authenticated party, including the distinguished name of the subject, the 12 | dates of validity of the certificate, and other information needed for authorization decisions. 13 | Certificate validity is determined by examining the validity of the certificate signatures for 14 | each certificate in a chain leading to a trusted root certificate. Within DataONE, the current 15 | trusted root certificate authorities are CILogon and DataONE itself. 16 | } 17 | \details{ 18 | Understanding how your identity is managed is important for working with DataONE, especially to 19 | avoid unexpected results. For example, depending your authorization status, searches may or may 20 | return only public records, or the full set of public and private records. Object and package 21 | retrievals might fail if some or all of the objects being retrieved are private. Creating or 22 | updating objects on DataONE nodes and reserving identifiers reservations might fail if your 23 | authorization certificate is missing or expired. 24 | 25 | DataONE identifies you using CILogon-provided x509 certificates. DataONE has 26 | partnered with CILogon to provide a widely-accessible certificate issuing mechanism 27 | that allows DataONE users to use existing trusted institutional and public accounts. 28 | 29 | CILogon recognizes many identity providers, including many universities as well as 30 | Google, so most times users new to DataONE can get certificates using one 31 | of their existing accounts. For more information about the CILogon service, see 32 | "https://cilogon.org/?skin=DataONE" . 33 | 34 | X509 Certificates differ from typical username-password login schemes in that 35 | certificates can be used by more than one application, which is very useful when 36 | using more than one DataONE-enabled application. The certificates CILogon issues 37 | for DataONE are so-called "short-lived" certificates that currently expire 18 hours 38 | from the time of issuing. Typically you will want to download a fresh certificate 39 | the first time you interact with DataONE each day. 40 | } 41 | \section{Slots}{ 42 | 43 | \describe{ 44 | \item{\code{location}}{value of type \code{"character"}, containing a path to a custom certificate location} 45 | 46 | \item{\code{obscuredpath}}{value of type \code{"character"}, containing the path used to temporarily obscure a certificate} 47 | }} 48 | 49 | \section{Methods}{ 50 | 51 | \itemize{ 52 | \item{\code{\link{CertificateManager}}}{: Create a CertificateManager object.} 53 | \item{\code{\link{getCertLocation}}}{: Get the file path on disk of the client certificate file.} 54 | \item{\code{\link{showClientSubject}}}{: Get DataONE Identity as Stored in the CILogon Certificate.} 55 | \item{\code{\link{isCertExpired}}}{: Determine if an X.509 certificate has expired.} 56 | \item{\code{\link{getCertExpires}}}{: Show the date and time when an X.509 certificate expires.} 57 | \item{\code{\link{downloadCert}}}{: Open the CILogon Certificate download page in the default browser.} 58 | \item{\code{\link{obscureCert}}}{: Obscure the CILogon Client Certificate.} 59 | \item{\code{\link{restoreCert}}}{: Restore the CILogon client certificate by renaming it to its original location} 60 | } 61 | } 62 | 63 | \examples{ 64 | \dontrun{ 65 | cm <- suppressWarnings(CertificateManager()) 66 | cert <- getCertLocation(cm) 67 | subject <- showClientSubject(cm) 68 | expires <- getCertExpires(cm) 69 | isExpired <- isCertExpired(cm) 70 | cm <- obscureCert(cm) 71 | cm <- restoreCert(cm) 72 | } 73 | } 74 | \seealso{ 75 | \code{\link{dataone}}{ package description.} 76 | } 77 | \author{ 78 | Matthew Jones, Rob Nahf 79 | } 80 | \keyword{classes} 81 | -------------------------------------------------------------------------------- /man/CertificateManager.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{CertificateManager} 4 | \alias{CertificateManager} 5 | \alias{CertificateManager,ANY-method} 6 | \title{Create a CertificateManager object} 7 | \usage{ 8 | CertificateManager(...) 9 | 10 | \S4method{CertificateManager}{ANY}() 11 | } 12 | \arguments{ 13 | \item{...}{(Not yet used)} 14 | } 15 | \value{ 16 | the CertificateManager object 17 | } 18 | \description{ 19 | Construct an instance of CertficateManager to provide mechanisms to obtain, load, verify, and 20 | display X509 certificates. If the \code{'location'} field is provided, then that location is interpreted 21 | as the fully qualified path to a certificate on the local filesystem, and the default locations will not be 22 | searched. If \code{'location'} is missing, then the default Globus Grid Security Infrastructure (GSI) 23 | location is searched, which is \code{'/tmp/x509up_u${UID}'} on Unix 24 | or \code{'${tmpdir}/x509up_u${UID}'} on Windows or \code{'${tmpdir}/x509up_u${user.name}'} if \code{'${UID}'} 25 | is not defined. 26 | } 27 | -------------------------------------------------------------------------------- /man/D1Client-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \docType{class} 4 | \name{D1Client-class} 5 | \alias{D1Client-class} 6 | \title{The D1Client class contains methods that perform high level DataONE tasks} 7 | \description{ 8 | The methods in the D1Client class call the low level DataONE API to 9 | perform involved tasks such as uploading all the packages in a DataPackage (i.e 10 | \code{\link{uploadDataPackage}}) 11 | } 12 | \section{Slots}{ 13 | 14 | \describe{ 15 | \item{\code{cn}}{The Coordinating Node associated with the D1Client object} 16 | 17 | \item{\code{mn}}{The Member Node associated with this D1Client object} 18 | }} 19 | 20 | \section{Methods}{ 21 | 22 | \itemize{ 23 | \item{\code{\link{D1Client}}}{: Construct a D1Client object.} 24 | \item{\code{\link{convert.csv}}}{: Convert a DataFrame to Standard CSV.} 25 | \item{\code{\link{createDataPackage}}}{: Create a DataPackage on a DataONE Member Node.} 26 | \item{\code{\link{encodeUrlPath}}}{: Encode the Input for a URL Path Segment.} 27 | \item{\code{\link{encodeUrlQuery}}}{: Encode the Input for a URL Query Segment.} 28 | \item{\code{\link{getDataObject}}}{: Download a single data object from a DataONE Federation member node.} 29 | \item{\code{\link{getDataPackage}}}{: Download a collection of data object from the DataONE Federation member node as a DataPackage.} 30 | \item{\code{\link{getEndpoint}}}{: Return the URL endpoint for the DataONE Coordinating Node.} 31 | \item{\code{\link{getMetadataMember}}}{: Get the DataObject containing package metadata.} 32 | \item{\code{\link{getMNodeId}}}{: Get the member node identifier associated with this D1Client object.} 33 | \item{\code{\link{listMemberNodes}}}{: List DataONE Member Nodes.} 34 | \item{\code{\link{reserveIdentifier}}}{: Reserve a unique identifier in the DataONE Network.} 35 | \item{\code{\link{uploadDataObject}}}{: Upload a DataObject to a DataONE member node.} 36 | \item{\code{\link{uploadDataPackage}}}{: Upload a DataPackage to a DataONE member node.} 37 | } 38 | } 39 | 40 | \seealso{ 41 | \code{\link{dataone}}{ package description.} 42 | } 43 | -------------------------------------------------------------------------------- /man/D1Client-initialize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{initialize,D1Client-method} 4 | \alias{initialize,D1Client-method} 5 | \alias{D1Client-initialize} 6 | \title{Initialize a D1Client object} 7 | \usage{ 8 | \S4method{initialize}{D1Client}( 9 | .Object, 10 | cn = NA, 11 | mn = NA, 12 | env = as.character(NA), 13 | mNodeid = as.character(NA) 14 | ) 15 | } 16 | \arguments{ 17 | \item{.Object}{A D1client object.} 18 | 19 | \item{cn}{The Member Node object to associate this D1Client with.} 20 | 21 | \item{mn}{The Member Node object to associate this D1Client with.} 22 | 23 | \item{env}{The DataONE environment to initialize this D1Client with, e.g. "PROD", "STAGING", "SANDBOX", "DEV"} 24 | 25 | \item{mNodeid}{The node identifier of the Member Node to associate with this D1Client.} 26 | } 27 | \description{ 28 | Initialize a D1Client object 29 | } 30 | \examples{ 31 | \dontrun{ 32 | library(dataone) 33 | d1c <- D1Client("PROD", "urn:node:KNB") 34 | } 35 | } 36 | \seealso{ 37 | \code{\link[=D1Client-class]{dataone}}{ class description.} 38 | } 39 | -------------------------------------------------------------------------------- /man/D1Client.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{D1Client} 4 | \alias{D1Client} 5 | \alias{D1Client,ANY,ANY-method} 6 | \alias{D1Client,character,ANY-method} 7 | \alias{D1Client,character,character-method} 8 | \alias{D1Client,CNode,MNode-method} 9 | \alias{D1Client,character,MNode-method} 10 | \title{The DataONE client class used to download, update and search for data in the DataONE network.} 11 | \usage{ 12 | D1Client(x, y, ...) 13 | 14 | \S4method{D1Client}{ANY,ANY}() 15 | 16 | \S4method{D1Client}{character,ANY}(x, y, ...) 17 | 18 | \S4method{D1Client}{character,character}(x, y) 19 | 20 | \S4method{D1Client}{CNode,MNode}(x, y, ...) 21 | 22 | \S4method{D1Client}{character,MNode}(x, y, ...) 23 | } 24 | \arguments{ 25 | \item{x}{The label for the DataONE environment to be using ('PROD','STAGING','SANDBOX','DEV'). This parameter 26 | can alternatively be a \code{\link{CNode}} instance, with the `y` parameter specified as an \code{\link{MNode}} instance.} 27 | 28 | \item{y}{The node Id of the application's 'home' node. Should be already registered to the corresponding 'env'. This 29 | parameter can alternatively be an \code{\link{MNode}} instance, with the `x` parameter specified as a \code{\link{CNode}} instance.} 30 | 31 | \item{...}{(not yet used)} 32 | } 33 | \value{ 34 | the D1Client object representing the DataONE environment 35 | } 36 | \description{ 37 | The DataONE client class used to download, update and search for data in the DataONE network. 38 | } 39 | \examples{ 40 | \dontrun{ 41 | cli <- D1Client("PROD", "urn:node:KNB") 42 | cn <- CNode('STAGING2') 43 | mn <- getMNode(cn,'urn:node:mnTestKNB') 44 | cli <- D1Client(cn,mn) 45 | } 46 | } 47 | \seealso{ 48 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 49 | } 50 | -------------------------------------------------------------------------------- /man/D1Node-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \docType{class} 4 | \name{D1Node-class} 5 | \alias{D1Node-class} 6 | \title{A base class for CNode and MNode.} 7 | \description{ 8 | D1Node is a base class for CNode and MNode classes and contains class slots and 9 | methods that are common between these two child classes. 10 | } 11 | \section{Slots}{ 12 | 13 | \describe{ 14 | \item{\code{identifier}}{A character string containing a URN that uniquely identifiers the node} 15 | 16 | \item{\code{name}}{A character string containing a plain text name for the node} 17 | 18 | \item{\code{description}}{A character string describing the node} 19 | 20 | \item{\code{baseURL}}{A character string of the registered baseURL for the node, which does not include the version string} 21 | 22 | \item{\code{subject}}{A character string containing the Distinguished Name of this node, used for authentication} 23 | 24 | \item{\code{contactSubject}}{The Distinguished Name of contact person for this node} 25 | 26 | \item{\code{replicate}}{A logical flag indicating whether the node accepts replicas} 27 | 28 | \item{\code{type}}{The node type, either 'mn' or 'cn'} 29 | 30 | \item{\code{state}}{A character string that indicates whether or not the node is accessible, either 'up' or 'down'} 31 | 32 | \item{\code{services}}{A data.frame containing the service tiers supported by this node.} 33 | 34 | \item{\code{serviceUrls}}{A data.frame that contains DataONE service Urls} 35 | 36 | \item{\code{APIversion}}{A character string indicating version of the DataONE API for this node, e.g. "v2"} 37 | 38 | \item{\code{env}}{A character string, either 'prod' if this node is in the production environment, otherwise 'test'} 39 | }} 40 | 41 | \section{Methods}{ 42 | 43 | \itemize{ 44 | \item{\code{\link{D1Node-initialize}{initialize}}}{: Initialize a D1Node} 45 | \item{\code{\link{D1Node}}}{: Create a MNode object representing a DataONE Member Node repository.} 46 | \item{\code{\link{archive}}}{: Change the state of an object so that it is hidden from searches.} 47 | \item{\code{\link{describeObject}}}{: Get header information for a given pid.} 48 | \item{\code{\link{getChecksum}}}{: Get the checksum for the data object associated with the specified pid.} 49 | \item{\code{\link{getObject}}}{: Get the bytes associated with an object on a node.} 50 | \item{\code{\link{getQueryEngineDescription}}}{: Query a node for the list of query engines available on the node.} 51 | \item{\code{\link{getSystemMetadata}}}{: Get the metadata describing system properties associated with an object on the Node.} 52 | \item{\code{\link{listObjects}}}{: Retrieve the list of objects that match the search parameters.} 53 | \item{\code{\link{listQueryEngines}}}{: Query a node for the list of query engines available on the node.} 54 | \item{\code{\link{ping}}}{: Test if a node is online and accepting DataONE requests.} 55 | \item{\code{\link{encodeSolr}}}{: Encode the input for Solr Queries.} 56 | \item{\code{\link{query}}}{: Search DataONE for data and metadata objects.} 57 | \item{\code{\link{isAuthorized}}}{: Check if an action is authorized for the specified identifier.} 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /man/D1Node-initialize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{initialize,D1Node-method} 4 | \alias{initialize,D1Node-method} 5 | \alias{D1Node-initialize} 6 | \title{Initialize a D1Node} 7 | \usage{ 8 | \S4method{initialize}{D1Node}(.Object) 9 | } 10 | \arguments{ 11 | \item{.Object}{the D1Node object} 12 | } 13 | \description{ 14 | Initialize a D1Node 15 | } 16 | -------------------------------------------------------------------------------- /man/D1Node.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{D1Node} 4 | \alias{D1Node} 5 | \alias{D1Node,XMLInternalElementNode-method} 6 | \title{Create a D1Node object.} 7 | \usage{ 8 | D1Node(xml, ...) 9 | 10 | \S4method{D1Node}{XMLInternalElementNode}(xml) 11 | } 12 | \arguments{ 13 | \item{xml}{An XML object that describes the node to be initialized (see \link{listNodes}).} 14 | 15 | \item{...}{(not yet used)} 16 | } 17 | \value{ 18 | the Node object representing the DataONE environment 19 | } 20 | \description{ 21 | Create a D1Node object. 22 | } 23 | -------------------------------------------------------------------------------- /man/D1Object-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \docType{class} 4 | \name{D1Object-class} 5 | \alias{D1Object-class} 6 | \title{D1Object (Defunct) is a representation of a DataObject.} 7 | \description{ 8 | D1Object has been defunct in favor of datapack::DataObject, which provides 9 | a wrapper for data and associated SystemMetadata. 10 | } 11 | \section{Slots}{ 12 | 13 | \describe{ 14 | \item{\code{dataObject}}{A backing instance of a DataObject, to which all methods and state are proxied} 15 | }} 16 | 17 | \section{Methods}{ 18 | 19 | \itemize{ 20 | \item{\code{\link[dataone]{D1Object-initialize}}}{: Initialize a D1Object} 21 | \item{\code{\link[dataone]{getData}}}{: Get the data content of a specified D1Object.} 22 | \item{\code{\link[dataone]{getIdentifier}}}{: Get the identifier of the D1Object.} 23 | \item{\code{\link[dataone]{getFormatId}}}{: Get the formatId of the D1Object} 24 | \item{\code{\link[dataone]{setPublicAccess}}}{: Add a Rule to the AccessPolicy to make the object publicly readable.} 25 | \item{\code{\link[dataone]{canRead}}}{: Test whether the provided subject can read an object.} 26 | \item{\code{\link{asDataFrame}}}{: Return the D1Object as a data.frame.} 27 | } 28 | } 29 | 30 | \seealso{ 31 | \code{\link{dataone}}{ package description.} 32 | } 33 | \keyword{classes} 34 | -------------------------------------------------------------------------------- /man/D1Object-initialize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{initialize,D1Object-method} 4 | \alias{initialize,D1Object-method} 5 | \alias{D1Object-initialize} 6 | \title{Initialize a D1Object} 7 | \usage{ 8 | \S4method{initialize}{D1Object}(.Object, id, data, format, mnNodeId = as.character(NA)) 9 | } 10 | \arguments{ 11 | \item{.Object}{A D1Object instance.} 12 | 13 | \item{id}{The identifier for the object} 14 | 15 | \item{data}{An R object (data or metadata) that this D1Object contains.} 16 | 17 | \item{format}{The Object format.} 18 | 19 | \item{mnNodeId}{The DataONE node identifier associated with this object, i.e. "urn:node:KNB"} 20 | } 21 | \description{ 22 | Initialize a D1Object 23 | } 24 | \seealso{ 25 | \code{\link[=D1Object-class]{D1Object}}{ class description.} 26 | } 27 | -------------------------------------------------------------------------------- /man/D1Object.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{D1Object} 4 | \alias{D1Object} 5 | \title{Create a D1Object instance.} 6 | \usage{ 7 | D1Object(...) 8 | } 9 | \arguments{ 10 | \item{...}{(additional arguments)} 11 | } 12 | \value{ 13 | the D1Object instance 14 | } 15 | \description{ 16 | Create a D1Object instance. 17 | } 18 | \seealso{ 19 | \code{\link[=D1Object-class]{D1Object}}{ class description.} 20 | } 21 | -------------------------------------------------------------------------------- /man/EMLParser-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/EMLParser.R 3 | \docType{class} 4 | \name{EMLParser-class} 5 | \alias{EMLParser-class} 6 | \title{Handler for Parsing Table Format Details from Metadata} 7 | \description{ 8 | #' Implements methods to provide parsing instructions for asDataFrame. 9 | } 10 | \details{ 11 | #' handles eml formats 2.0.0 through 2.1.1 12 | } 13 | \section{Slots}{ 14 | 15 | \describe{ 16 | \item{\code{d1Object}}{the metadata object} 17 | 18 | \item{\code{xmlDocRoot}}{the xml representation of the metadata} 19 | }} 20 | 21 | \author{ 22 | rnahf 23 | } 24 | -------------------------------------------------------------------------------- /man/EMLParser.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/EMLParser.R 3 | \name{EMLParser} 4 | \alias{EMLParser} 5 | \alias{EMLParser,D1Object-method} 6 | \title{Construct an EML parser object.} 7 | \usage{ 8 | EMLParser(d1Object, ...) 9 | 10 | \S4method{EMLParser}{D1Object}(d1Object) 11 | } 12 | \arguments{ 13 | \item{d1Object}{The D1Object to obtain data from.} 14 | 15 | \item{...}{Additional parameters} 16 | } 17 | \description{ 18 | Construct an EML parser object. 19 | } 20 | -------------------------------------------------------------------------------- /man/MNode-class.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \docType{class} 4 | \name{MNode-class} 5 | \alias{MNode-class} 6 | \title{Provides R API to DataONE Member Node services.} 7 | \description{ 8 | MNode provides functions that interact with a DataONE Member Node (MN). A MN 9 | is a repository that provides access for reading and writing data and metadata using the 10 | DataONE MN service API. The MN API includes functions for retrieving data and metadata based on its 11 | unique persistent identifier (pid), as well as for creating, updating, and archiving these data and 12 | metadata objects. 13 | } 14 | \details{ 15 | Methods that perform write operations (such as createObject and updateObject) on the MN generally 16 | require authentication. For MNs that have implemented the DataONE API version 2.0 and higher, these operations can utilize an 17 | authentication token to provide credentials for write operations in DataONE. 18 | The authentication token is obtained from DataONE (see your account profile on https://search.dataone.org). 19 | See the \code{vignette("dataone-overview")} for details. 20 | Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file 21 | system can also be used. This certificate provides authentication credentials from 22 | CILogon \url{https://cilogon.org/?skin=DataONE}. 23 | } 24 | \section{Slots}{ 25 | 26 | \describe{ 27 | \item{\code{endpoint}}{The url to access node services, which is the baseURL plus the version string} 28 | }} 29 | 30 | \section{Methods}{ 31 | 32 | \itemize{ 33 | \item{\code{\link{MNode}}}{: Create a MNode object representing a DataONE Member Node repository.} 34 | \item{\code{\link{createObject}}}{: Create an object on a Member Node.} 35 | \item{\code{\link{getObject}}}{: Get the bytes associated with an object on the Member Node} 36 | \item{\code{\link{getCapabilities}}}{: Get the node capabilities description, and store the information in the MNode.} 37 | \item{\code{\link{generateIdentifier}}}{: Get a unique identifier that is generated by the Member Node repository and guaranteed to be unique.} 38 | \item{\code{\link{getPackage}}}{: Download a data package from a member node.} 39 | \item{\code{\link{updateObject}}}{: Update an object to a Member Node, by creating a new object that replaces an original.} 40 | \item{\code{\link{updateSystemMetadata}}}{: Update the system metadata associated with an object.} 41 | } 42 | } 43 | 44 | \examples{ 45 | \dontrun{ 46 | library(dataone) 47 | library(uuid) 48 | library(digest) 49 | cn <- CNode("STAGING") 50 | mn <- getMNode(cn, "urn:node:mnStageUCSB2") 51 | mnid <- mn@identifier 52 | # Have Dataone create an identifier for you (requires authentication) 53 | \dontrun{ 54 | newid <- generateIdentifier(mn, "UUID") 55 | } 56 | # Create an identifier manually 57 | newid <- paste("urn:uuid:", UUIDgenerate(), sep="") 58 | testdf <- data.frame(x=1:10,y=11:20) 59 | csvfile <- paste(tempfile(), ".csv", sep="") 60 | write.csv(testdf, csvfile, row.names=FALSE) 61 | f <- "text/csv" 62 | size <- file.info(csvfile)$size 63 | sha256 <- digest(csvfile, algo="sha256", serialize=FALSE, file=TRUE) 64 | sysmeta <- new("SystemMetadata", identifier=newid, formatId=f, size=size, 65 | checksum=sha256, originMemberNode=mnid, authoritativeMemberNode=mnid) 66 | # Upload data to DataONE (requires authentication) 67 | \dontrun{ 68 | response <- createObject(mn, newid, csvfile, sysmeta) 69 | } 70 | } 71 | } 72 | \seealso{ 73 | \code{\link{dataone}}{ package description.} 74 | } 75 | -------------------------------------------------------------------------------- /man/MNode.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{MNode} 4 | \alias{MNode} 5 | \alias{MNode,character-method} 6 | \alias{MNode,D1Node-method} 7 | \title{Create a MNode object representing a DataONE Member Node repository.} 8 | \usage{ 9 | MNode(x) 10 | 11 | \S4method{MNode}{character}(x) 12 | 13 | \S4method{MNode}{D1Node}(x) 14 | } 15 | \arguments{ 16 | \item{x}{a URI representing a base URL (i.e. https://knb.ecoinformatics.org/knb/d1/mn/v2); or a reference to a dataone::Node instance} 17 | } 18 | \value{ 19 | the MNode object- 20 | } 21 | \description{ 22 | Construct an instance of MNode to provide mechanisms to access, create, and update data and 23 | metadata objects on the associated Member Node. 24 | } 25 | \details{ 26 | If the \code{'x'} is a string, it is treated as a URI and an attempt to find an associated 27 | Member Node at that base URL is attempted. If \code{'x'} is a Node reference, then it is cast to a MNode 28 | instance. This typically is used from the getMNode() function from the CNode class, which is the preferred 29 | way to retrieve an instance of an MNode. 30 | } 31 | \examples{ 32 | \dontrun{ 33 | mn <- MNode("https://knb.ecoinformatics.org/knb/d1/mn/v2") 34 | } 35 | } 36 | \seealso{ 37 | \code{\link[=MNode-class]{MNode}}{ class description.} 38 | } 39 | -------------------------------------------------------------------------------- /man/addData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{addData,DataPackage,D1Object-method} 4 | \alias{addData,DataPackage,D1Object-method} 5 | \title{Add a D1Object containing a data object to a DataPackage} 6 | \usage{ 7 | \S4method{addData}{DataPackage,D1Object}(x, do, mo = as.character(NA)) 8 | } 9 | \arguments{ 10 | \item{x}{The \code{"DataPackage"} to which the data object should be added.} 11 | 12 | \item{do}{A D1Object to add to the DataPackage} 13 | 14 | \item{mo}{A D1Object (containing metadata describing \code{"do"} ) to associate with the data object.} 15 | } 16 | \description{ 17 | The D1Object \code{do} is added to the data package \code{x}. 18 | } 19 | \details{ 20 | If the optional \code{mo} parameter is specified, then it is assumed that this DataObject is a metadata 21 | object that describes the data object that is being added. The DataObject specified in the \code{mo} parameter will 22 | also be added to the DataPackage, if it has not already been added. Then the \code{addData} function will add a relationship 23 | to the resource map that indicates that the metadata object describes the science object, using CiTO, the Citation Typing Ontology, 24 | \code{documents} and \code{isDocumentedBy} relationships. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | library(dataone) 29 | library(datapack) 30 | library(uuid) 31 | dp <- new("DataPackage") 32 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 33 | # Create metadata object that describes science data 34 | newId <- sprintf("urn:uuid:\%s", UUIDgenerate()) 35 | csvfile <- system.file("extdata/sample.csv", package="dataone") 36 | sciObj <- new("DataObject", id=newId, format="text/csv",filename=csvfile) 37 | dp <- addData(dp, do = sciObj) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /man/archive.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{archive} 4 | \alias{archive} 5 | \alias{archive,D1Node-method} 6 | \title{Archive an object on a Member Node or Coordinating Node, which hides it from casual searches.} 7 | \usage{ 8 | archive(x, ...) 9 | 10 | \S4method{archive}{D1Node}(x, pid) 11 | } 12 | \arguments{ 13 | \item{x}{The MNode or CNode instance on which the object will be created} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{pid}{The identifier of the object to be created} 18 | } 19 | \value{ 20 | The pid that was archived if successful, otherwise NULL 21 | } 22 | \description{ 23 | This method provides the ability to archive a data or metadata object on the Member Node 24 | provided in the \code{'mnode'} parameter. Archiving removes the object from DataONE search functions, 25 | thereby making it more difficult to find without completely removing the object. Archive is intended 26 | for objects that should not be used by current researchers, but for which there is a desire to maintain 27 | a historical record, such as when journal articles might cite the object. Users can still obtain the 28 | contents of archived objects if they have the identifier, but will not discover it through searches. 29 | } 30 | \details{ 31 | This operation requires an X.509 certificate to be present in the default location of the file 32 | system. This certificate provides authentication credentials from 33 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{\link{CertificateManager}} for details. 34 | For DataONE Version 2.0, an authentication token can also be used for authentication. 35 | Also, administrator privilege is required to run archive() on a DataONE Coordinating Node. 36 | } 37 | \examples{ 38 | \dontrun{ 39 | library(dataone) 40 | library(uuid) 41 | library(digest) 42 | library(datapack) 43 | # First create a new object 44 | cn <- CNode("STAGING") 45 | mn <- getMNode(cn, "urn:node:mnStageUCSB2") 46 | testdf <- data.frame(x=1:10,y=11:20) 47 | csvfile <- paste(tempfile(), ".csv", sep="") 48 | write.csv(testdf, csvfile, row.names=FALSE) 49 | \dontrun{ 50 | newid <- generateIdentifier(mn, "UUID") 51 | } 52 | # Create an identifier manually 53 | newid <- paste("urn:uuid:", UUIDgenerate(), sep="") 54 | format <- "text/csv" 55 | size <- file.info(csvfile)$size 56 | sha256 <- digest(csvfile, algo="sha256", serialize=FALSE, file=TRUE) 57 | sysmeta <- new("SystemMetadata", identifier=newid, formatId=format, size=size, checksum=sha256) 58 | sysmeta <- addAccessRule(sysmeta, "public", "read") 59 | # Create (upload) the object to DataONE (requires authentication) 60 | \dontrun{ 61 | create(mn, newid, csvfile, sysmeta) 62 | # Now for demonstration purposes, archive the object 63 | # Archive the object (requires authentication) 64 | archivedId <- archive(mn, newid) 65 | } 66 | } 67 | } 68 | \seealso{ 69 | \code{\link[=D1Node-class]{D1Node}}{ class description.} 70 | } 71 | -------------------------------------------------------------------------------- /man/asDataFrame.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{asDataFrame} 4 | \alias{asDataFrame} 5 | \alias{asDataFrame,D1Object,D1Object-method} 6 | \alias{asDataFrame,D1Object,AbstractTableDescriber-method} 7 | \title{return the D1Object data as a data.frame.} 8 | \usage{ 9 | asDataFrame(x, reference, ...) 10 | 11 | \S4method{asDataFrame}{D1Object,D1Object}(x, reference, ...) 12 | 13 | \S4method{asDataFrame}{D1Object,AbstractTableDescriber}(x, reference, ...) 14 | } 15 | \arguments{ 16 | \item{x}{A D1Object} 17 | 18 | \item{reference}{A reference to a D1Object} 19 | 20 | \item{...}{(Additional parameters)} 21 | } 22 | \description{ 23 | This method uses the provided metadata reference object for instructions on 24 | how to parse the data table (which parameters to set) 25 | 'reference' is the metadata D1Object that gives instruction on how to read the data 26 | into the dataFrame 27 | } 28 | -------------------------------------------------------------------------------- /man/auth_delete.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_delete} 4 | \alias{auth_delete} 5 | \title{DELETE a resource with authenticated credentials.} 6 | \usage{ 7 | auth_delete(url, encode = "multipart", body = as.list(NA), node) 8 | } 9 | \arguments{ 10 | \item{url}{The URL to be accessed via authenticated DELETE} 11 | 12 | \item{encode}{the type of encoding to use for the DELETE body, defaults to 'multipart'} 13 | 14 | \item{body}{a list of data to be included in the body of the DELETE request} 15 | 16 | \item{node}{The D1Node object that the request will be made to.} 17 | } 18 | \value{ 19 | the HTTP response from the request 20 | } 21 | \description{ 22 | DELETE data at a URL using an HTTP DELETE request using authentication credentials 23 | provided in a client certificate. Authenticated access depends on the suggested 24 | openssl package. If the openssl package is not installed, then the request fails. 25 | } 26 | -------------------------------------------------------------------------------- /man/auth_get.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_get} 4 | \alias{auth_get} 5 | \title{GET a resource with authenticated credentials if available.} 6 | \usage{ 7 | auth_get(url, nconfig = config(), node, path = NULL) 8 | } 9 | \arguments{ 10 | \item{url}{The URL to be accessed via authenticated GET.} 11 | 12 | \item{nconfig}{HTTP configuration options as used by curl, defaults to empty list} 13 | 14 | \item{node}{The D1Node object that the request will be made to.} 15 | 16 | \item{path}{Path to a file to write object to} 17 | } 18 | \value{ 19 | the response object from the method 20 | } 21 | \description{ 22 | Retrieve the data at a URL using an HTTP GET request using authentication credentials 23 | provided in a client certificate. Authenticated access depends on the suggested 24 | openssl package. If the openssl package is not installed, then the request falls back 25 | to an unauthenticated request, which may fail due to insufficient permissions. 26 | Configuration options for httr/RCurl can be passed using the normal config() 27 | mechanisms to generate a config option. Use httr_options() to see a complete list 28 | of available options. 29 | } 30 | -------------------------------------------------------------------------------- /man/auth_head.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_head} 4 | \alias{auth_head} 5 | \title{Send a http HEAD request for a resource with authenticated credentials if available.} 6 | \usage{ 7 | auth_head(url, nconfig = config(), node) 8 | } 9 | \arguments{ 10 | \item{url}{The URL to be accessed via authenticated HEAD.} 11 | 12 | \item{nconfig}{HTTP configuration options as used by curl, defaults to empty list} 13 | 14 | \item{node}{The D1Node object that the request will be made to.} 15 | } 16 | \value{ 17 | the response object from the method 18 | } 19 | \description{ 20 | Retrieve http header information for a URL using an HTTP HEAD request 21 | using authentication credentials provided in a client certificate or token. 22 | Authenticated access depends on the suggested openssl package. If the openssl 23 | package is not installed, then the request falls back to an unauthenticated request, 24 | which may fail due to insufficient permissions. 25 | Configuration options for httr/RCurl can be passed using the normal config() 26 | mechanisms to generate a config option. Use httr_options() to see a complete list 27 | of available options. Note: The HEAD method is identical to GET except that the server MUST 28 | NOT return a message-body in the response. 29 | } 30 | -------------------------------------------------------------------------------- /man/auth_post.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_post} 4 | \alias{auth_post} 5 | \title{POST a resource with authenticated credentials.} 6 | \usage{ 7 | auth_post(url, encode = "multipart", body = NULL, node) 8 | } 9 | \arguments{ 10 | \item{url}{The URL to be accessed via authenticated POST} 11 | 12 | \item{encode}{the type of encoding to use for the POST body, defaults to 'multipart'} 13 | 14 | \item{body}{a list of data to be included in the body of the POST request} 15 | 16 | \item{node}{The D1Node object that the request will be made to.} 17 | } 18 | \value{ 19 | the HTTP response from the request 20 | } 21 | \description{ 22 | POST data to a URL using an HTTP POST request using authentication credentials 23 | provided in a client certificate. Authenticated access depends on the suggested 24 | openssl package. If the openssl package is not installed, then the request fails. 25 | } 26 | -------------------------------------------------------------------------------- /man/auth_put.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_put} 4 | \alias{auth_put} 5 | \title{PUT a resource with authenticated credentials.} 6 | \usage{ 7 | auth_put(url, encode = "multipart", body = NULL, node) 8 | } 9 | \arguments{ 10 | \item{url}{The URL to be accessed via authenticated PUT} 11 | 12 | \item{encode}{the type of encoding to use for the PUT body, defaults to 'multipart'} 13 | 14 | \item{body}{a list of data to be included in the body of the PUT request} 15 | 16 | \item{node}{The D1Node object that the request will be made to.} 17 | } 18 | \value{ 19 | the HTTP response from the request 20 | } 21 | \description{ 22 | PUT data to a URL using an HTTP PUT request using authentication credentials 23 | provided in a client certificate. Authenticated access depends on the suggested 24 | openssl package. If the openssl package is not installed, then the request fails. 25 | } 26 | -------------------------------------------------------------------------------- /man/auth_put_post_delete.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{auth_put_post_delete} 4 | \alias{auth_put_post_delete} 5 | \title{POST, PUT, or DELETE a resource with authenticated credentials.} 6 | \usage{ 7 | auth_put_post_delete(method, url, encode = "multipart", body = NULL, node) 8 | } 9 | \arguments{ 10 | \item{method}{a string indicating which HTTP method to use (post, put, or delete)} 11 | 12 | \item{url}{The URL to be accessed via authenticated PUT} 13 | 14 | \item{encode}{the type of encoding to use for the PUT body, defaults to 'multipart'} 15 | 16 | \item{body}{a list of data to be included in the body of the PUT request} 17 | 18 | \item{node}{The D1Node object that the request will be made to.} 19 | } 20 | \value{ 21 | the response object from the method 22 | } 23 | \description{ 24 | POST, PUT, or DELETE data to a URL using an HTTP request using authentication credentials 25 | provided in a client authentication, either via authentication token or certificate. 26 | If the user does not have a valid token or certificate, request fails. 27 | } 28 | -------------------------------------------------------------------------------- /man/canRead.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{canRead,D1Object-method} 4 | \alias{canRead,D1Object-method} 5 | \title{Test whether the provided subject can read an object.} 6 | \usage{ 7 | \S4method{canRead}{D1Object}(x, subject) 8 | } 9 | \arguments{ 10 | \item{x}{D1Object} 11 | 12 | \item{subject}{: the subject name of the person/system to check for read permissions} 13 | } 14 | \value{ 15 | logical TRUE if the subject has read permission, or FALSE otherwise 16 | } 17 | \description{ 18 | Using the AccessPolicy, tests whether the subject has read permission 19 | for the object. This method is meant work prior to submission to a repository, 20 | and will show the permissions that would be enforced by the repository on submission. 21 | Currently it only uses the AccessPolicy to determine who can read (and not the rightsHolder field, 22 | which always can read an object). If an object has been granted read access by the 23 | special "public" subject, then all subjects have read access. 24 | } 25 | \details{ 26 | The subject name used in both the AccessPolicy and in the \code{'subject'} 27 | argument to this method is a string value, but is generally formatted as an X.509 28 | name formatted according to RFC 2253. 29 | } 30 | -------------------------------------------------------------------------------- /man/convert.csv.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{convert.csv} 4 | \alias{convert.csv} 5 | \alias{convert.csv,D1Client-method} 6 | \title{Convert a DataFrame to Standard CSV.} 7 | \usage{ 8 | convert.csv(x, ...) 9 | 10 | \S4method{convert.csv}{D1Client}(x, df, ...) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object} 14 | 15 | \item{...}{additional params passed to write.csv} 16 | 17 | \item{df}{the dataFrame} 18 | } 19 | \value{ 20 | the dataframe serialized as a .csv 21 | } 22 | \description{ 23 | Convert a DataFrame to Standard CSV. 24 | } 25 | \examples{ 26 | \dontrun{ 27 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 28 | testdf <- data.frame(x=1:10,y=11:20) 29 | sdf <- convert.csv(d1c, testdf) 30 | } 31 | } 32 | \seealso{ 33 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 34 | } 35 | -------------------------------------------------------------------------------- /man/createD1Object.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{createD1Object} 4 | \alias{createD1Object} 5 | \alias{createD1Object,D1Client,D1Object-method} 6 | \title{Create the Object in the DataONE System} 7 | \usage{ 8 | createD1Object(x, d1Object, ...) 9 | 10 | \S4method{createD1Object}{D1Client,D1Object}(x, d1Object) 11 | } 12 | \arguments{ 13 | \item{x}{: D1Client} 14 | 15 | \item{d1Object}{A D1Object instance to upload to DataONE} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | TRUE if the object was successfully uploaded, FALSE if not. 21 | } 22 | \description{ 23 | Create the Object in the DataONE System 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | library(uuid) 29 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 30 | data <- readLines(system.file("extdata/strix-pacific-northwest.xml", package="dataone")) 31 | dataRaw <- charToRaw(paste(data, collapse="\n")) 32 | newid <- sprintf("urn:node:\%s", UUIDgenerate()) 33 | d1o <- new("D1Object", id=newid, data=dataRaw, format="text/plain") 34 | d1o <- setPublicAccess(d1o) 35 | # Upload the object to DataONE (requires authentication) 36 | uploaded <- createD1Object(d1c, d1o) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/createDataPackage.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{createDataPackage} 4 | \alias{createDataPackage} 5 | \alias{createDataPackage,D1Client,DataPackage-method} 6 | \title{Create a DataPackage on a DataONE Member Node} 7 | \usage{ 8 | createDataPackage(x, dataPackage, ...) 9 | 10 | \S4method{createDataPackage}{D1Client,DataPackage}(x, dataPackage, ...) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client instance.} 14 | 15 | \item{dataPackage}{The DataPackage instance to be submitted to DataONE for creation.} 16 | 17 | \item{...}{Additional arguments} 18 | } 19 | \value{ 20 | The identifier of the uploaded package. 21 | } 22 | \description{ 23 | Upload all members of a DataPackage to DataONE. 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | testdf <- data.frame(x=1:10,y=11:20) 29 | csvfile <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".csv") 30 | write.csv(testdf, csvfile, row.names=FALSE) 31 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 32 | dp <- new("DataPackage") 33 | emlFile <- system.file("extdata/strix-pacific-northwest.xml", package="dataone") 34 | emlChar <- readLines(emlFile) 35 | emlRaw <- charToRaw(paste(emlChar, collapse="\n")) 36 | emlId <- sprintf("urn:uuid:\%s", UUIDgenerate()) 37 | metadataObj <- new("D1Object", id=emlId, format="eml://ecoinformatics.org/eml-2.1.1", data=emlRaw, 38 | mnNodeId=getMNodeId(d1c)) 39 | sdf <- read.csv(csvfile) 40 | stf <- charToRaw(convert.csv(d1c, sdf)) 41 | sciId <- sprintf("urn:uuid:\%s", UUIDgenerate()) 42 | sciObj <- new("D1Object", id=sciId, format="text/csv", data=stf, mnNodeId=getMNodeId(d1c)) 43 | dp <- addMember(dp, do=sciObj, mo=metadataObj) 44 | expect_true(is.element(sciObj@dataObject@sysmeta@identifier, getIdentifiers(dp))) 45 | resourceMapId <- createDataPackage(d1c, dp, replicate=TRUE, public=TRUE) 46 | } 47 | } 48 | \seealso{ 49 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 50 | } 51 | -------------------------------------------------------------------------------- /man/createObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{createObject} 4 | \alias{createObject} 5 | \alias{createObject,MNode-method} 6 | \title{Create an object on a Member Node.} 7 | \usage{ 8 | createObject(x, ...) 9 | 10 | \S4method{createObject}{MNode}(x, pid, file = as.character(NA), sysmeta, dataobj = NULL, ...) 11 | } 12 | \arguments{ 13 | \item{x}{The MNode instance on which the object will be created} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{pid}{The identifier of the object to be created} 18 | 19 | \item{file}{the absolute file location of the object to be uploaded} 20 | 21 | \item{sysmeta}{a SystemMetadata instance describing properties of the object} 22 | 23 | \item{dataobj}{a \code{raw} object to use for the upload, instead of the contents of the \code{file} argument.} 24 | } 25 | \value{ 26 | a \code{character} containing the identifier that was created. 27 | } 28 | \description{ 29 | This method provides the ability to upload a data or metadata object to the Member Node 30 | provided in the \code{'mnode'} parameter. 31 | } 32 | \details{ 33 | In the version 2.0 library and higher, this operation can utilize an 34 | 'dataone_token' option to provide credentials for write operations in DataONE. 35 | The authentication token is obtained from DataONE (see your profile on https://search.dataone.org). 36 | See the \code{vignette("dataone-overview")} for details. 37 | Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file 38 | system can also be used. This certificate provides authentication credentials from 39 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{vignette("dataone-overview")} for details. 40 | } 41 | \examples{ 42 | \dontrun{ 43 | # Create an object in the DataONE "STAGING" environment 44 | library(dataone) 45 | library(uuid) 46 | library(digest) 47 | library(datapack) 48 | cn <- CNode("STAGING") 49 | mn <- getMNode(cn, "urn:node:mnStageUCSB2") 50 | # Have Dataone create an identifier for you (requires authentication) 51 | \dontrun{ 52 | newid <- generateIdentifier(mn, "UUID") 53 | } 54 | # Create an identifier manually 55 | newid <- paste("urn:uuid:", UUIDgenerate(), sep="") 56 | testdf <- data.frame(x=1:10,y=11:20) 57 | csvfile <- paste(tempfile(), ".csv", sep="") 58 | write.csv(testdf, csvfile, row.names=FALSE) 59 | format <- "text/csv" 60 | size <- file.info(csvfile)$size 61 | sha256 <- digest(csvfile, algo="sha256", serialize=FALSE, file=TRUE) 62 | sysmeta <- new("SystemMetadata", identifier=newid, formatId=format, size=size, checksum=sha256) 63 | sysmeta <- addAccessRule(sysmeta, "public", "read") 64 | # Upload the data to DataONE (requires authentication) 65 | \dontrun{ 66 | createObject(mn, newid, csvfile, sysmeta) 67 | } 68 | } 69 | } 70 | \seealso{ 71 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MNStorage.create} 72 | } 73 | -------------------------------------------------------------------------------- /man/d1IdentifierSearch.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{d1IdentifierSearch} 4 | \alias{d1IdentifierSearch} 5 | \alias{d1IdentifierSearch,D1Client-method} 6 | \title{Query the DataONE Solr endpoint of the Coordinating Node.} 7 | \usage{ 8 | d1IdentifierSearch(x, ...) 9 | 10 | \S4method{d1IdentifierSearch}{D1Client}(x, solrQuery) 11 | } 12 | \arguments{ 13 | \item{x}{D1Client: representing the DataONE environment being queried} 14 | 15 | \item{...}{Additional parameters} 16 | 17 | \item{solrQuery}{character: a query string} 18 | } 19 | \value{ 20 | a vector of identifiers found 21 | } 22 | \description{ 23 | The DataONE CN Solr query engine is searched using 24 | the provided query string. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | library(dataone) 29 | client <- new("D1Client") 30 | result <- d1IdentifierSearch(client,solrQuery="species population diversity") 31 | } 32 | } 33 | \seealso{ 34 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 35 | } 36 | -------------------------------------------------------------------------------- /man/d1SolrQuery.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{d1SolrQuery} 4 | \alias{d1SolrQuery} 5 | \alias{d1SolrQuery,D1Client,list-method} 6 | \alias{d1SolrQuery,D1Client,character-method} 7 | \title{A method to query the DataONE solr endpoint of the Coordinating Node.} 8 | \usage{ 9 | d1SolrQuery(x, solrQuery) 10 | 11 | \S4method{d1SolrQuery}{D1Client,list}(x, solrQuery) 12 | 13 | \S4method{d1SolrQuery}{D1Client,character}(x, solrQuery) 14 | } 15 | \arguments{ 16 | \item{x}{the D1Client (environment) being queried} 17 | 18 | \item{solrQuery}{list or character: a fully encoded query string} 19 | } 20 | \value{ 21 | the solr response (XML) 22 | } 23 | \description{ 24 | It expects any lucene reserved characters to already be escaped with backslash. If 25 | solrQuery is a list, it is expected to have field names as attributes and search 26 | values as the values in the list. 27 | } 28 | \examples{ 29 | \dontrun{ 30 | library(dataone) 31 | d1c <- D1Client("PROD", "urn:node:KNB") 32 | queryParams <- list(q="id:doi*", rows="5", 33 | fq="(abstract:chlorophyll AND dateUploaded:[2000-01-01T00:00:00Z TO NOW])", 34 | fl="title,id,abstract,size,dateUploaded,attributeName") 35 | result <- d1SolrQuery(d1c, queryParams) 36 | } 37 | } 38 | \seealso{ 39 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 40 | } 41 | -------------------------------------------------------------------------------- /man/d1_errors.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{d1_errors} 4 | \alias{d1_errors} 5 | \title{This function parses a DataONE service response message for errors, and extracts and 6 | prints error information.} 7 | \usage{ 8 | d1_errors(x) 9 | } 10 | \arguments{ 11 | \item{x}{The DataONE service response} 12 | } 13 | \description{ 14 | This function parses a DataONE service response message for errors, and extracts and 15 | prints error information. 16 | } 17 | -------------------------------------------------------------------------------- /man/data.characterEncoding.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.characterEncoding} 4 | \alias{data.characterEncoding} 5 | \alias{data.characterEncoding,EMLParser,numeric-method} 6 | \title{CharacterEncoding} 7 | \usage{ 8 | data.characterEncoding(x, index, ...) 9 | 10 | \S4method{data.characterEncoding}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{index}{index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | the encoding used when serializing the data 21 | } 22 | \description{ 23 | The character encoding used, for example "UTF-8" 24 | } 25 | \author{ 26 | rnahf 27 | } 28 | -------------------------------------------------------------------------------- /man/data.formatFamily.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.formatFamily} 4 | \alias{data.formatFamily} 5 | \alias{data.formatFamily,EMLParser,numeric-method} 6 | \title{Data Format} 7 | \usage{ 8 | data.formatFamily(x, index, ...) 9 | 10 | \S4method{data.formatFamily}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{index}{index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | the format of the data object being described 21 | } 22 | \description{ 23 | Get the table format family. 24 | } 25 | \author{ 26 | rnahf 27 | } 28 | -------------------------------------------------------------------------------- /man/data.tableAttributeNames.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableAttributeNames} 4 | \alias{data.tableAttributeNames} 5 | \alias{data.tableAttributeNames,EMLParser,numeric-method} 6 | \title{returns the attribute names} 7 | \usage{ 8 | data.tableAttributeNames(x, index, ...) 9 | 10 | \S4method{data.tableAttributeNames}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber instance} 14 | 15 | \item{index}{- the index of the table to get results for} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | the attribute (column) names of the data 21 | } 22 | \description{ 23 | THe attribute names are defined in the metadata document for 24 | the specified data table 25 | } 26 | \author{ 27 | rnahf 28 | } 29 | -------------------------------------------------------------------------------- /man/data.tableAttributeOrientation.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableAttributeOrientation} 4 | \alias{data.tableAttributeOrientation} 5 | \alias{data.tableAttributeOrientation,EMLParser,numeric-method} 6 | \title{The Attribute (Header) Orientation} 7 | \usage{ 8 | data.tableAttributeOrientation(x, index, ...) 9 | 10 | \S4method{data.tableAttributeOrientation}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber} 14 | 15 | \item{index}{- the index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | legal values are "columns" | "rows" 21 | } 22 | \description{ 23 | Which way to the attribute headers run? Most data has a header row 24 | where the attribute names go across "columns", in row in which case, the 25 | return value for this method should be "columns." 26 | } 27 | \note{ 28 | this is the opposite question from how records are organized!! 29 | } 30 | \author{ 31 | rnahf 32 | } 33 | -------------------------------------------------------------------------------- /man/data.tableAttributeStorageTypes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableAttributeStorageTypes} 4 | \alias{data.tableAttributeStorageTypes} 5 | \alias{data.tableAttributeStorageTypes,EMLParser,numeric-method} 6 | \title{returns the attributes' data storage types} 7 | \usage{ 8 | data.tableAttributeStorageTypes(x, index, ...) 9 | 10 | \S4method{data.tableAttributeStorageTypes}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber instance} 14 | 15 | \item{index}{- the index of the table to get results for} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | the data storage types of the attributes 21 | } 22 | \description{ 23 | The attributes' data storage types are defined in the metadata document for 24 | the specified data table 25 | } 26 | \author{ 27 | rnahf 28 | } 29 | -------------------------------------------------------------------------------- /man/data.tableAttributeTypes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableAttributeTypes} 4 | \alias{data.tableAttributeTypes} 5 | \alias{data.tableAttributeTypes,EMLParser,numeric-method} 6 | \title{returns the attributes' data types} 7 | \usage{ 8 | data.tableAttributeTypes(x, index, ...) 9 | 10 | \S4method{data.tableAttributeTypes}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber instance} 14 | 15 | \item{index}{- the index of the table to get results for} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | the data types of the attributes 21 | } 22 | \description{ 23 | The attributes' data types are defined in the metadata document for 24 | the specified data table 25 | } 26 | \author{ 27 | rnahf 28 | } 29 | -------------------------------------------------------------------------------- /man/data.tableFieldDelimiter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableFieldDelimiter} 4 | \alias{data.tableFieldDelimiter} 5 | \alias{data.tableFieldDelimiter,EMLParser,numeric-method} 6 | \title{Field Delimiter} 7 | \usage{ 8 | data.tableFieldDelimiter(x, index, ...) 9 | 10 | \S4method{data.tableFieldDelimiter}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{index}{index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | the field delimiter(s) of the data object being described 21 | } 22 | \description{ 23 | Get the table field delimiter. 24 | } 25 | \author{ 26 | rnahf 27 | } 28 | -------------------------------------------------------------------------------- /man/data.tableMissingValueCodes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableMissingValueCodes} 4 | \alias{data.tableMissingValueCodes} 5 | \alias{data.tableMissingValueCodes,EMLParser,numeric-method} 6 | \title{returns missing value codes} 7 | \usage{ 8 | data.tableMissingValueCodes(x, index, ...) 9 | 10 | \S4method{data.tableMissingValueCodes}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber instance} 14 | 15 | \item{index}{- the index of the table to get results for} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | vector of missing value codes 21 | } 22 | \description{ 23 | the missing value codes are defined in the metadata document for 24 | the specified data table 25 | } 26 | \author{ 27 | rnahf 28 | } 29 | -------------------------------------------------------------------------------- /man/data.tableQuoteCharacter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableQuoteCharacter} 4 | \alias{data.tableQuoteCharacter} 5 | \alias{data.tableQuoteCharacter,EMLParser,numeric-method} 6 | \title{Quote Character} 7 | \usage{ 8 | data.tableQuoteCharacter(x, index, ...) 9 | 10 | \S4method{data.tableQuoteCharacter}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{index}{index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | the quote characters(s) for the data object being described 21 | } 22 | \description{ 23 | Get the table quote character. 24 | } 25 | \author{ 26 | rnahf 27 | } 28 | -------------------------------------------------------------------------------- /man/data.tableSkipLinesHeader.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{data.tableSkipLinesHeader} 4 | \alias{data.tableSkipLinesHeader} 5 | \alias{data.tableSkipLinesHeader,EMLParser,numeric-method} 6 | \title{Number of lines to skip before reading data} 7 | \usage{ 8 | data.tableSkipLinesHeader(x, index, ...) 9 | 10 | \S4method{data.tableSkipLinesHeader}{EMLParser,numeric}(x, index) 11 | } 12 | \arguments{ 13 | \item{x}{- the TableDescriber} 14 | 15 | \item{index}{- the index of the table within the document} 16 | 17 | \item{...}{Additional parameters} 18 | } 19 | \value{ 20 | the number of lines to skip 21 | } 22 | \description{ 23 | The specified number of lines are skipped. 24 | } 25 | \seealso{ 26 | \code{help(read.table)} 27 | } 28 | \author{ 29 | rnahf 30 | } 31 | -------------------------------------------------------------------------------- /man/dataone-defunct.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dataone-defunct.R 3 | \name{dataone-defunct} 4 | \alias{dataone-defunct} 5 | \title{Defunct} 6 | \description{ 7 | The following items are defunct in this release of dataone and are 8 | no longer supported. 9 | } 10 | \section{These S4 methods are defunct}{ 11 | 12 | \itemize{ 13 | \item{\code{\link{D1Object}}}{: A representation of a DataObject} 14 | \itemize{ 15 | \item{\code{\link{D1Object-initialize}}}{: Initialize a D1Object} 16 | \item{\code{\link{getData}}}{: Get the data content of a specified D1Object.} 17 | \item{\code{\link{getIdentifier}}}{: Get the identifier of the D1Object.} 18 | \item{\code{\link{getFormatId}}}{: Get the formatId of the D1Object} 19 | \item{\code{\link{setPublicAccess}}}{: Add a Rule to the AccessPolicy to make the object publicly readable.} 20 | \item{\code{\link{canRead}}}{: Test whether the provided subject can read an object.} 21 | \item{\code{\link{asDataFrame}}}{: Return the D1Object as a data.frame.} 22 | \item{\code{\link{setObsoletedBy}}}{: Set a pid as being obsoleted by another pid.} 23 | } 24 | \item{\code{\link{D1Client}}}{: The DataONE client class used to download, update and search for data in the DataONE network} 25 | \itemize{ 26 | \item{\code{\link{d1SolrQuery}}}{: A method to query the DataONE solr endpoint of the Coordinating Node.} 27 | \item{\code{\link{d1IdentifierSearch}}}{: Query the DataONE Solr endpoint of the Coordinating Node.} 28 | \item{\code{\link{createDataPackage}}}{: Create a DataPackage on a DataONE Member Node} 29 | \item{\code{\link{getMN}}}{: Get a member node client based on its node identifier.} 30 | \item{\code{\link{convert.csv}}}{: Convert a DataFrame to Standard CSV.} 31 | \item{\code{\link{addData}}}{: Add a D1Object containing a data object to a DataPackage} 32 | \item{\code{\link{createD1Object}}}{: Create the Object in the DataONE System} 33 | \item{\code{\link{getD1Object}}}{: Download a data object from the DataONE Federation.} 34 | } 35 | \item{\code{EMLParser}}{: A representation of a DataObject} 36 | \itemize{ 37 | \item{\code{\link{documented.entityNames}}}{: The entity names associated with each table are returned.} 38 | \item{\code{\link{documented.d1Identifiers}}}{: Get the DataONE identifier associated with each table.} 39 | \item{\code{\link{documented.sizes}}}{: Get the table size.} 40 | } 41 | \item{\code{AbstractTableDescriber}}{: Base Class for Specific Metadata Parsers} 42 | \itemize{ 43 | \item{\code{\link{data.formatFamily}}}{: Get the table format family.} 44 | \item{\code{\link{data.tableFieldDelimiter}}}{: Get the table field delimiter.} 45 | \item{\code{\link{data.tableQuoteCharacter}}}{: Get the table quote character.} 46 | \item{\code{\link{data.characterEncoding}}}{: The character encoding used, for example "UTF-8"} 47 | \item{\code{\link{data.tableAttributeOrientation}}}{: Which way to the attribute headers run? Most data has a header row} 48 | \item{\code{\link{data.tableSkipLinesHeader}}}{: The specified number of lines are skipped.} 49 | \item{\code{\link{data.tableMissingValueCodes}}}{: the missing value codes are defined in the metadata document for} 50 | \item{\code{\link{data.tableAttributeNames}}}{: The attribute names are defined in the metadata document for} 51 | \item{\code{\link{data.tableAttributeTypes}}}{: The attributes' data types are defined in the metadata document for} 52 | \item{\code{\link{data.tableAttributeStorageTypes}}}{: The attributes' data storage types are defined in the metadata document for} 53 | } 54 | } 55 | } 56 | 57 | \keyword{internal} 58 | -------------------------------------------------------------------------------- /man/dataone-deprecated.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dataone-deprecated.R 3 | \name{dataone-deprecated} 4 | \alias{dataone-deprecated} 5 | \title{Deprecated} 6 | \description{ 7 | The following items are deprecated in this release of dataone and will be 8 | removed in a future release 9 | } 10 | \section{These S4 methods are deprecated}{ 11 | 12 | \itemize{ 13 | \item{\code{\link{setObsoletedBy}}}{: Set a pid as being obsoleted by another pid.} 14 | \item{\code{\link{CertificateManager}}}{: Create a CertificateManager object.} 15 | \item{\code{\link{getCertLocation}}}{: Get the file path on disk of the client certificate file.} 16 | \item{\code{\link{showClientSubject}}}{: Get DataONE Identity as Stored in the CILogon Certificate.} 17 | \item{\code{\link{isCertExpired}}}{: Determine if an X.509 certificate has expired.} 18 | \item{\code{\link{getCertExpires}}}{: Show the date and time when an X.509 certificate expires.} 19 | \item{\code{\link{downloadCert}}}{: Open the CILogon Certificate download page in the default browser.} 20 | \item{\code{\link{obscureCert}}}{: Obscure the CILogon Client Certificate.} 21 | \item{\code{\link{restoreCert}}}{: Restore the CILogon client certificate by renaming it to its original location} 22 | } 23 | } 24 | 25 | \keyword{internal} 26 | -------------------------------------------------------------------------------- /man/dataone.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/dataone-package.R 3 | \docType{package} 4 | \name{dataone} 5 | \alias{dataone} 6 | \title{Search, download and upload data to the DataONE network.} 7 | \description{ 8 | The R package \emph{dataone} provides read/write access to data and metadata from the 9 | \href{https://www.dataone.org/}{DataONE} network of 10 | Member Node data repositories. Member Nodes in DataONE are independent data repositories that have adopted the DataONE 11 | services for interoperability, making each of the repositories accessible to client tools such as the DataONE R Client 12 | using a standard interface. The DataONE R Client can be used to access data files and to write new data and metadata files 13 | to nodes in the DataONE network. 14 | } 15 | \section{Classes}{ 16 | 17 | \itemize{ 18 | \item{\code{\link[=AuthenticationManager-class]{AuthenticationManager}}}{: AuthenticationManager provides methods to validate DataONE authentication.} 19 | \item{\code{\link[=CNode-class]{CNode}}}{: A CNode represents a DataONE Coordinating Node and can be used to access its services.} 20 | \item{\code{\link[=D1Client-class]{D1Client}}}{: The D1Client class contains methods that perform high level dataone tasks.} 21 | \item{\code{\link[=D1Node-class]{D1Node}}}{: A base class for CNode and MNode.} 22 | \item{\code{\link[=MNode-class]{MNode}}}{: MNode provides functions interacting with the a DataONE Member Node repository.} 23 | } 24 | } 25 | 26 | \seealso{ 27 | A description of the \emph{dataone} R package is available with the command: \code{'vignette("dataone-overview")'}. 28 | } 29 | \author{ 30 | Matthew B. Jones (NCEAS) and Peter Slaughter (NCEAS) 31 | } 32 | -------------------------------------------------------------------------------- /man/describeObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{describeObject} 4 | \alias{describeObject} 5 | \alias{describeObject,D1Node-method} 6 | \title{Efficiently get systemmetadata for an object.} 7 | \usage{ 8 | describeObject(x, ...) 9 | 10 | \S4method{describeObject}{D1Node}(x, pid) 11 | } 12 | \arguments{ 13 | \item{x}{The MNode or CNode instance to send request to.} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{pid}{Identifier for the object in question. May be either a PID or a SID. Transmitted as 18 | part of the URL path and must be escaped accordingly.} 19 | } 20 | \value{ 21 | A list of header elements 22 | } 23 | \description{ 24 | This method provides a lighter weight mechanism than getSystemMetadata() for a client to 25 | determine basic properties of the referenced object. This operation requires read privileges for the 26 | object specified by \code{'pid'}, as is granted with a DataONE authentication token or X.509 certificate. 27 | } 28 | \examples{ 29 | \dontrun{ 30 | library(dataone) 31 | mn_uri <- "https://knb.ecoinformatics.org/knb/d1/mn/v1" 32 | mn <- MNode(mn_uri) 33 | pid <- "knb.473.1" 34 | describeObject(mn, pid) 35 | describeObject(mn, "adfadf") # warning message when wrong pid 36 | } 37 | } 38 | \seealso{ 39 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MNRead.describe} 40 | } 41 | -------------------------------------------------------------------------------- /man/documented.d1Identifiers.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{documented.d1Identifiers} 4 | \alias{documented.d1Identifiers} 5 | \alias{documented.d1Identifiers,EMLParser-method} 6 | \title{Get DataONE identifiers} 7 | \usage{ 8 | documented.d1Identifiers(x, ...) 9 | 10 | \S4method{documented.d1Identifiers}{EMLParser}(x) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{...}{Additional parameters} 16 | } 17 | \value{ 18 | vector of dataONE identifiers 19 | } 20 | \description{ 21 | Get the DataONE identifier associated with each table 22 | } 23 | \author{ 24 | rnahf 25 | } 26 | -------------------------------------------------------------------------------- /man/documented.entityNames.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{documented.entityNames} 4 | \alias{documented.entityNames} 5 | \alias{documented.entityNames,EMLParser-method} 6 | \title{Get the entity names associated with each table} 7 | \usage{ 8 | documented.entityNames(x, ...) 9 | 10 | \S4method{documented.entityNames}{EMLParser}(x) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{...}{Additional parameters} 16 | } 17 | \value{ 18 | vector of entity names 19 | } 20 | \description{ 21 | The entity names associated with each table are returned. 22 | } 23 | \author{ 24 | rnahf 25 | } 26 | -------------------------------------------------------------------------------- /man/documented.sizes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R 3 | \name{documented.sizes} 4 | \alias{documented.sizes} 5 | \alias{documented.sizes,EMLParser-method} 6 | \title{Get the sizes of the described data tables.} 7 | \usage{ 8 | documented.sizes(x, ...) 9 | 10 | \S4method{documented.sizes}{EMLParser}(x) 11 | } 12 | \arguments{ 13 | \item{x}{the TableDescriber} 14 | 15 | \item{...}{Additional parameters} 16 | } 17 | \value{ 18 | vector of data table sizes (in bytes) 19 | } 20 | \description{ 21 | Get the table size. 22 | } 23 | \author{ 24 | rnahf 25 | } 26 | -------------------------------------------------------------------------------- /man/downloadCert.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{downloadCert} 4 | \alias{downloadCert} 5 | \alias{downloadCert,CertificateManager-method} 6 | \title{Open the CILogon Certificate download page in the default browser.} 7 | \usage{ 8 | downloadCert(x, ...) 9 | 10 | \S4method{downloadCert}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \description{ 18 | A convenience method to take you to the CILogon download page: 19 | "https://cilogon.org/?skin=DataONE. Logging into CILogon will allow 20 | you to download your X.509 certificate to your local computer. Typically, 21 | the certificate is saved in the default Globus location for certificates 22 | (\code{\link{getCertLocation}}) and once it is there, the \code{'dataone'} 23 | package will use the certificate for all authenticated operations. Deleting 24 | the certificate file is the equivalent of logging out. 25 | } 26 | -------------------------------------------------------------------------------- /man/downloadObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{downloadObject} 4 | \alias{downloadObject} 5 | \alias{downloadObject,D1Client-method} 6 | \title{Download an object from the DataONE Federation to Disk.} 7 | \usage{ 8 | downloadObject(x, identifier, ...) 9 | 10 | \S4method{downloadObject}{D1Client}(x, identifier, path = getwd(), check = as.logical(TRUE)) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | 15 | \item{identifier}{The identifier of the object to get.} 16 | 17 | \item{...}{(Not yet used.)} 18 | 19 | \item{path}{(optional) Path to a directory to write object to. The name of the file will be determined from the 20 | SystemMetada of the object (see details for more information). 21 | The function will fail if a file with the same name already exists in the directory.} 22 | 23 | \item{check}{(optional) A logical value, if TRUE check if this object has been obsoleted by another object in DataONE.} 24 | } 25 | \value{ 26 | A path where the ouput file is written to. 27 | } 28 | \description{ 29 | A convenience method to download an object to disk. 30 | } 31 | \details{ 32 | This method performs multiple underlying calls to the DataONE repository network. 33 | CN.resolve() is called to locate the object on one or more repositories, and then each of these 34 | is accessed until success at downloading the associated SystemMetadata for the object. 35 | The SystemMetadata is used to assign a name to the file that is output to disk. If a fileName is specified in 36 | the SystemMetadata, then the file output to disk will be named according to the SystemMetadata fileName. 37 | If there is not a specified SystemMetadata fileName, the identifier will be used as the file name output to disk. 38 | If the identifier is used as the file name, a file name extension will be determined using the SystemMetadata 39 | formatID along with information from CNCore.listFormats(). If the SystemMetadata formatID is 40 | "application/octet-stream" no extension will be written. 41 | } 42 | \examples{ 43 | \dontrun{ 44 | library(dataone) 45 | d1c <- D1Client("PROD", "urn:node:KNB") 46 | pid <- "solson.5.1" 47 | path <- downloadObject(d1c, pid) 48 | } 49 | } 50 | \seealso{ 51 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 52 | } 53 | -------------------------------------------------------------------------------- /man/echoCredentials.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{echoCredentials} 4 | \alias{echoCredentials} 5 | \alias{echoCredentials,CNode-method} 6 | \title{Echo the credentials used to make the call.} 7 | \usage{ 8 | echoCredentials(x, ...) 9 | 10 | \S4method{echoCredentials}{CNode}(x) 11 | } 12 | \arguments{ 13 | \item{x}{The coordinating node to send the request to.} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | A list containing authentication info. 19 | } 20 | \description{ 21 | This method can be used to verify the client certificate is valid 22 | and contains the expected information. 23 | } 24 | \details{ 25 | The authentication credentials contained in the X.509 certificate or 26 | authentication token are send with the request. 27 | } 28 | \examples{ 29 | \dontrun{ 30 | cn <- CNode("STAGING") 31 | creds <- echoCredentials(cn) 32 | print(creds$person$subject) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /man/encodeSolr.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{encodeSolr} 4 | \alias{encodeSolr} 5 | \alias{encodeSolr,character-method} 6 | \title{Encode the input for Solr Queries} 7 | \usage{ 8 | encodeSolr(x, ...) 9 | 10 | \S4method{encodeSolr}{character}(x, ...) 11 | } 12 | \arguments{ 13 | \item{x}{: a string to encode} 14 | 15 | \item{...}{(not yet used.)} 16 | } 17 | \value{ 18 | the encoded form of the input 19 | } 20 | \description{ 21 | Treating all special characters and spaces as literals, backslash escape special 22 | characters, and double-quote if necessary. 23 | } 24 | \examples{ 25 | encodeSolr("this & that") 26 | } 27 | -------------------------------------------------------------------------------- /man/encodeUrlPath.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{encodeUrlPath} 4 | \alias{encodeUrlPath} 5 | \alias{encodeUrlPath,D1Client-method} 6 | \title{Encode the Input for a URL Path Segment.} 7 | \usage{ 8 | encodeUrlPath(x, ...) 9 | 10 | \S4method{encodeUrlPath}{D1Client}(x, pathSegment, ...) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{pathSegment}{: a string to encode} 18 | } 19 | \value{ 20 | the encoded form of the input 21 | } 22 | \description{ 23 | Encodes the characters of the input so they are not interpreted as reserved 24 | characters in url strings. Will also encode non-ASCII unicode characters. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 29 | fullyEncodedPath <- paste0("cn/v1/object/", 30 | encodeUrlPath(d1c, "doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5")) 31 | } 32 | } 33 | \seealso{ 34 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 35 | } 36 | -------------------------------------------------------------------------------- /man/encodeUrlQuery.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{encodeUrlQuery} 4 | \alias{encodeUrlQuery} 5 | \alias{encodeUrlQuery,D1Client-method} 6 | \title{Encode the Input for a URL Query Segment.} 7 | \usage{ 8 | encodeUrlQuery(x, ...) 9 | 10 | \S4method{encodeUrlQuery}{D1Client}(x, querySegment, ...) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{querySegment}{: a string to encode} 18 | } 19 | \value{ 20 | the encoded form of the input 21 | } 22 | \description{ 23 | Encodes the characters of the input so they are not interpreted as reserved 24 | characters in url strings. Will also encode non-ASCII unicode characters. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 29 | fullyEncodedQuery <- paste0("q=id:", 30 | encodeUrlQuery(d1c, encodeSolr("doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5"))) 31 | } 32 | } 33 | \seealso{ 34 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 35 | } 36 | -------------------------------------------------------------------------------- /man/evaluateAuth.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{evaluateAuth} 4 | \alias{evaluateAuth} 5 | \alias{evaluateAuth,AuthenticationManager-method} 6 | \title{Evaluate DataONE authentication.} 7 | \usage{ 8 | evaluateAuth(.Object, ...) 9 | 10 | \S4method{evaluateAuth}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{an Authentication Object.} 14 | 15 | \item{...}{additional parameters} 16 | 17 | \item{node}{A D1Node object.} 18 | } 19 | \value{ 20 | A table containing authentication information. 21 | } 22 | \description{ 23 | A valid DataONE authentication method is looked for and all 24 | authentication information is retrieved from it. 25 | } 26 | \details{ 27 | If the node specified in the \code{'node'} parameter is a DataONE v2 node 28 | or higher, then an authentication token is checked if one exists. If it is readable 29 | and not expired, then information for the token is returned. If a valid token does 30 | not exist, then the X.509 certificate is checked, if it exists. If it is valid 31 | then information is returned for the certificate. 32 | } 33 | -------------------------------------------------------------------------------- /man/generateIdentifier.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{generateIdentifier} 4 | \alias{generateIdentifier} 5 | \alias{enerateIdentifier} 6 | \alias{generateIdentifier,MNode-method} 7 | \title{Get a unique identifier that is generated by the Member Node repository and guaranteed to be unique.} 8 | \usage{ 9 | generateIdentifier(x, ...) 10 | 11 | \S4method{generateIdentifier}{MNode}(x, scheme = "UUID", fragment = NULL) 12 | } 13 | \arguments{ 14 | \item{x}{The MNode instance on which the object will be created} 15 | 16 | \item{...}{(Not yet used.)} 17 | 18 | \item{scheme}{The identifier scheme to be used, such as DOI, UUID, etc.} 19 | 20 | \item{fragment}{An optional fragment to be prepended to the identifier for schemes that support it (not all do).} 21 | } 22 | \value{ 23 | the character string of the generated unique identifier 24 | } 25 | \description{ 26 | Creating objects requires use of a unique persistent identifier (pid) when calling the create 27 | function. Member Nodes may optionally provide the generateIdentifier service to issue such identifiers, 28 | ensuring that they are unique. Each identifier conforms to an identifier scheme, which determines the syntax and 29 | rules for how the identifier that is generated is formatted. All Member Nodes that implement this method must 30 | support the UUID scheme, but may also support other schemes such as DOI and others. 31 | } 32 | \details{ 33 | In the version 2.0 library and higher, this operation can utilize an 34 | 'dataone_token' option to provide credentials for write operations in DataONE. 35 | The authentication token is obtained from DataONE (see your profile on https://search.dataone.org). 36 | See the \code{vignette("dataone-overview")} for details. 37 | Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file 38 | system can also be used. This certificate provides authentication credentials from 39 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{vignette("dataone-overview")} for details. 40 | } 41 | \examples{ 42 | \dontrun{ 43 | library(dataone) 44 | cn <- CNode("STAGING") 45 | mn <- getMNode(cn, "urn:node:mnStageUCSB2") 46 | newid <- generateIdentifier(mn, "UUID") 47 | } 48 | } 49 | \seealso{ 50 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MNStorage.generateIdentifier} 51 | } 52 | -------------------------------------------------------------------------------- /man/getAuthExpires.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getAuthExpires} 4 | \alias{getAuthExpires} 5 | \alias{getAuthExpires,AuthenticationManager-method} 6 | \title{Get the expiration date of the current authentication method.} 7 | \usage{ 8 | getAuthExpires(.Object, node) 9 | 10 | \S4method{getAuthExpires}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | 15 | \item{node}{A D1Node instance} 16 | } 17 | \value{ 18 | The expiration date for the current authentication mechanism being used. 19 | } 20 | \description{ 21 | The expiration date of the current authentication method, either 22 | authentication token or X.509 certificate, is returned as a Greenwich Mean Time (GMT) value. 23 | } 24 | -------------------------------------------------------------------------------- /man/getAuthMethod.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getAuthMethod} 4 | \alias{getAuthMethod} 5 | \alias{getAuthMethod,AuthenticationManager-method} 6 | \title{Get the current valid authentication mechanism.} 7 | \usage{ 8 | getAuthMethod(.Object, ...) 9 | 10 | \S4method{getAuthMethod}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{node}{A D1Node instance to determine the authentication method for.} 18 | } 19 | \value{ 20 | The current authentication mechanism as a character string, either "token" or "cert". 21 | } 22 | \description{ 23 | Get the current valid authentication mechanism. 24 | } 25 | \details{ 26 | The current authentication method being used, either an authentication token or an X.509 certificate. The \code{'node'} 27 | argument is used to determine the authentication mechanism that is appropriate for the specified \code{'node'}. 28 | For example, authentication tokens are supported on DataONE nodes that use the DataONE V2.0 API or higher, so if the 29 | node uses the V1 API, then only an X.509 certificate can be used. 30 | } 31 | -------------------------------------------------------------------------------- /man/getAuthSubject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getAuthSubject} 4 | \alias{getAuthSubject} 5 | \alias{getAuthSubject,AuthenticationManager-method} 6 | \title{Get the authentication subject.} 7 | \usage{ 8 | getAuthSubject(.Object, ...) 9 | 10 | \S4method{getAuthSubject}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{an AuthenticationManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{node}{A D1Node instance} 18 | } 19 | \value{ 20 | the DataONE Subject that is your client's identity 21 | } 22 | \description{ 23 | Get the authentication subject. 24 | } 25 | \details{ 26 | The authenticated user, aka 'subject' is retrieved from the authentication mechanism 27 | currently being used, either an authentication token or an X.509 certificate. The \code{'node'} 28 | argument is used to determine the authentication mechanism that is appropriate for the specified \code{'node'}. 29 | For example, authentication tokens are supported on DataONE nodes that use the DataONE V2.0 API or higher, so if the 30 | node uses the V1 API, then only an X.509 certificate can be used. 31 | } 32 | -------------------------------------------------------------------------------- /man/getCN.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getCN} 4 | \alias{getCN} 5 | \alias{getCN,D1Client-method} 6 | \title{Get the coordinating node associated with this D1Client object.} 7 | \usage{ 8 | getCN(x) 9 | 10 | \S4method{getCN}{D1Client}(x) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | } 15 | \description{ 16 | Get the coordinating node associated with this D1Client object. 17 | } 18 | \note{ 19 | The method getCN has been deprecated. 20 | } 21 | \examples{ 22 | \dontrun{ 23 | cli <- D1Client("STAGING2", "urn:node:mnTestKNB") 24 | testCN <- getCN(cli) 25 | } 26 | } 27 | \seealso{ 28 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 29 | } 30 | -------------------------------------------------------------------------------- /man/getCapabilities.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{getCapabilities} 4 | \alias{getCapabilities} 5 | \alias{getCapabilities,MNode-method} 6 | \title{Get the node capabilities description, and store the information in the MNode.} 7 | \usage{ 8 | getCapabilities(x, ...) 9 | 10 | \S4method{getCapabilities}{MNode}(x) 11 | } 12 | \arguments{ 13 | \item{x}{The node identifier with which this node is registered in DataONE} 14 | 15 | \item{...}{(Not yet used.)} 16 | } 17 | \value{ 18 | an XMLInternalDocument object representing the DataONE environment 19 | } 20 | \description{ 21 | Access the DataONE getCapabilities() service for the Member Node, which returns an XML 22 | description of the repository and the services it offers. 23 | } 24 | \examples{ 25 | \dontrun{ 26 | library(dataone) 27 | cn <- CNode() 28 | mn <- getMNode(cn, "urn:node:KNB") 29 | xml <- getCapabilities(mn) 30 | } 31 | } 32 | \seealso{ 33 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MN_core.getCapabilities} 34 | } 35 | -------------------------------------------------------------------------------- /man/getCert.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getCert} 4 | \alias{getCert} 5 | \alias{getCert,AuthenticationManager-method} 6 | \title{Get the DataONE X.509 Certificate location.} 7 | \usage{ 8 | getCert(.Object, ...) 9 | 10 | \S4method{getCert}{AuthenticationManager}(.Object) 11 | } 12 | \arguments{ 13 | \item{.Object}{an AuthenticationManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | The filename of the current DataONE X.509 Certificate if it is available. 19 | } 20 | \description{ 21 | Get the DataONE X.509 Certificate location. 22 | } 23 | -------------------------------------------------------------------------------- /man/getCertExpires.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{getCertExpires} 4 | \alias{getCertExpires} 5 | \alias{getCertExpires,CertificateManager-method} 6 | \title{Show the date and time when an X.509 certificate expires.} 7 | \usage{ 8 | getCertExpires(x, ...) 9 | 10 | \S4method{getCertExpires}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | POSIXct value 19 | } 20 | \description{ 21 | Each X.509 has a range of certificate validity times. This method returns the X.509 22 | \code{'notAfter'} field formatted as a \code{'POSIXct'} date value. 23 | } 24 | -------------------------------------------------------------------------------- /man/getCertInfo.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getCertInfo} 4 | \alias{getCertInfo} 5 | \alias{getCertInfo,AuthenticationManager-method} 6 | \title{Get X.509 Certificate information} 7 | \usage{ 8 | getCertInfo(.Object) 9 | 10 | \S4method{getCertInfo}{AuthenticationManager}(.Object) 11 | } 12 | \arguments{ 13 | \item{.Object}{an Authentication Object.} 14 | } 15 | \value{ 16 | A data.frame containing information about the X.509 certificate. 17 | } 18 | \description{ 19 | The DataONE X.509 certificate is read, if it is present and the 20 | information contained in the certificate is returned as a data.frame. 21 | } 22 | -------------------------------------------------------------------------------- /man/getCertLocation.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{getCertLocation} 4 | \alias{getCertLocation} 5 | \alias{getCertLocation,CertificateManager-method} 6 | \title{Get the file path on disk of the client certificate file.} 7 | \usage{ 8 | getCertLocation(x, ...) 9 | 10 | \S4method{getCertLocation}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | character the path to the certificate 19 | } 20 | \description{ 21 | Find the location of the client certificate, which is typically in a default 22 | location on disk, unless the \code{'location'} slot has been set with a custom location for 23 | the certificate. 24 | } 25 | \details{ 26 | The default Globus Grid Security Infrastructure (GSI) location is \code{'/tmp/x509up_u${UID}'} 27 | on Unix or \code{'${tmpdir}/x509up_u${UID}'} on Windows or \code{'${tmpdir}/x509up_u${user.name}'} 28 | if \code{'${UID}'} is not defined. 29 | } 30 | -------------------------------------------------------------------------------- /man/getChecksum.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R, R/CNode.R, R/MNode.R 3 | \name{getChecksum} 4 | \alias{getChecksum} 5 | \alias{getChecksum,CNode-method} 6 | \alias{getChecksum,MNode-method} 7 | \title{Get the checksum for the data object associated with the specified pid.} 8 | \usage{ 9 | getChecksum(x, ...) 10 | 11 | \S4method{getChecksum}{CNode}(x, pid, ...) 12 | 13 | \S4method{getChecksum}{MNode}(x, pid, checksumAlgorithm = "SHA-256") 14 | } 15 | \arguments{ 16 | \item{x}{The CNode instance from which the checksum will be retrieved} 17 | 18 | \item{...}{(Not yet used)} 19 | 20 | \item{pid}{The identifier of the object} 21 | 22 | \item{checksumAlgorithm}{The algorithm used to calculate the checksum. Default="SHA-256"} 23 | } 24 | \value{ 25 | character the checksum value, with the checksum algorithm as the attribute "algorithm" 26 | } 27 | \description{ 28 | A checksum is calculated for an object when it is uploaded to DataONE and 29 | is submitted with the object's system metadata. The \code{'getChecksum'} method retrieves 30 | the checksum from the specified coordinating node 31 | } 32 | \examples{ 33 | \dontrun{ 34 | library(dataone) 35 | cn <- CNode() 36 | mn <- getMNode(cn, "urn:node:KNB") 37 | pid <- "doi:10.5063/F1QN64NZ" 38 | chksum <- getChecksum(mn, pid) 39 | } 40 | \dontrun{ 41 | pid <- "doi:10.5063/F1QN64NZ" 42 | cn <- CNode() 43 | pid <- "doi:10.5063/F1QN64NZ" 44 | chksum <- getChecksum(cn, pid) 45 | } 46 | } 47 | \seealso{ 48 | \code{\link{D1Node-class}{D1Node}}{ class description.} 49 | } 50 | -------------------------------------------------------------------------------- /man/getD1Object.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getD1Object} 4 | \alias{getD1Object} 5 | \alias{getD1Object,D1Client-method} 6 | \title{Download a data object from the DataONE Federation.} 7 | \usage{ 8 | getD1Object(x, identifier, ...) 9 | 10 | \S4method{getD1Object}{D1Client}(x, identifier) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client instance} 14 | 15 | \item{identifier}{The identifier of the object to download from DataONE} 16 | 17 | \item{...}{(not yet used)} 18 | } 19 | \value{ 20 | A datapack:DataObject 21 | } 22 | \description{ 23 | An object is download from the DataONE network for the identifier that is provided. 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | d1c <- D1Client("PROD", "urn:node:KNB") 29 | pid <- "solson.5.1" 30 | dataObj <- getD1Object(d1c, pid) 31 | data <- getData(dataObj) 32 | } 33 | } 34 | \seealso{ 35 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 36 | } 37 | -------------------------------------------------------------------------------- /man/getData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{getData,D1Object-method} 4 | \alias{getData,D1Object-method} 5 | \title{Get the data content of a D1Object.} 6 | \usage{ 7 | \S4method{getData}{D1Object}(x) 8 | } 9 | \arguments{ 10 | \item{x}{D1Object the data structure from where to get the data} 11 | } 12 | \description{ 13 | Get the data content of a D1Object. 14 | } 15 | -------------------------------------------------------------------------------- /man/getDataObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getDataObject} 4 | \alias{getDataObject} 5 | \alias{getDataObject,D1Client-method} 6 | \title{Download a file (and it's associated system metadata) from the DataONE Federation as a DataObject.} 7 | \usage{ 8 | getDataObject(x, identifier, ...) 9 | 10 | \S4method{getDataObject}{D1Client}( 11 | x, 12 | identifier, 13 | lazyLoad = FALSE, 14 | limit = "1MB", 15 | quiet = TRUE, 16 | checksumAlgorithm = as.character(NA) 17 | ) 18 | } 19 | \arguments{ 20 | \item{x}{A D1Client object.} 21 | 22 | \item{identifier}{The identifier of the object to get.} 23 | 24 | \item{...}{(not yet used)} 25 | 26 | \item{lazyLoad}{A \code{logical} value. If TRUE, then only package member system metadata is downloaded and not data.} 27 | 28 | \item{limit}{A \code{character} value specifying maximum package member size to download. Specified with "KB", "MB" or "TB" 29 | for example: "100KB", "10MB", "20GB", "1TB". The default is "1MB". Only takes effect if 'lazyLoad=FALSE'.} 30 | 31 | \item{quiet}{A \code{'logical'}. If TRUE (the default) then informational messages will not be printed.} 32 | 33 | \item{checksumAlgorithm}{A \code{character} value specifying the algorithm to use to re-calculate (after download) the system metadata checksum 34 | for the object's data bytes for example: "SHA-256". The default is "NA", which specifies that this 35 | re-calculation will not be performed.} 36 | } 37 | \value{ 38 | A DataObject or NULL if the object was not found in DataONE 39 | } 40 | \description{ 41 | A convenience method to download a data object and its associated SystemMetadata, wrapped 42 | in a DataObject class. 43 | } 44 | \details{ 45 | This method performs multiple underlying calls to the DataONE repository network. 46 | CN.resolve() is called to locate the object on one or more repositories, and then each of these 47 | is accessed until the associated SystemMetadata and data bytes are successfully downloaded. This 48 | data is then used to construct the returned DataObject. This function replaces the previous 49 | getD1Object() method in the version 1 50 | dataone library. \cr\cr 51 | The \code{lazyLoad} parameter controls whether the data byes for a DataONE item are downloaded (the system 52 | metadata is always downloaded). When \code{lazyLoad}=FALSE,the \code{limit} parameter can be used to specify 53 | the maximum size of a data file that will be downloaded. If \code{lazyLoad} is TRUE, then \code{limit} 54 | is ignored. The \code{lazyLoad} and \code{limit} can be used together in the following ways: 55 | 56 | \tabular{lllll}{ 57 | \tab 'lazyLoad' \tab 'limit' \tab result \tab comments \cr 58 | \tab ---------- \tab ------- \tab ------ \tab --------------------- \cr 59 | \tab TRUE \tab Any value \tab Data bytes are not downloaded \tab The 'limit' parameter is ignored \cr 60 | \tab FALSE \tab Not specified \tab Data bytes are download if less than 1MB \tab The default 'limit' of 1MB is used \cr 61 | \tab FALSE \tab 10MB \tab Data bytes are downloaded if less than 10MB \tab The specified 'limit' values is used \cr 62 | } 63 | 64 | Note that DataONE system metadata is always downloaded and populated into the resulting DataObject, regardless 65 | of the 'lazyLoad' and 'limit' values specified in the call to 'getDataObject()'. 66 | } 67 | \examples{ 68 | \dontrun{ 69 | library(dataone) 70 | d1c <- D1Client("PROD", "urn:node:KNB") 71 | pid <- "solson.5.1" 72 | obj <- getDataObject(d1c, pid) 73 | data <- getData(obj) 74 | } 75 | } 76 | \seealso{ 77 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 78 | } 79 | -------------------------------------------------------------------------------- /man/getDataPackage.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getDataPackage} 4 | \alias{getDataPackage} 5 | \alias{getDataPackage,D1Client-method} 6 | \title{Download data from the DataONE Federation as a DataPackage.} 7 | \usage{ 8 | getDataPackage(x, identifier, ...) 9 | 10 | \S4method{getDataPackage}{D1Client}( 11 | x, 12 | identifier, 13 | lazyLoad = FALSE, 14 | limit = "1MB", 15 | quiet = TRUE, 16 | checksumAlgorithm = as.character(NA) 17 | ) 18 | } 19 | \arguments{ 20 | \item{x}{A D1Client object.} 21 | 22 | \item{identifier}{The identifier of a package, package metadata or other package member} 23 | 24 | \item{...}{(not yet used)} 25 | 26 | \item{lazyLoad}{A \code{logical} value. If TRUE, then only package member system metadata is downloaded and not data. 27 | The default is \code{FALSE}.} 28 | 29 | \item{limit}{A \code{character} value specifying maximum package member size to download. Specified with "KB", "MB" or "TB" 30 | for example: "100KB", "10MB", "20GB", "1TB". The default is "1MB". Only takes effect if 'lazyLoad=FALSE'.} 31 | 32 | \item{quiet}{A \code{'logical'}. If TRUE (the default) then informational messages will not be printed.} 33 | 34 | \item{checksumAlgorithm}{A \code{character} value specifying the algorithm to use to re-calculate (after download) the system metadata checksum 35 | for the object's data bytes for example: "SHA-256". The default is "NA", which specifies that this re-calculation will not be performed.} 36 | } 37 | \value{ 38 | A DataPackage or NULL if the package was not found in DataONE 39 | } 40 | \description{ 41 | This is convenience method that will download all the members in a DataONE data package 42 | and insert them into a DataPackage, including associated SystemMetadata for each package 43 | member. 44 | } 45 | \details{ 46 | A 'data package' that resides on a DataONE member node is defined as a collection of 47 | digital objects that are described by a metadata document. \cr\cr 48 | The \code{lazyLoad} parameter controls whether the data bytes for a DataONE package member are downloaded (the system 49 | metadata is always downloaded). When \code{lazyLoad}=FALSE, the \code{limit} parameter can be used to specify 50 | the maximum size of a data file that will be downloaded. If \code{lazyLoad} is TRUE, then \code{limit} 51 | is ignored. The \code{lazyLoad} and \code{limit} parameters can be used together in the following ways: 52 | 53 | \tabular{lllll}{ 54 | \tab 'lazyLoad' \tab 'limit' \tab result \tab comments \cr 55 | \tab ---------- \tab ------- \tab ------ \tab --------------------- \cr 56 | \tab TRUE \tab Any value \tab Data bytes are not downloaded \tab The 'limit' parameter is ignored \cr 57 | \tab FALSE \tab Not specified \tab Data bytes are download if less than 1MB \tab The default 'limit' of 1MB is used \cr 58 | \tab FALSE \tab 10MB \tab Data bytes are downloaded if less than 10MB \tab The specified 'limit' values is used \cr 59 | } 60 | } 61 | \examples{ 62 | \dontrun{ 63 | library(dataone) 64 | d1c <- D1Client("PROD", "urn:node:KNB") 65 | pid <- "solson.5.1" 66 | pkg <- getDataPackage(d1c, pid) 67 | } 68 | } 69 | \seealso{ 70 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 71 | } 72 | -------------------------------------------------------------------------------- /man/getEndpoint.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getEndpoint} 4 | \alias{getEndpoint} 5 | \alias{getEndpoint,D1Client-method} 6 | \title{Return the URL endpoint for the DataONE Coordinating Node.} 7 | \usage{ 8 | getEndpoint(x, ...) 9 | 10 | \S4method{getEndpoint}{D1Client}(x) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object} 14 | 15 | \item{...}{(Not yet used.)} 16 | } 17 | \value{ 18 | A character vector containing the URL of the Coordinating Node 19 | } 20 | \description{ 21 | A D1Client object is associated with a DataONE Coordinating Node. This 22 | CN is either the production CN (from the "PROD" environment, the default), or a CN from one 23 | of the development environments ("STAGING", "SANDBOX", "DEV"). The base URL for the CN 24 | is returned. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | cli <- D1Client("STAGING2", "urn:node:mnTestKNB") 29 | cnUrl <- getEndpoint(cli) 30 | } 31 | } 32 | \seealso{ 33 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 34 | } 35 | -------------------------------------------------------------------------------- /man/getErrorDescription.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{getErrorDescription} 4 | \alias{getErrorDescription} 5 | \title{Extract an error message from an http response.} 6 | \usage{ 7 | getErrorDescription(response) 8 | } 9 | \arguments{ 10 | \item{response}{The httr response object to extract the error description from.} 11 | } 12 | \description{ 13 | Http requests can fail 14 | for a variety of reasons, so getErrorDescription first tries to 15 | determine what type of response was sent. 16 | } 17 | \details{ 18 | The return types handled by this function are: 19 | o An incorrect url is sent to DataONE and an error is returned by 20 | the web server, not a specified DataONE service url. In this case, 21 | a generic error message may be returned, e.g. status=404, URL not found 22 | o A DataONE service was called, and returned an error message. In this 23 | case the DataONE response is parsed in an attempt to retrieve a 24 | meaningful error message. 25 | } 26 | -------------------------------------------------------------------------------- /man/getFormat.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{getFormat} 4 | \alias{getFormat} 5 | \alias{getFormat,CNode-method} 6 | \title{Get information for a single DataONE object format} 7 | \usage{ 8 | getFormat(x, ...) 9 | 10 | \S4method{getFormat}{CNode}(x, formatId) 11 | } 12 | \arguments{ 13 | \item{x}{A CNode object instance} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{formatId}{The formatId to retrieve.} 18 | } 19 | \value{ 20 | A dataframe of all object formats registered in the DataONE Object Format Vocabulary. 21 | } 22 | \description{ 23 | Get information for a single DataONE object format 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | cn <- CNode() 29 | fmt <- getFormat(cn, "eml://ecoinformatics.org/eml-2.1.0") 30 | cat(sprintf("format name: \%s\n", fmt$name)) 31 | cat(sprintf("format type: \%s\n", fmt$type)) 32 | cat(sprintf("format Id: \%s\n", fmt$id)) 33 | } 34 | } 35 | \seealso{ 36 | \code{\link[=CNode-class]{CNode}}{ class description.} 37 | } 38 | -------------------------------------------------------------------------------- /man/getFormatId.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{getFormatId,D1Object-method} 4 | \alias{getFormatId,D1Object-method} 5 | \title{Get the FormatId of the D1Object} 6 | \usage{ 7 | \S4method{getFormatId}{D1Object}(x) 8 | } 9 | \arguments{ 10 | \item{x}{D1Object} 11 | } 12 | \value{ 13 | the formatId 14 | } 15 | \description{ 16 | Get the FormatId of the D1Object 17 | } 18 | -------------------------------------------------------------------------------- /man/getIdentifier.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{getIdentifier,D1Object-method} 4 | \alias{getIdentifier,D1Object-method} 5 | \title{Get the Identifier of the D1Object} 6 | \usage{ 7 | \S4method{getIdentifier}{D1Object}(x) 8 | } 9 | \arguments{ 10 | \item{x}{D1Object} 11 | } 12 | \value{ 13 | the identifier 14 | } 15 | \description{ 16 | Get the Identifier of the D1Object 17 | } 18 | -------------------------------------------------------------------------------- /man/getMN.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getMN} 4 | \alias{getMN} 5 | \alias{getMN,D1Client,ANY-method} 6 | \alias{getMN,D1Client,character-method} 7 | \title{Get a member node client based on its node identifier.} 8 | \usage{ 9 | getMN(x, nodeid, ...) 10 | 11 | \S4method{getMN}{D1Client,ANY}(x, nodeid, ...) 12 | 13 | \S4method{getMN}{D1Client,character}(x, nodeid) 14 | } 15 | \arguments{ 16 | \item{x}{A D1Client object.} 17 | 18 | \item{nodeid}{The identifier of the node to retrieve.} 19 | 20 | \item{...}{(Not yet used)} 21 | } 22 | \description{ 23 | Get a member node client based on its node identifier. 24 | } 25 | \note{ 26 | This method has been superceded by \code{\link{getMNodeId}} 27 | } 28 | \examples{ 29 | \dontrun{ 30 | cli <- D1Client("STAGING2", "urn:node:mnTestKNB") 31 | testMN <- getMN(cli) 32 | } 33 | } 34 | \seealso{ 35 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 36 | } 37 | -------------------------------------------------------------------------------- /man/getMNode.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{getMNode} 4 | \alias{getMNode} 5 | \alias{getMNode,CNode-method} 6 | \title{Get a reference to a node based on its identifier} 7 | \usage{ 8 | getMNode(x, ...) 9 | 10 | \S4method{getMNode}{CNode}(x, nodeid) 11 | } 12 | \arguments{ 13 | \item{x}{The coordinating node to query for its registered Member Nodes} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{nodeid}{The standard identifier string for this node} 18 | } 19 | \value{ 20 | the Member Node as an MNode reference, or NULL if not found 21 | } 22 | \description{ 23 | Get a reference to a node based on its identifier 24 | } 25 | \details{ 26 | For an explanation of DataONE Coordinating Nodes and Member Node 27 | identifiers, see the section \emph{"DataONE Environments"} in the overview vignette 28 | by entering the R command: \code{vignette("dataone-overview")}. 29 | } 30 | \examples{ 31 | \dontrun{ 32 | cn <- CNode() 33 | mn <- getMNode(cn, "urn:node:KNB") 34 | } 35 | } 36 | \seealso{ 37 | \code{\link[=CNode-class]{CNode}}{ class description.} 38 | } 39 | -------------------------------------------------------------------------------- /man/getMNodeId.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getMNodeId} 4 | \alias{getMNodeId} 5 | \alias{getMNodeId,D1Client-method} 6 | \title{Get the member node identifier associated with this D1Client object..} 7 | \usage{ 8 | getMNodeId(x) 9 | 10 | \S4method{getMNodeId}{D1Client}(x) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | } 15 | \value{ 16 | The Member Node identifier as a character vector 17 | } 18 | \description{ 19 | One Member Node can be associated with the client as the default to which 20 | data and metadata are written. 21 | } 22 | \examples{ 23 | \dontrun{ 24 | cli <- D1Client("STAGING2", "urn:node:mnTestKNB") 25 | mn <- getMNodeId(cli) 26 | } 27 | } 28 | \seealso{ 29 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 30 | } 31 | -------------------------------------------------------------------------------- /man/getMetadataMember.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{getMetadataMember} 4 | \alias{getMetadataMember} 5 | \alias{getMetadataMember,D1Client,DataPackage-method} 6 | \title{Get the DataObject containing package metadata} 7 | \usage{ 8 | getMetadataMember(x, dp, ...) 9 | 10 | \S4method{getMetadataMember}{D1Client,DataPackage}(x, dp, as = "character", ...) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object} 14 | 15 | \item{dp}{A DataPackage object} 16 | 17 | \item{...}{(Additional arguments, Not yet used.)} 18 | 19 | \item{as}{A value of type \code{"character"} that specifies the return value. Possible values are \code{"character"} (the default) or \code{"DataPackage"}.} 20 | } 21 | \value{ 22 | The identifier of the metadata object 23 | } 24 | \description{ 25 | Each DataObject in the DataPackage is inspected to see if it matches one 26 | of the formats supported by DataONE for metadata. If a package member's format matches 27 | one of the supported formats, the identifier for that member is returned. 28 | } 29 | \details{ 30 | This method calls the DataONE CN 'format' service to obtain the current format 31 | list. 32 | } 33 | -------------------------------------------------------------------------------- /man/getObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R, R/CNode.R, R/MNode.R 3 | \name{getObject} 4 | \alias{getObject} 5 | \alias{getObject,CNode-method} 6 | \alias{getObject,MNode-method} 7 | \title{Get the bytes associated with an object on this Node.} 8 | \usage{ 9 | getObject(x, ...) 10 | 11 | \S4method{getObject}{CNode}(x, pid) 12 | 13 | \S4method{getObject}{MNode}(x, pid, check = as.logical(FALSE)) 14 | } 15 | \arguments{ 16 | \item{x}{The Node instance from which the pid will be downloaded} 17 | 18 | \item{...}{(Not yet used).} 19 | 20 | \item{pid}{The identifier of the object to be downloaded} 21 | 22 | \item{check}{A logical value, if TRUE check if this object has been obsoleted by another object in DataONE.} 23 | } 24 | \value{ 25 | the bytes of the object 26 | } 27 | \description{ 28 | Get the bytes associated with an object on this Node. 29 | } 30 | \details{ 31 | This operation acts as the 'public' anonymous user unless an X.509 certificate is 32 | present in the default location of the file system, in which case the access will be authenticated. 33 | } 34 | \examples{ 35 | \dontrun{ 36 | library(dataone) 37 | cn <- CNode() 38 | mn <- getMNode(cn, "urn:node:KNB") 39 | pid <- "solson.5.1" 40 | obj <- getObject(mn, pid) 41 | df <- read.csv(text=rawToChar(obj)) 42 | } 43 | } 44 | \seealso{ 45 | \code{\link{D1Node-class}{D1Node}}{ class description.} 46 | } 47 | -------------------------------------------------------------------------------- /man/getPackage.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{getPackage} 4 | \alias{getPackage} 5 | \alias{getPackage,MNode-method} 6 | \title{Download a data package from a member node.} 7 | \usage{ 8 | getPackage(x, ...) 9 | 10 | \S4method{getPackage}{MNode}( 11 | x, 12 | identifier, 13 | format = "application/bagit-097", 14 | dirPath = NULL, 15 | unzip = FALSE 16 | ) 17 | } 18 | \arguments{ 19 | \item{x}{A MNode instance representing a DataONE Member Node repository.} 20 | 21 | \item{...}{(not yet used)} 22 | 23 | \item{identifier}{The identifier of the package to retrieve. The identifier can be for the 24 | resource map, metadata file, data file, or any other package member.} 25 | 26 | \item{format}{The format to send the package in.} 27 | 28 | \item{dirPath}{The directory path to save the package to.} 29 | 30 | \item{unzip}{(logical) If the dirPath is specified, the package can also be unzipped automatically (unzip=TRUE).} 31 | } 32 | \value{ 33 | The location of the package file downloaded from the member node. 34 | } 35 | \description{ 36 | Given a valid identifier, download a file containing all of the package 37 | members of the corresponding DataONE data package. 38 | } 39 | \details{ 40 | The default data package file format is a Bagit file (\url{https://tools.ietf.org/html/draft-kunze-bagit-09}). 41 | The downloaded package file is compressed using the ZIP format and will be located in an R session temporary 42 | file. Other packaging formats can be requested if they have been implemented by the requested member node. 43 | } 44 | \examples{ 45 | \dontrun{ 46 | cn <- CNode() 47 | mn <- getMNode(cn, "urn:node:KNB") 48 | packageFileName <- getPackage(mn, id="resourceMap_Blandy.76.2") 49 | } 50 | } 51 | \seealso{ 52 | \code{\link[=MNode-class]{MNode}}{ class description.} 53 | } 54 | -------------------------------------------------------------------------------- /man/getQueryEngineDescription.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{getQueryEngineDescription} 4 | \alias{getQueryEngineDescription} 5 | \alias{getQueryEngineDescription,D1Node-method} 6 | \title{Query a node for the list of query engines available on the node} 7 | \usage{ 8 | getQueryEngineDescription(x, ...) 9 | 10 | \S4method{getQueryEngineDescription}{D1Node}(x, queryEngineName) 11 | } 12 | \arguments{ 13 | \item{x}{The CNode or MNode to query} 14 | 15 | \item{...}{(Additional arguments - not yet used.)} 16 | 17 | \item{queryEngineName}{The query engine name to get a description for.} 18 | } 19 | \value{ 20 | list The query engine description 21 | } 22 | \description{ 23 | Query a node for the list of query engines available on the node 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | cn <- CNode("PROD") 29 | engineDesc <- getQueryEngineDescription(cn, "solr") 30 | cat(sprintf("Query engine version: \%s\n", engineDesc$queryEngineVersion)) 31 | cat(sprintf("Query engine name: \%s\n", engineDesc$name)) 32 | engineDesc <- getQueryEngineDescription(cn, "solr") 33 | head(engineDesc$queryFields, n=3L) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /man/getSystemMetadata.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R, R/CNode.R, R/MNode.R 3 | \name{getSystemMetadata} 4 | \alias{getSystemMetadata} 5 | \alias{getSystemMetadata,CNode-method} 6 | \alias{getSystemMetadata,MNode-method} 7 | \title{Get the metadata describing system properties associated with an object on this Node.} 8 | \usage{ 9 | getSystemMetadata(x, ...) 10 | 11 | \S4method{getSystemMetadata}{CNode}(x, pid) 12 | 13 | \S4method{getSystemMetadata}{MNode}(x, pid) 14 | } 15 | \arguments{ 16 | \item{x}{The Node instance from which the SystemMetadata will be downloaded} 17 | 18 | \item{...}{(Not yet used.)} 19 | 20 | \item{pid}{The identifier of the object} 21 | } 22 | \value{ 23 | SystemMetadata for the object 24 | 25 | SystemMetadata for the object 26 | } 27 | \description{ 28 | The SystemMetadata includes information about the identity, type, access control, and other system 29 | level details about the object. 30 | 31 | The SystemMetadata includes information about the identity, type, access control, and other system 32 | level details about the object. 33 | } 34 | \details{ 35 | This operation acts as the 'public' anonymous user unless an X.509 certificate is 36 | present in the default location of the file system, in which case the access will be authenticated. 37 | 38 | This operation acts as the 'public' anonymous user unless an X.509 certificate is 39 | present in the default location of the file system, in which case the access will be authenticated. 40 | } 41 | \examples{ 42 | \dontrun{ 43 | library(dataone) 44 | cn <- CNode() 45 | mn <- getMNode(cn, "urn:node:KNB") 46 | pid <- "doi:10.5063/F1QN64NZ" 47 | sysmeta <- getSystemMetadata(mn, pid) 48 | } 49 | \dontrun{ 50 | library(dataone) 51 | cn <- CNode() 52 | pid <- "aceasdata.3.2" 53 | sysmeta <- getSystemMetadata(cn, pid) 54 | } 55 | } 56 | \seealso{ 57 | \code{\link[=CNode-class]{CNode}}{ class description.} 58 | } 59 | -------------------------------------------------------------------------------- /man/getToken.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getToken} 4 | \alias{getToken} 5 | \alias{getToken,AuthenticationManager-method} 6 | \title{Get the value of the DataONE Authentication Token, if one exists.} 7 | \usage{ 8 | getToken(.Object, ...) 9 | 10 | \S4method{getToken}{AuthenticationManager}(.Object, node = as.character(NA)) 11 | } 12 | \arguments{ 13 | \item{.Object}{an AuthenticationManager instance} 14 | 15 | \item{...}{additional parameters} 16 | 17 | \item{node}{either a CNode or MNode object to get the appropriate token for.} 18 | } 19 | \value{ 20 | The current authentication token. 21 | } 22 | \description{ 23 | Get the value of the DataONE Authentication Token, if one exists. 24 | } 25 | \details{ 26 | A token value is retrieved based on the DataONE environment that the specified node is 27 | located in, either the production environment or a test environment. 28 | } 29 | -------------------------------------------------------------------------------- /man/getTokenInfo.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{getTokenInfo} 4 | \alias{getTokenInfo} 5 | \alias{getTokenInfo,AuthenticationManager-method} 6 | \title{Get authentication token information} 7 | \usage{ 8 | getTokenInfo(.Object) 9 | 10 | \S4method{getTokenInfo}{AuthenticationManager}(.Object) 11 | } 12 | \arguments{ 13 | \item{.Object}{an Authentication Object.} 14 | } 15 | \value{ 16 | A data.frame containing information about the authentication token. 17 | } 18 | \description{ 19 | The DataONE authentication token is read, if it has been 20 | set, and the information it contains is returned as a data.frame. 21 | } 22 | -------------------------------------------------------------------------------- /man/get_user_agent.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/auth_request.R 3 | \name{get_user_agent} 4 | \alias{get_user_agent} 5 | \title{User agent string} 6 | \usage{ 7 | get_user_agent() 8 | } 9 | \description{ 10 | Get a string representation of the user agent to be sent to the server along 11 | with other request details. 12 | } 13 | -------------------------------------------------------------------------------- /man/hasReservation.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{hasReservation} 4 | \alias{hasReservation} 5 | \alias{hasReservation,CNode-method} 6 | \title{Checks to determine if the supplied subject is the owner of the reservation of id.} 7 | \usage{ 8 | hasReservation(x, ...) 9 | 10 | \S4method{hasReservation}{CNode}(x, pid, subject = as.character(NA)) 11 | } 12 | \arguments{ 13 | \item{x}{A CNode instance.} 14 | 15 | \item{...}{Additional parameters.} 16 | 17 | \item{pid}{The identifier that is being checked for existing as a reserved identifier or is in use as 18 | an identifier for an existing object} 19 | 20 | \item{subject}{The subject of the principal (user) that made the reservation.} 21 | } 22 | \value{ 23 | A logical value where TRUE means a reservation exists for the specified pid by the subject. 24 | } 25 | \description{ 26 | The hasReservation method checks the reservation of an identifier that has 27 | previously been reserved with the \code{reserveIdentifier} method. The identifier must have 28 | been reserved by the specified DataONE user identity (\code{subject}). 29 | } 30 | \details{ 31 | To determine the DataONE identity that is currently being used for DataONE 32 | authentication, use the \code{echoCredentials} method. 33 | } 34 | \examples{ 35 | \dontrun{ 36 | library(dataone) 37 | cn <- CNode("STAGING") 38 | creds <- echoCredentials(cn) 39 | subject <- creds$person$subject 40 | # Previously reserved pid (using reserveIdentifeir()), e.g. DOI or uuid 41 | pid <- "urn:node:e27bb4f3-96bb-4af4-8902-f5914def077c" 42 | hasRes <- hasReservation(cn, pid, subject=subject) 43 | } 44 | } 45 | \seealso{ 46 | \code{\link[=CNode-class]{CNode}}{ class description.} 47 | } 48 | -------------------------------------------------------------------------------- /man/isAuthExpired.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{isAuthExpired} 4 | \alias{isAuthExpired} 5 | \alias{isAuthExpired,AuthenticationManager-method} 6 | \title{Check if the currently valid authentication method has reached the expiration time.} 7 | \usage{ 8 | isAuthExpired(.Object, ...) 9 | 10 | \S4method{isAuthExpired}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{node}{A D1Node instance} 18 | } 19 | \value{ 20 | A logical value: TRUE if authentication has expired, FALSE if not. 21 | } 22 | \description{ 23 | Check if the currently valid authentication method has reached the expiration time. 24 | } 25 | -------------------------------------------------------------------------------- /man/isAuthValid.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{isAuthValid} 4 | \alias{isAuthValid} 5 | \alias{isAuthValid,AuthenticationManager-method} 6 | \title{Verify authentication for a member node.} 7 | \usage{ 8 | isAuthValid(.Object, ...) 9 | 10 | \S4method{isAuthValid}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | 15 | \item{...}{additional parameters} 16 | 17 | \item{node}{The node object (MNode or CNode) that authentication is being checked for.} 18 | } 19 | \value{ 20 | A logical value: TRUE if authentication is valid, false if not. 21 | } 22 | \description{ 23 | The currently used DataONE client authentication method (either tokens or X.509 certificates) 24 | is checked and verified for the specified node (either CN or MN). If an authentication token is available 25 | via the R options facility, it will be used i.e. available via getOption("dataone_token"). However, 26 | authentication tokens can only be used for DataONE v2 or higher nodes. X.509 certificates can be used 27 | with DataONE v1 or higher nodes. 28 | See the \emph{"dataone"} vignette \emph{"dataone-overview"} for more information on authentication. 29 | } 30 | -------------------------------------------------------------------------------- /man/isAuthorized.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{isAuthorized} 4 | \alias{isAuthorized} 5 | \alias{isAuthorized,D1Node-method} 6 | \title{Check if an action is authorized for the specified identifier} 7 | \usage{ 8 | isAuthorized(x, ...) 9 | 10 | \S4method{isAuthorized}{D1Node}(x, id, action) 11 | } 12 | \arguments{ 13 | \item{x}{The node to send the request to. This is either a \code{"CNode"} or \code{"MNode"} instance.} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{id}{The DataONE identifier (pid or sid) to check access for.} 18 | 19 | \item{action}{The DataONE action to check, possible values: "read", "write", "changePermission"} 20 | } 21 | \value{ 22 | a logical, TRUE if the action is authorized, false if not. 23 | } 24 | \description{ 25 | Test if the user identified by the provided token has 26 | authorization for operation on the specified object. 27 | } 28 | \details{ 29 | The identifier parameter may be either a DataONE persistent identifier (pid) 30 | or series identifier (sid). 31 | } 32 | \examples{ 33 | \dontrun{ 34 | # Send an authorization check to the D1 production CN. 35 | cn <- CNode("PROD") 36 | pid <- "doi:10.6073/pasta/7fcb8fea57843fae65f63094472f502d" 37 | canRead <- isAuthorized(cn, pid, "read") 38 | canWrite <- isAuthorized(cn, pid, "write") 39 | canChange <- isAuthorized(cn, pid, "changePermission") 40 | 41 | # Now send a check to a member node. 42 | mn <- getMNode(cn, "urn:node:KNB") 43 | pid <- "doi:10.6085/AA/pisco_recruitment.149.1" 44 | canRead <- isAuthorized(mn, pid, "read") 45 | canWrite <- isAuthorized(mn, pid, "write") 46 | canChange <- isAuthorized(mn, pid, "changePermission") 47 | } 48 | } 49 | \seealso{ 50 | \code{\link[=CNode-class]{CNode}}{ class description.} 51 | } 52 | -------------------------------------------------------------------------------- /man/isCertExpired.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{isCertExpired} 4 | \alias{isCertExpired} 5 | \alias{isCertExpired,CertificateManager-method} 6 | \title{Determine if an X.509 certificate has expired.} 7 | \usage{ 8 | isCertExpired(x, ...) 9 | 10 | \S4method{isCertExpired}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | TRUE if the certificate is expired 19 | } 20 | \description{ 21 | Returns \code{'TRUE'} if the certificate associated with a CertificateManager instance is expired. 22 | A certificate is expired if any of the following conditions hold: 1) the current time is before or after the 23 | certificate validity dates, 2) the certificate is not valid according to a trusted Certificate Authority, or 24 | 3) no certificate can be found. 25 | } 26 | -------------------------------------------------------------------------------- /man/listFormats.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{listFormats} 4 | \alias{listFormats} 5 | \alias{listFormats,CNode-method} 6 | \title{List all object formats registered in DataONE.} 7 | \usage{ 8 | listFormats(x, ...) 9 | 10 | \S4method{listFormats}{CNode}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a valid CNode object} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | Returns a dataframe of all object formats registered in the DataONE Object Format Vocabulary. 19 | } 20 | \description{ 21 | The \link{listFormats} method queries a DataONE Coordinating Node for a 22 | list of all entries in the Object Format Vocabulary. 23 | } 24 | \examples{ 25 | \dontrun{ 26 | library(dataone) 27 | cn <- CNode() 28 | formats <- listFormats(cn) 29 | } 30 | } 31 | \seealso{ 32 | \code{\link[=CNode-class]{CNode}}{ class description.} 33 | } 34 | -------------------------------------------------------------------------------- /man/listMemberNodes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{listMemberNodes} 4 | \alias{listMemberNodes} 5 | \alias{listMemberNodes,D1Client-method} 6 | \title{List DataONE Member Nodes.} 7 | \usage{ 8 | listMemberNodes(x) 9 | 10 | \S4method{listMemberNodes}{D1Client}(x) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | } 15 | \description{ 16 | A D1Client object is associated with a DataONE Coordinating Node. The 17 | \code{listMemberNodes} method lists all member nodes associated with a CN. 18 | } 19 | \examples{ 20 | \dontrun{ 21 | d1c <- D1Client("PROD") 22 | nodelist <- listMemberNodes(d1c) 23 | } 24 | } 25 | \seealso{ 26 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 27 | } 28 | -------------------------------------------------------------------------------- /man/listNodes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{listNodes} 4 | \alias{listNodes} 5 | \alias{listNodes,CNode-method} 6 | \title{Get the list of nodes associated with a CN} 7 | \usage{ 8 | listNodes(x, ...) 9 | 10 | \S4method{listNodes}{CNode}(x, url = as.character(NA), ...) 11 | } 12 | \arguments{ 13 | \item{x}{The coordinating node to query for its registered Member Nodes} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{url}{Optional - the url of the CN.} 18 | } 19 | \value{ 20 | the list of nodes in the DataONE CN environment 21 | } 22 | \description{ 23 | Get the list of nodes associated with a CN 24 | } 25 | \examples{ 26 | \dontrun{ 27 | cn <- CNode() 28 | nodelist <- listNodes(cn) 29 | nodeid <- nodelist[[2]]@identifier 30 | } 31 | } 32 | \seealso{ 33 | \code{\link[=CNode-class]{CNode}}{ class description.} 34 | } 35 | -------------------------------------------------------------------------------- /man/listObjects.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{listObjects} 4 | \alias{listObjects} 5 | \alias{listObjects,D1Node-method} 6 | \title{Retrieve the list of objects that match the search parameters} 7 | \usage{ 8 | listObjects(x, ...) 9 | 10 | \S4method{listObjects}{D1Node}( 11 | x, 12 | fromDate = as.character(NA), 13 | toDate = as.character(NA), 14 | formatId = as.character(NA), 15 | replicaStatus = as.logical(TRUE), 16 | start = as.integer(0), 17 | count = as.integer(1000) 18 | ) 19 | } 20 | \arguments{ 21 | \item{x}{The Node instance from which the SystemMetadata will be downloaded} 22 | 23 | \item{...}{(Not yet used.)} 24 | 25 | \item{fromDate}{Entries with a modified date greater than \code{'fromDate'} will be returned. 26 | This value must be specified in ISO 8601 format, i.e. "YYYY-MM-DDTHH:MM:SS.mmm+00:00"} 27 | 28 | \item{toDate}{Entries with a modified date less than \code{'toDate'} will be returned. 29 | This value must be specified in ISO 8601 format, i.e. "YYYY-MM-DDTHH:MM:SS.mmm+00:00"} 30 | 31 | \item{formatId}{The format to match, for example "eml://ecoinformatics.org/eml-2.1.1"} 32 | 33 | \item{replicaStatus}{A logical value that determines if replica (object not on it's origin node) should be returned. Default is TRUE.} 34 | 35 | \item{start}{An integer that specifies the first element of the result set that will be returned} 36 | 37 | \item{count}{An integer that specifies how many results will be returned} 38 | } 39 | \value{ 40 | list Objects that met the search criteria 41 | 42 | list Objects that met the search criteria 43 | } 44 | \description{ 45 | Retrieve the list of objects that match the search parameters 46 | } 47 | \details{ 48 | The list of objects that is returned is paged according to the \code{'start'} and 49 | \code{'count'} values, so that large result sets can be returned over multiple calls. 50 | } 51 | \examples{ 52 | \dontrun{ 53 | library(dataone) 54 | cn <- CNode("STAGING") 55 | fromDate <- "2013-01-01T01:01:01.000+00:00" 56 | toDate <- "2015-12-31T01:01:01.000+00:00" 57 | formatId <- "eml://ecoinformatics.org/eml-2.1.0" 58 | start <- 0 59 | count <- 5 60 | objects <- listObjects(cn, fromDate=fromDate, toDate=toDate, 61 | formatId=formatId, start=start, count=count) 62 | # Inspect id of first object 63 | objects[1]$objectInfo$identifier 64 | } 65 | } 66 | \seealso{ 67 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MN_read.listObjects} 68 | } 69 | -------------------------------------------------------------------------------- /man/listQueryEngines.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{listQueryEngines} 4 | \alias{listQueryEngines} 5 | \alias{listQueryEngines,D1Node-method} 6 | \title{Query a node for the list of query engines available on the node} 7 | \usage{ 8 | listQueryEngines(x, ...) 9 | 10 | \S4method{listQueryEngines}{D1Node}(x) 11 | } 12 | \arguments{ 13 | \item{x}{The CNode or MNode to list the query engines for.} 14 | 15 | \item{...}{(Not yet used.)} 16 | } 17 | \value{ 18 | list The list of query engines. 19 | } 20 | \description{ 21 | Query a node for the list of query engines available on the node 22 | } 23 | \examples{ 24 | \dontrun{ 25 | cn <- CNode("STAGING") 26 | engines <- listQueryEngines(cn) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /man/obscureAuth.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{obscureAuth} 4 | \alias{obscureAuth} 5 | \alias{obscureAuth,AuthenticationManager-method} 6 | \title{Temporarily disable DataONE authentication.} 7 | \usage{ 8 | obscureAuth(.Object) 9 | 10 | \S4method{obscureAuth}{AuthenticationManager}(.Object) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | } 15 | \value{ 16 | The expiration date for the current authentication mechanism being used. 17 | } 18 | \description{ 19 | Calling \code{obscureAuth} temporarily disables authentication so that 20 | } 21 | \details{ 22 | This method is intended to be used for authentication testing. 23 | \code{isAuthValid} will return FALSE. Authentication can be re-enabled by calling 24 | \code{restoreAuth}. 25 | } 26 | -------------------------------------------------------------------------------- /man/obscureCert.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{obscureCert} 4 | \alias{obscureCert} 5 | \alias{obscureCert,CertificateManager-method} 6 | \title{Obscure the CILogon Client Certificate} 7 | \usage{ 8 | obscureCert(x, ...) 9 | 10 | \S4method{obscureCert}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | the modified CertificateManager instance 19 | } 20 | \description{ 21 | Obscures the x509 certificate that CILogon installs, effectively making future 22 | interactions with the DataONE services public/anonymous. This function simple renames an 23 | existing certificate file to a known location, allowing 'public' operations. Note, when the 24 | client certificate is obscured via the renaming, you will not be able to create objects in 25 | DataONE, or utilize any other methods that require authentication. 26 | } 27 | \seealso{ 28 | \code{\link{restoreCert}} is this method's inverse operation 29 | } 30 | -------------------------------------------------------------------------------- /man/parseCapabilities.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{parseCapabilities} 4 | \alias{parseCapabilities} 5 | \alias{parseCapabilities,D1Node-method} 6 | \title{Construct a Node, using a passed in capabilities XML} 7 | \usage{ 8 | parseCapabilities(x, ...) 9 | 10 | \S4method{parseCapabilities}{D1Node}(x, xml) 11 | } 12 | \arguments{ 13 | \item{x}{The node to which capabilities should be applied.} 14 | 15 | \item{...}{(not yet used)} 16 | 17 | \item{xml}{The XML capabilities representing the node to be created} 18 | } 19 | \value{ 20 | The Node object with modified capabilities properties from the XML 21 | } 22 | \description{ 23 | Construct a Node, using a passed in capabilities XML 24 | } 25 | -------------------------------------------------------------------------------- /man/parseSolrResult.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{parseSolrResult} 4 | \alias{parseSolrResult} 5 | \alias{parseSolrResult,XMLInternalDocument-method} 6 | \title{Parse Solr output into an R list} 7 | \usage{ 8 | parseSolrResult(doc, ...) 9 | 10 | \S4method{parseSolrResult}{XMLInternalDocument}(doc, parse, ...) 11 | } 12 | \arguments{ 13 | \item{doc}{The Solr result to parse, in XML format} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{parse}{A logical value, if TRUE the result is parsed to appropriate R types.} 18 | } 19 | \value{ 20 | resultList The Solr result as an R list 21 | } 22 | \description{ 23 | Solr output that is specified with a writer type of XML \code{'&wt="xml"'} 24 | } 25 | -------------------------------------------------------------------------------- /man/ping.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Node.R 3 | \name{ping} 4 | \alias{ping} 5 | \alias{ping,D1Node-method} 6 | \title{Test if a node is online and accepting DataONE requests} 7 | \usage{ 8 | ping(x, ...) 9 | 10 | \S4method{ping}{D1Node}(x) 11 | } 12 | \arguments{ 13 | \item{x}{The CNode or MNode to check} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | logical A logical value set to TRUE if the node is up and FALSE if it is not 19 | 20 | logical A logical value set to TRUE if the node is up and FALSE if it is not 21 | } 22 | \description{ 23 | Test if a node is online and accepting DataONE requests 24 | } 25 | \examples{ 26 | \dontrun{ 27 | cn <- CNode() 28 | mn <- getMNode(cn, "urn:node:KNB") 29 | isAlive <- ping(mn) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /man/reserveIdentifier.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R, R/D1Client.R 3 | \name{reserveIdentifier} 4 | \alias{reserveIdentifier} 5 | \alias{reserveIdentifier,CNode-method} 6 | \alias{reserveIdentifier,D1Client-method} 7 | \title{Reserve a identifier that is unique in the DataONE network.} 8 | \usage{ 9 | reserveIdentifier(x, ...) 10 | 11 | \S4method{reserveIdentifier}{CNode}(x, id) 12 | 13 | \S4method{reserveIdentifier}{D1Client}(x, id) 14 | } 15 | \arguments{ 16 | \item{x}{The coordinating node to query for its registered Member Nodes} 17 | 18 | \item{...}{Additional parameters.} 19 | 20 | \item{id}{The identifier that is to be reserved.} 21 | } 22 | \value{ 23 | The reserved pid if it was successfully reserved, otherwise NULL 24 | } 25 | \description{ 26 | The reserveIdentifier method contains the DataONE CN and reserves the specified 27 | identifier that the user has provided. Once a an identifier has been reserved, it and can not be used by any other user. 28 | } 29 | \details{ 30 | This method requires a DataONE authentication token or X.509 Certificate. The reservation is made 31 | for the DataONE user identity that created the current authentication token or X.509 certificate. 32 | } 33 | \examples{ 34 | \dontrun{ 35 | library(dataone) 36 | library(uuid) 37 | cn <- CNode("STAGING") 38 | myId <- sprintf("urn:uuid:\%s", UUIDgenerate()) 39 | newId <- reserveIdentifier(cn, myId) 40 | } 41 | } 42 | \seealso{ 43 | \code{\link[=CNode-class]{CNode}}{ class description.} 44 | } 45 | -------------------------------------------------------------------------------- /man/resolve.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{resolve} 4 | \alias{resolve} 5 | \alias{resolve,CNode-method} 6 | \title{Get a list of coordinating nodes holding a given pid.} 7 | \usage{ 8 | resolve(x, ...) 9 | 10 | \S4method{resolve}{CNode}(x, pid) 11 | } 12 | \arguments{ 13 | \item{x}{a valid CNode object} 14 | 15 | \item{...}{Additional arguments (not yet used).} 16 | 17 | \item{pid}{the id of the identified object} 18 | } 19 | \value{ 20 | A list of URLs that the object can be downloaded from, or NULL if the object is not found. 21 | } 22 | \description{ 23 | Returns a list of nodes (MNs or CNs) known to hold copies of the object identified by id. 24 | } 25 | \examples{ 26 | \dontrun{ 27 | library(dataone) 28 | cn <- CNode("STAGING") 29 | id <- "doi:10.6073/pasta/9a27a1615e8e4c366ad09fefbfa2fced" 30 | locations <- resolve(cn,id) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /man/restoreAuth.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{restoreAuth} 4 | \alias{restoreAuth} 5 | \alias{restoreAuth,AuthenticationManager-method} 6 | \title{Restore authentication (after being disabled with \code{obscureAuth}).} 7 | \usage{ 8 | restoreAuth(.Object) 9 | 10 | \S4method{restoreAuth}{AuthenticationManager}(.Object) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | } 15 | \value{ 16 | The expiration date for the current authentication mechanism being used. 17 | } 18 | \description{ 19 | Restore authentication (after being disabled with \code{obscureAuth}). 20 | } 21 | -------------------------------------------------------------------------------- /man/restoreCert.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{restoreCert} 4 | \alias{restoreCert} 5 | \alias{restoreCert,CertificateManager-method} 6 | \title{Restore the CILogon client certificate by renaming it to its original location} 7 | \usage{ 8 | restoreCert(x, ...) 9 | 10 | \S4method{restoreCert}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | the modified CertificateManager instance 19 | } 20 | \description{ 21 | Restores the x509 certificate that CILogon installs, which allows future 22 | interactions with nodes to be authenticated with the certificate. This function simply 23 | renames an obscured certificate file to its original location, allowing authenticated 24 | operations. 25 | } 26 | \seealso{ 27 | \code{\link{obscureCert}} is this method's inverse operation 28 | } 29 | -------------------------------------------------------------------------------- /man/setMNodeId.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{setMNodeId} 4 | \alias{setMNodeId} 5 | \alias{setMNodeId,D1Client,character-method} 6 | \title{Set the member node identifier to be associated with the D1Client object.} 7 | \usage{ 8 | setMNodeId(x, id) 9 | 10 | \S4method{setMNodeId}{D1Client,character}(x, id) 11 | } 12 | \arguments{ 13 | \item{x}{A D1Client object.} 14 | 15 | \item{id}{A DataONE member node identifier.} 16 | } 17 | \description{ 18 | The member node identifier is the URN identifier used by 19 | DataONE to uniquely identifier a node, for example "urn:node:KNB" specifies 20 | the "Knowledge Network for Biodiversity" member node. 21 | } 22 | \details{ 23 | One Member Node can be associated with the client as the default to which 24 | data and metadata are written. 25 | } 26 | \seealso{ 27 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 28 | } 29 | \author{ 30 | setMNodeId 31 | } 32 | -------------------------------------------------------------------------------- /man/setObsoletedBy.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CNode.R 3 | \name{setObsoletedBy} 4 | \alias{setObsoletedBy} 5 | \alias{setObsoletedBy,CNode,character-method} 6 | \title{Set a pid as being obsoleted by another pid} 7 | \usage{ 8 | setObsoletedBy(x, pid, obsoletedByPid, ...) 9 | 10 | \S4method{setObsoletedBy}{CNode,character}(x, pid, obsoletedByPid, serialVersion) 11 | } 12 | \arguments{ 13 | \item{x}{The CNode instance on which the object will be created} 14 | 15 | \item{pid}{The identifier of the object to be obsoleted} 16 | 17 | \item{obsoletedByPid}{The identifier of the object that obsoletes the object identified by pid.} 18 | 19 | \item{...}{(Not yet used)} 20 | 21 | \item{serialVersion}{The serial version of the system metadata of the pid being obsoleted.} 22 | } 23 | \value{ 24 | TRUE if the pid was obsoleted, otherwise FALSE is returned 25 | } 26 | \description{ 27 | Updates the SystemMetadata 'obsoletedBy' property for an object, indicating that the object 28 | specified by pid has been obsoleted by the identifier in obsoletedByPid. 29 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{\link{CertificateManager}} for details. 30 | In DataONE version 2.0, authentication tokens can also be used. 31 | } 32 | \seealso{ 33 | \code{\link[=CNode-class]{CNode}}{ class description.} 34 | } 35 | -------------------------------------------------------------------------------- /man/setPublicAccess.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Object.R 3 | \name{setPublicAccess,D1Object-method} 4 | \alias{setPublicAccess,D1Object-method} 5 | \title{Make the object publicly readable.} 6 | \usage{ 7 | \S4method{setPublicAccess}{D1Object}(x) 8 | } 9 | \arguments{ 10 | \item{x}{D1Object} 11 | } 12 | \value{ 13 | D1Object with modified access rules 14 | } 15 | \description{ 16 | This method should be called prior to creating the object in DataONE. 17 | When called before 18 | creating the object, adds a rule to the access policy that makes this object 19 | publicly readable. If called after creation, it will only change the system 20 | metadata locally, and will not have any effect on remotely uploaded copies of 21 | the D1Object. 22 | } 23 | \seealso{ 24 | \code{\link[=DataObject-class]{DataObject}}{ class description.} 25 | } 26 | -------------------------------------------------------------------------------- /man/showAuth.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AuthenticationManager.R 3 | \name{showAuth} 4 | \alias{showAuth} 5 | \alias{showAuth,AuthenticationManager-method} 6 | \title{Display all authentication information} 7 | \usage{ 8 | showAuth(.Object, ...) 9 | 10 | \S4method{showAuth}{AuthenticationManager}(.Object, node) 11 | } 12 | \arguments{ 13 | \item{.Object}{An AuthenticationManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | 17 | \item{node}{A D1Node instance} 18 | } 19 | \description{ 20 | Display all authentication information 21 | } 22 | -------------------------------------------------------------------------------- /man/showClientSubject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CertificateManager.R 3 | \name{showClientSubject} 4 | \alias{showClientSubject} 5 | \alias{showClientSubject,CertificateManager-method} 6 | \title{Get DataONE Identity as Stored in the CILogon Certificate.} 7 | \usage{ 8 | showClientSubject(x, ...) 9 | 10 | \S4method{showClientSubject}{CertificateManager}(x) 11 | } 12 | \arguments{ 13 | \item{x}{a CertificateManager instance} 14 | 15 | \item{...}{(Not yet used)} 16 | } 17 | \value{ 18 | the DataONE Subject that is your client's identity 19 | } 20 | \description{ 21 | Returns Your Identity according to DataONE (and CILogon) as provided in the Subject 22 | field of the X.509 certificate. The value is a Distinguished Name, and can be used in all fields that 23 | require a user identity for access control authorization. If the certificate is missing on expired, then 24 | the subject 'public' is returned. 25 | } 26 | -------------------------------------------------------------------------------- /man/updateObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{updateObject} 4 | \alias{updateObject} 5 | \alias{updateObject,MNode-method} 6 | \title{Update an object on a Member Node, by creating a new object that replaces an original.} 7 | \usage{ 8 | updateObject(x, ...) 9 | 10 | \S4method{updateObject}{MNode}(x, pid, file = as.character(NA), newpid, sysmeta, dataobj = NULL) 11 | } 12 | \arguments{ 13 | \item{x}{The MNode instance on which the object will be created} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{pid}{The identifier of the object to be updated} 18 | 19 | \item{file}{the absolute file location of the object to be uploaded} 20 | 21 | \item{newpid}{The identifier of the new object to be created} 22 | 23 | \item{sysmeta}{a SystemMetadata instance describing properties of the object} 24 | 25 | \item{dataobj}{a \code{raw} object to use for the upload, instead of the contents of the \code{file} argument.} 26 | } 27 | \value{ 28 | A \code{character} containing the identifier if successful. 29 | } 30 | \description{ 31 | This method provides the ability to update a data or metadata object to the Member Node 32 | provided in the \code{'x'} parameter. In DataONE, both the original object and the new object are 33 | maintained, each with its own persistent identifier, and the 'obsoletes' field in the SystemMetadata is 34 | used to reflect the fact that the new object replaces the old. Both objects remain accessible. 35 | } 36 | \details{ 37 | In the version 2.0 library and higher, this operation can utilize an 38 | 'dataone_token' option to provide credentials for write operations in DataONE. 39 | The authentication token is obtained from DataONE (see your profile on https://search.dataone.org). 40 | See the \code{vignette("dataone-overview")} for details. 41 | Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file 42 | system can also be used. This certificate provides authentication credentials from 43 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{vignette("dataone-overview")} for details. 44 | } 45 | \note{ 46 | Please see the vignette *upload-data* for an example: \code{vignette("upload-data")} 47 | } 48 | \seealso{ 49 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MNStorage.update} 50 | } 51 | -------------------------------------------------------------------------------- /man/updateSystemMetadata.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MNode.R 3 | \name{updateSystemMetadata} 4 | \alias{updateSystemMetadata} 5 | \alias{updateSystemMetadata,MNode-method} 6 | \title{Update the system metadata associated with an object.} 7 | \usage{ 8 | updateSystemMetadata(x, ...) 9 | 10 | \S4method{updateSystemMetadata}{MNode}(x, pid, sysmeta) 11 | } 12 | \arguments{ 13 | \item{x}{The MNode instance from which the SystemMetadata will be downloaded} 14 | 15 | \item{...}{(Not yet used.)} 16 | 17 | \item{pid}{The identifier of the object} 18 | 19 | \item{sysmeta}{a SystemMetadata instance with updated information.} 20 | } 21 | \value{ 22 | A logical value, TRUE if the operation was successful, FALSE if there was an error. 23 | } 24 | \description{ 25 | A modified SytemMetadata object can be sent to DataONE that contains 26 | updated information. This function allow updating of the system metadata without 27 | updating the object that it describes, so that mutable attributes such as accessPolicy 28 | can be updated easily. 29 | } 30 | \details{ 31 | In the version 2.0 library and higher, this operation can utilize an 32 | 'dataone_token' option to provide credentials for write operations in DataONE. 33 | The authentication token is obtained from DataONE (see your profile on https://search.dataone.org). 34 | See the \code{vignette("dataone-overview")} for details. 35 | Alternatively, the version 1.0 approach of using an X.509 certificate in a default location of the file 36 | system can also be used. This certificate provides authentication credentials from 37 | CILogon \url{https://cilogon.org/?skin=DataONE}. See \code{vignette("dataone-overview")} for details. 38 | } 39 | \note{ 40 | Please see the vignette *upload-data* for an example: \code{vignette("upload-data")} 41 | } 42 | \seealso{ 43 | \url{https://purl.dataone.org/architecture/apis/MN_APIs.html#MNStorage.updateSystemMetadata} 44 | } 45 | -------------------------------------------------------------------------------- /man/uploadDataObject.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{uploadDataObject} 4 | \alias{uploadDataObject} 5 | \alias{uploadDataObject,D1Client-method} 6 | \title{Upload a DataObject to a DataONE member node.} 7 | \usage{ 8 | uploadDataObject(x, ...) 9 | 10 | \S4method{uploadDataObject}{D1Client}( 11 | x, 12 | do, 13 | replicate = as.logical(FALSE), 14 | numberReplicas = NA, 15 | preferredNodes = NA, 16 | public = as.logical(FALSE), 17 | accessRules = NA, 18 | quiet = TRUE, 19 | ... 20 | ) 21 | } 22 | \arguments{ 23 | \item{x}{A D1Client instance.} 24 | 25 | \item{...}{(Not yet used.)} 26 | 27 | \item{do}{The DataObject instance to be uploaded to DataONE.} 28 | 29 | \item{replicate}{A value of type \code{"logical"}, if TRUE then DataONE will replicate this object to other member nodes} 30 | 31 | \item{numberReplicas}{A value of type \code{"numeric"}, for number of supported replicas.} 32 | 33 | \item{preferredNodes}{A list of \code{"character"}, each of which is the node identifier for a node to which a replica should be sent.} 34 | 35 | \item{public}{A \code{"logical"} value - if TRUE then the uploaded object will be publicly readable.} 36 | 37 | \item{accessRules}{Access rules of \code{'data.frame'} that will be added to the access policy} 38 | 39 | \item{quiet}{A \code{'logical'}. If TRUE (the default) then informational messages will not be printed.} 40 | } 41 | \value{ 42 | id The id of the DataObject that was uploaded 43 | } 44 | \description{ 45 | Upload a DataObject to a DataONE member node. 46 | } 47 | \examples{ 48 | \dontrun{ 49 | library(dataone) 50 | library(datapack) 51 | testdf <- data.frame(x=1:10,y=11:20) 52 | csvfile <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".csv") 53 | write.csv(testdf, csvfile, row.names=FALSE) 54 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 55 | do <- new("DataObject", format="text/csv", mnNodeId=getMNodeId(d1c), filename=csvfile) 56 | # Upload a single DataObject to DataONE (requires authentication) 57 | newId <- uploadDataObject(d1c, do, replicate=FALSE, preferredNodes=NA , public=TRUE) 58 | } 59 | } 60 | \seealso{ 61 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 62 | } 63 | -------------------------------------------------------------------------------- /man/uploadDataPackage.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/D1Client.R 3 | \name{uploadDataPackage} 4 | \alias{uploadDataPackage} 5 | \alias{uploadDataPackage,D1Client-method} 6 | \title{Upload a DataPackage to a DataONE member node.} 7 | \usage{ 8 | uploadDataPackage(x, ...) 9 | 10 | \S4method{uploadDataPackage}{D1Client}( 11 | x, 12 | dp, 13 | replicate = NA, 14 | numberReplicas = NA, 15 | preferredNodes = NA, 16 | public = as.logical(FALSE), 17 | accessRules = NA, 18 | quiet = as.logical(TRUE), 19 | resolveURI = as.character(NA), 20 | packageId = as.character(NA), 21 | as = "character", 22 | ... 23 | ) 24 | } 25 | \arguments{ 26 | \item{x}{A D1Client instance.} 27 | 28 | \item{...}{(Not yet used.)} 29 | 30 | \item{dp}{The DataPackage instance to be submitted to DataONE for creation.} 31 | 32 | \item{replicate}{A value of type \code{"logical"}, if TRUE then DataONE will replicate this object to other member nodes} 33 | 34 | \item{numberReplicas}{A value of type \code{"numeric"}, for number of supported replicas.} 35 | 36 | \item{preferredNodes}{A list of \code{"character"}, each of which is the node identifier for a node to which a replica should be sent.} 37 | 38 | \item{public}{A \code{'logical'}, if TRUE then all objects in this package will be accessible by any user} 39 | 40 | \item{accessRules}{Access rules of \code{'data.frame'} that will be added to the access policy of each object in the datapackage.} 41 | 42 | \item{quiet}{A \code{'logical'}. If TRUE (the default) then informational messages will not be printed.} 43 | 44 | \item{resolveURI}{A URI to prepend to identifiers (i.e. for use when creating the ResourceMap). See \link[datapack]{serializePackage}} 45 | 46 | \item{packageId}{A value of type \code{"character"} specifying a unique identifier to use for the uploaded package (resource map pid)} 47 | 48 | \item{as}{A value of type \code{"character"} that specifies the return value. Possible values are \code{"character"} (the default) or \code{"DataPackage"}.} 49 | } 50 | \value{ 51 | id The identifier of the resource map for this data package 52 | } 53 | \description{ 54 | Upload all DataObjects contained in the DataPackage by calling \code{\link{uploadDataObject}} 55 | on each of the members. Also a resourceMap object is created from the 56 | recorded relationships between DataObjects, and this is uploaded as well. 57 | } 58 | \details{ 59 | The DataPackage describes the collection of data object and their associated 60 | metadata object, with the relationships and members serialized into a document 61 | stored under, and retrievable with, the packageId as it's own distinct object. 62 | Any objects in the data map that have a dateUploaded value are assumed to be 63 | pre-existing in the system, and skipped. 64 | } 65 | \note{ 66 | Member objects are created serially, and most errors in creating one object will 67 | interrupt the create process for the whole, with the result that some members will 68 | be created, and the remainder not. 69 | } 70 | \examples{ 71 | \dontrun{ 72 | library(dataone) 73 | library(datapack) 74 | dp <- new("DataPackage") 75 | sampleData <- system.file("extdata/sample.csv", package="dataone") 76 | dataObj <- new("DataObject", format="text/csv", file=sampleData) 77 | dataObj <- setPublicAccess(dataObj) 78 | sampleEML <- system.file("extdata/strix-pacific-northwest.xml", package="dataone") 79 | metadataObj <- new("DataObject", format="eml://ecoinformatics.org/eml-2.1.1", file=sampleEML) 80 | metadataObj <- setPublicAccess(metadataObj) 81 | dp <- addMember(dp, do = dataObj, mo = metadataObj) 82 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 83 | # Upload all members of the DataPackage to DataONE (requires authentication) 84 | packageId <- uploadDataPackage(d1c, dp, replicate=TRUE, public=TRUE, numberReplicas=2) 85 | } 86 | } 87 | \seealso{ 88 | \code{\link[=D1Client-class]{D1Client}}{ class description.} 89 | } 90 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | test_check("dataone") -------------------------------------------------------------------------------- /tests/testthat/helper-base.R: -------------------------------------------------------------------------------- 1 | # Reduce redundant calls to the same service - this only needs to be made 2 | # once per test 3 | cnProd <- NULL 4 | cnStaging <- NULL 5 | d1cKNB <- NULL 6 | mnKNB <- NULL 7 | d1cProd <- NULL 8 | d1cTestKNB <- NULL 9 | d1cTest <- NULL 10 | mnTest <- NULL 11 | servicesDown <- FALSE 12 | 13 | # Define service variables that the checks will use. 14 | # If a service is down, skip tests 15 | tryCatch({ 16 | cnProd <- CNode() 17 | cnStaging <- CNode("STAGING") 18 | d1cKNB <- D1Client("PROD", "urn:node:KNB") 19 | mnKNB <- d1cKNB@mn 20 | d1cProd <- D1Client("PROD") 21 | d1cTestKNB <- D1Client("STAGING", "urn:node:mnTestKNB") 22 | # If mnStageUCSB2 isn't available for write tests, use mnTestKNB 23 | #d1cTest <- D1Client("STAGING", "urn:node:mnStageUCSB2") 24 | d1cTest <- d1cTestKNB 25 | mnTest <- d1cTestKNB@mn 26 | }, warning = function(wrn) { 27 | servicesDown <<- TRUE 28 | }, error = function(err) { 29 | servicesDown <<- TRUE 30 | }) 31 | 32 | if(is.null(cnProd)) servicesDown <- TRUE 33 | if(is.null(cnStaging)) servicesDown <- TRUE 34 | if(is.null(d1cKNB)) servicesDown <- TRUE 35 | if(is.null(mnKNB)) servicesDown <- TRUE 36 | if(is.null(d1cProd)) servicesDown <- TRUE 37 | if(is.null(d1cTestKNB)) servicesDown <- TRUE 38 | if(is.null(d1cTest)) servicesDown <- TRUE 39 | if(is.null(mnTest)) servicesDown <- TRUE -------------------------------------------------------------------------------- /tests/testthat/test.auth_request.R: -------------------------------------------------------------------------------- 1 | test_that("dataone library loads", { 2 | expect_true(require(dataone)) 3 | }) 4 | 5 | test_that("auth_get", { 6 | skip_on_cran() 7 | library(dataone) 8 | library(httr) 9 | library(XML) 10 | uri <- "https://cn.dataone.org/cn/v2/formats" 11 | format_list <- xmlParse(content(dataone:::auth_get(uri,node=CNode()), as="text")) 12 | cname <- class(format_list)[1] 13 | expect_match(cname, "XML") 14 | xml <- XML::saveXML(format_list) 15 | expect_true(grep("METADATA", xml) > 0) 16 | expect_true(grep("Ecological Metadata", xml) > 0) 17 | }) 18 | -------------------------------------------------------------------------------- /vignettes/package-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataONEorg/rdataone/97ef173bce6e4cb3bf09698324185964299a8df1/vignettes/package-diagram.png -------------------------------------------------------------------------------- /vignettes/v01-dataone-overview.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "dataone Package Overview" 3 | date: "`r Sys.Date()`" 4 | output: rmarkdown::html_vignette 5 | vignette: > 6 | %\VignetteIndexEntry{dataone Package Overview} 7 | %\VignetteEngine{knitr::rmarkdown} 8 | %\VignetteEncoding{UTF-8} 9 | %\usepackage[utf8]{inputenc} 10 | --- 11 | 12 | ## *dataone* R Package Overview 13 | 14 | The *dataone* R package enables R scripts to search, download and upload science data and metadata 15 | to the [DataONE Federation](https://www.dataone.org). This package calls DataONE 16 | web services that allow client programs to interact with [Member Nodes (MN)](https://www.dataone.org/current-member-nodes) 17 | and DataONE Coordinating Nodes (CN). 18 | 19 | ## Quick Start 20 | 21 | See the full manual (`help dataone`) for documentation. 22 | 23 | To search the DataONE Federation Member Node *Knowledge Network for Biocomplexity (KNB)* for a dataset: 24 | 25 | ```{r, warning=FALSE, eval=FALSE} 26 | library(dataone) 27 | cn <- CNode("PROD") 28 | mn <- getMNode(cn, "urn:node:KNB") 29 | mySearchTerms <- list(q="abstract:salmon+AND+keywords:acoustics+AND+keywords:\"Oncorhynchus nerka\"", 30 | fl="id,title,dateUploaded,abstract,size", 31 | fq="dateUploaded:[2013-01-01T00:00:00.000Z TO 2014-01-01T00:00:00.000Z]", 32 | sort="dateUploaded+desc") 33 | result <- query(mn, solrQuery=mySearchTerms, as="data.frame") 34 | result[1,c("id", "title")] 35 | pid <- result[1,'id'] 36 | ``` 37 | 38 | 39 | The metadata file located in the above search can be downloaded with the commands: 40 | 41 | ```{r, warning=FALSE, eval=FALSE} 42 | library(XML) 43 | metadata <- rawToChar(getObject(mn, pid)) 44 | ``` 45 | 46 | The metadata file that describes the located research can be viewed in an XML viewer or text editor, once 47 | it is written to a disk file. This file details a data file (CSV) that can be obtained using the listed 48 | identifier, using the commands: 49 | 50 | ```{r, warning=FALSE, eval=FALSE} 51 | dataRaw <- getObject(mn, "df35d.443.1") 52 | dataChar <- rawToChar(dataRaw) 53 | theData <- textConnection(dataChar) 54 | df <- read.csv(theData, stringsAsFactors=FALSE) 55 | df[1,] 56 | ``` 57 | 58 | Uploading a CSV file to a DataONE Member Node requires user authentication. DataONE user 59 | authentication is described in the vignette `DataONE-Federation`. 60 | 61 | Once the authentication steps have been followed, uploading is done with: 62 | ```{r, warning=FALSE,eval=FALSE} 63 | library(datapack) 64 | library(uuid) 65 | d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") 66 | id <- paste("urn:uuid:", UUIDgenerate(), sep="") 67 | testdf <- data.frame(x=1:10,y=11:20) 68 | csvfile <- paste(tempfile(), ".csv", sep="") 69 | write.csv(testdf, csvfile, row.names=FALSE) 70 | # Build a DataObject containing the csv, and upload it to the Member Node 71 | d1Object <- new("DataObject", id, format="text/csv", filename=csvfile) 72 | ``` 73 | ```{r, warning=FALSE, eval=FALSE} 74 | uploadDataObject(d1c, d1Object, public=TRUE) 75 | ``` 76 | 77 | ## Additional Resources 78 | 79 | The `dataone` R package vignettes can be viewed using the R `vignette` command, 80 | for example `vignette("dataone-overview")`. 81 | 82 | The `dataone` vignettes describe these topics: 83 | 84 | - Searching for data in DataONE described in vignette *searching-dataone*. 85 | 86 | - Downloading data from DataONE described in vignette *download-data* 87 | 88 | - Uploading data to DataONE is described in vignettes *upload-data* and *update-package*. 89 | 90 | - The DataONE Federation is described in the vignettes *DataONE-Federation*. 91 | 92 | ## Acknowledgements 93 | Work on this package was supported by: 94 | 95 | - NSF-ABI grant #1262458 to C. Gries, M. Jones, and S. Collins. 96 | - NSF-DATANET grants #0830944 and #1430508 to W. Michener, M. Jones, D. Vieglais, S. Allard and P. Cruse 97 | 98 | Additional support was provided for working group collaboration by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California. 99 | -------------------------------------------------------------------------------- /vignettes/v07-known-issues.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Known Issues" 3 | date: "`r Sys.Date()`" 4 | output: rmarkdown::html_vignette 5 | vignette: > 6 | %\VignetteIndexEntry{Known Issues} 7 | %\VignetteEngine{knitr::rmarkdown} 8 | %\VignetteEncoding{UTF-8} 9 | %\usepackage[utf8]{inputenc} 10 | --- 11 | 12 | ## Known Issues With dataone R Package Version 2.0 13 | ### Error Using X.509 Certificates 14 | 15 | Using an X.509 certificate for DataONE authentication on certain versions of Mac OS X can cause the following error: 16 | 17 | ``` 18 | Error in curl::curl_fetch_memory(url, handle = handle) : 19 | Problem with the local SSL certificate 20 | ``` 21 | 22 | (Note that it is recommended that you use DataONE authentication tokens instead of an X.509 certificate if possible.) 23 | 24 | Changes in the Mac OS X system libraries in OS X Mavericks have taken away support of these X.509 certificates. 25 | A workaround to make these certificates usable on Mac OS X with R is to install a version of the *curl* R package 26 | that supports these certificates. 27 | 28 | On Mac OS X, the libcurl library can be installed with either [Mac Ports](https://www.macports.org) package manager 29 | or the [HomeBrew](https://brew.sh) package manager. The HomeBrew package manager can be significantly faster to install 30 | but either one will work provided the directions shown below are followed. 31 | 32 | You can check if you have MacPorts installed by entering the following command in a terminal window: 33 | 34 | ``` 35 | port version 36 | ``` 37 | 38 | #### Create new *curl* package using MacPorts 39 | If MacPorts is being used on your system, the following commands can be entered to install a *curl* package 40 | that can read the certificate and allow them to be used by the *dataone* package for authentication 41 | to a DataONE node. In a terminal window enter the commands: 42 | 43 | ``` 44 | sudo port install curl 45 | ``` 46 | 47 | ```{r, eval=F} 48 | Sys.setenv(LIB_DIR="/opt/local/lib") 49 | Sys.setenv(INCLUDE_DIR="/opt/local/include") 50 | install.packages("curl", type="source") 51 | library(curl) 52 | library(dataone) 53 | 54 | # Remove the environment variables as they are no longer needed. 55 | Sys.setenv(LIB_DIR="") 56 | Sys.setenv(INCLUDE_DIR="") 57 | ``` 58 | 59 | At this point you should be able to use X.509 Certificates. 60 | 61 | #### Create new *curl* package using HomeBrew 62 | The HomeBrew software can be installed with the following command entered at a terminal window: 63 | 64 | ``` 65 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 66 | ``` 67 | 68 | Once HomeBrew has been installed, you can get the required curl libraries by entering the command: 69 | 70 | ``` 71 | brew install curl --with-openssl 72 | brew link curl --force 73 | ``` 74 | 75 | In the R console enter the commands: 76 | 77 | ```{r, eval=F} 78 | Sys.setenv(LIB_DIR="/usr/local/opt/curl/lib") 79 | Sys.setenv(INCLUDE_DIR="/usr/local/opt/curl/include") 80 | install.packages("curl", type="source") 81 | library(curl) 82 | library(dataone) 83 | 84 | # Remove the environment variables as they are no longer needed. 85 | Sys.setenv(LIB_DIR="") 86 | Sys.setenv(INCLUDE_DIR="") 87 | ``` 88 | At this point you should be able to use X.509 Certificates. 89 | --------------------------------------------------------------------------------