Revision 4127
Added by daigle about 16 years ago
HarvestDocumentTest.java | ||
---|---|---|
32 | 32 |
import edu.ucsb.nceas.metacat.harvesterClient.Harvester; |
33 | 33 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
34 | 34 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
35 |
import edu.ucsb.nceas.utilities.Options; |
|
36 | 35 |
|
37 | 36 |
import java.io.File; |
38 | 37 |
import java.io.StringReader; |
... | ... | |
51 | 50 |
private Harvester harvester; |
52 | 51 |
private HarvestDocument harvestDocument; |
53 | 52 |
private HarvestSiteSchedule harvestSiteSchedule; |
54 |
/* Initialize Options*/
|
|
53 |
/* Initialize Properties*/
|
|
55 | 54 |
static |
56 | 55 |
{ |
57 | 56 |
try |
58 | 57 |
{ |
59 |
Options.initialize(new File("build/tests/metacat.properties"));
|
|
58 |
PropertyService.getInstance("build/tests");
|
|
60 | 59 |
MetaCatUtil.pathsForIndexing |
61 | 60 |
= MetaCatUtil.getOptionList(PropertyService.getProperty("indexPaths")); |
62 | 61 |
} |
... | ... | |
107 | 106 |
int updateFrequency = 1; |
108 | 107 |
|
109 | 108 |
harvester = new Harvester(); |
110 |
Harvester.loadOptions(test);
|
|
109 |
Harvester.loadProperties(test);
|
|
111 | 110 |
harvester.getConnection(); // initializes the database connection |
112 | 111 |
harvester.initLogIDs(); |
113 | 112 |
harvester.setHarvestStartTime(new Date()); |
Also available in: Unified diff
Replace Options class with PropertyService and create PropertyService using log directory name instead of servlet context