edu.ucsb.nceas.metacat.oaipmh.harvester

## Class GetRecord

- java.lang.Object
- - edu.ucsb.nceas.metacat.oaipmh.harvester.HarvesterVerb
  - - edu.ucsb.nceas.metacat.oaipmh.harvester.GetRecord

-     public class GetRecord
      extends HarvesterVerb

  This class represents an GetRecord response on either the server or on the client
  Author:
    Duane Costa, University of New Mexico, LTER Network Office, Jeffrey A. Young, OCLC Online Computer Library Center

- - ### Field Summary

    - ### Fields inherited from class edu.ucsb.nceas.metacat.oaipmh.harvester.HarvesterVerb

      `SCHEMA_LOCATION_V2_0`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GetRecord()` Mock object constructor (for unit testing purposes)
    `GetRecord(java.lang.String baseURL, java.lang.String identifier, java.lang.String metadataPrefix)` Client-side GetRecord verb constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getIdentifier()` Get the oai:identifier from the oai:header

    - ### Methods inherited from class edu.ucsb.nceas.metacat.oaipmh.harvester.HarvesterVerb

      `getDocument, getErrors, getNodeList, getRequestURL, getSchemaLocation, getSingleString, runVerb, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GetRecord

          public GetRecord()

      Mock object constructor (for unit testing purposes)

    - #### GetRecord

          public GetRecord(java.lang.String baseURL,
                           java.lang.String identifier,
                           java.lang.String metadataPrefix)
                    throws java.io.IOException,
                           javax.xml.parsers.ParserConfigurationException,
                           org.xml.sax.SAXException,
                           javax.xml.transform.TransformerException

      Client-side GetRecord verb constructor
      Parameters:
        `baseURL` - baseURL of the OAI-PMH provider to be queried
        `identifier` - identifier of the record that we're getting
        `metadataPrefix` - the metadata prefix, e.g. "oai_pmh"
      Throws:
        `MalformedURLException` - the baseURL is bad
        `org.xml.sax.SAXException` - the xml response is bad
        `java.io.IOException` - an I/O error occurred
        `javax.xml.parsers.ParserConfigurationException`
        `javax.xml.transform.TransformerException`

  - ### Method Detail

    - #### getIdentifier

          public java.lang.String getIdentifier()
                                         throws javax.xml.transform.TransformerException,
                                                java.lang.NoSuchFieldException

      Get the oai:identifier from the oai:header
      Returns:
        the oai:identifier as a String
      Throws:
        `javax.xml.transform.TransformerException`
        `java.lang.NoSuchFieldException`

Copyright © 2020 Regents of the University of California. All Rights Reserved.