edu.ucsb.nceas.metacat.harvesterClient
Class HarvestSiteSchedule

java.lang.Object
  extended byedu.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
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
 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 © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.