Revision 2384
Added by Duane Costa about 19 years ago
Harvester.java | ||
---|---|---|
27 | 27 |
import com.oreilly.servlet.MailMessage; |
28 | 28 |
import edu.ucsb.nceas.utilities.Options; |
29 | 29 |
import java.io.File; |
30 |
import java.io.FileInputStream; |
|
31 | 30 |
import java.io.IOException; |
32 | 31 |
import java.io.PrintStream; |
33 | 32 |
import java.sql.Connection; |
... | ... | |
63 | 62 |
public static final String marker = |
64 | 63 |
"*****************************************************************************"; |
65 | 64 |
public static Options options = null; |
65 |
private static String schemaLocation = null; |
|
66 | 66 |
|
67 | 67 |
|
68 | 68 |
/* |
... | ... | |
118 | 118 |
Integer p; // Used in determining the period |
119 | 119 |
long startTime; // time that a harvest run starts |
120 | 120 |
boolean test = false; // Passed to loadOption() |
121 |
|
|
122 |
if (args[0] != null) { |
|
123 |
schemaLocation = args[0]; |
|
124 |
} |
|
121 | 125 |
|
122 | 126 |
System.out.println(marker); |
123 | 127 |
System.out.println("Starting Harvester"); |
... | ... | |
525 | 529 |
|
526 | 530 |
for (int i = 0; i < harvestSiteScheduleList.size(); i++) { |
527 | 531 |
harvestSiteSchedule = (HarvestSiteSchedule)harvestSiteScheduleList.get(i); |
532 |
|
|
533 |
if (Harvester.schemaLocation != null) { |
|
534 |
harvestSiteSchedule.setSchemaLocation(Harvester.schemaLocation); |
|
535 |
} |
|
536 |
|
|
528 | 537 |
harvestSiteSchedule.harvestDocumentList(); |
529 | 538 |
} |
530 | 539 |
} |
Also available in: Unified diff
Implement a new HarvesterServlet for running Harvester as a servlet. This eliminates the need to run Harvester in a terminal window. By default, the HarvesterServlet is commented out in lib/web.xml.tomcat(3,4,5). The user documentation will be modified to instruct Harvester administrators to uncomment the HarvesterServlet entry.