edu.ucsb.nceas.metacat.oaipmh.harvester

## Class OaipmhHarvester

- java.lang.Object
- - edu.ucsb.nceas.metacat.oaipmh.harvester.OaipmhHarvester

-     public class OaipmhHarvester
      extends java.lang.Object

  Main class for running the OAI-PMH Harvester program
  Author:
    dcosta

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OaipmhHarvester()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)` The main() method.
    `static void` | `run(java.lang.String baseURL, java.lang.String dn, java.lang.String password, java.lang.String from, java.lang.String until, java.lang.String metadataPrefix, java.lang.String setSpec)` Runs a OAI-PMH harvest.

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

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

- - ### Constructor Detail

    - #### OaipmhHarvester

          public OaipmhHarvester()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)

      The main() method.
      Parameters:
        `args` - Command line arguments: -dn distinguished_name -- LDAP user name of the harvester account -password password -- LDAP password of the harvester account <-metacatConfigdir dir> -- Directory where metacat.properties file is found. <-from date> -- from date of the harvest documents <-until date> -- until date of the harvest documents <-metadataPrefix prefix> -- metadata prefix of the harvest documents, e.g. 'oai_dc' <-setSpec setName> -- set specification of the harvest documents baseURL -- base URL of the OAI-PMH data provider Command options appearing inside angle brackets (<>) are optional.

    - #### run

          public static void run(java.lang.String baseURL,
                                 java.lang.String dn,
                                 java.lang.String password,
                                 java.lang.String from,
                                 java.lang.String until,
                                 java.lang.String metadataPrefix,
                                 java.lang.String setSpec)
                          throws java.io.IOException,
                                 javax.xml.parsers.ParserConfigurationException,
                                 org.xml.sax.SAXException,
                                 javax.xml.transform.TransformerException,
                                 java.lang.NoSuchFieldException

      Runs a OAI-PMH harvest.
      Parameters:
        `baseURL` - The base URL of the data provider.
        `dn` - Value of 'dn' option, a LDAP distinguished name, e.g. "uid=dryad,o=LTER,dc=ecoinformatics,dc=org"
        `password` - Value of 'password' option, a string
        `from` - Value of 'from' option, a date string or null
        `until` - Value of 'until' option, a date string or null
        `metadataPrefix` - Value of 'metadataPrefix' option, may be null
        `setSpec` - Value of 'setSpec' option, may be null
      Throws:
        `java.io.IOException`
        `javax.xml.parsers.ParserConfigurationException`
        `org.xml.sax.SAXException`
        `javax.xml.transform.TransformerException`
        `java.lang.NoSuchFieldException`

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