edu.ucsb.nceas.metacat.harvesterClient

## Class HarvestSiteSchedule

- java.lang.Object
- - edu.ucsb.nceas.metacat.harvesterClient.HarvestSiteSchedule

-     public class HarvestSiteSchedule
      extends java.lang.Object

  HarvestSiteSchedule manages a single entry in the HARVEST_SITE_SCHEDULE table, determining when and how to harvest the documents for a given site.
  Author:
    costa

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HarvestSiteSchedule(Harvester harvester, int siteScheduleID, java.lang.String documentListURL, java.lang.String ldapDN, java.lang.String ldapPwd, java.lang.String dateNextHarvest, java.lang.String dateLastHarvest, int updateFrequency, java.lang.String unit, java.lang.String contactEmail)` Creates a new instance of HarvestSiteSchedule.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `dueForHarvest()` Boolean to determine whether this site is currently due for its next harvest.
    `java.lang.String` | `getSchemaLocation()` Accessor method for the schemaLocation field.
    `void` | `harvestDocumentList()` Harvests each document in the site document list.
    `void` | `metacatLogin()` Login to Metacat using the ldapDN and ldapPwd
    `boolean` | `parseHarvestList()` Parses the site harvest list XML file to find out which documents to harvest.
    `void` | `printOutput(java.io.PrintStream out)` Prints the data that is stored in this HarvestSiteSchedule object.
    `void` | `setSchemaLocation(java.lang.String schemaLocation)` Accessor method for setting the value of the schemaLocation field.

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

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

- - ### Constructor Detail

    - #### HarvestSiteSchedule

          public HarvestSiteSchedule(Harvester harvester,
                                     int siteScheduleID,
                                     java.lang.String documentListURL,
                                     java.lang.String ldapDN,
                                     java.lang.String ldapPwd,
                                     java.lang.String dateNextHarvest,
                                     java.lang.String dateLastHarvest,
                                     int updateFrequency,
                                     java.lang.String unit,
                                     java.lang.String contactEmail)

      Creates a new instance of HarvestSiteSchedule. Initialized with the data that was read from a single row in the HARVEST_SITE_SCHEDULE table.
      Parameters:
        `harvester` - the parent Harvester object
        `siteScheduleID` - the value of the SITE_SCHEDULE_ID field
        `documentListURL` - the value of the DOCUMENTLISTURL field
        `ldapDN` - the value of the LDAPDN field
        `ldapPwd` - the value of the LDAPPASSWORD field
        `dateNextHarvest` - the value of the DATENEXTHARVEST field
        `dateLastHarvest` - the value of the DATELASTHARVEST field
        `updateFrequency` - the value of the UPDATEFREQUENCY field
        `unit` - the value of the UNIT field
        `contactEmail` - the value of the CONTACT_EMAIL field

  - ### Method Detail

    - #### dueForHarvest

          public boolean dueForHarvest()

      Boolean to determine whether this site is currently due for its next harvest.

    - #### getSchemaLocation

          public java.lang.String getSchemaLocation()

      Accessor method for the schemaLocation field.
      Returns:
        schemaLocation the schema location string

    - #### harvestDocumentList

          public void harvestDocumentList()

      Harvests each document in the site document list.
      Throws:
        `org.xml.sax.SAXException`
        `java.io.IOException`
        `javax.xml.parsers.ParserConfigurationException`

    - #### metacatLogin

          public void metacatLogin()

      Login to Metacat using the ldapDN and ldapPwd

    - #### parseHarvestList

          public boolean parseHarvestList()
                                   throws javax.xml.parsers.ParserConfigurationException

      Parses the site harvest list XML file to find out which documents to harvest.
      Returns:
        true if successful, otherwise false
      Throws:
        `javax.xml.parsers.ParserConfigurationException`

    - #### printOutput

          public void printOutput(java.io.PrintStream out)

      Prints the data that is stored in this HarvestSiteSchedule object.
      Parameters:
        `out` - the PrintStream to write to

    - #### setSchemaLocation

          public void setSchemaLocation(java.lang.String schemaLocation)

      Accessor method for setting the value of the schemaLocation field.
      Parameters:
        `schemaLocation` - the new value of the schemaLocation field

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