Revision 4125
Added by daigle almost 16 years ago
HarvestLog.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
package edu.ucsb.nceas.metacat.harvesterClient; |
26 | 26 |
|
27 |
import edu.ucsb.nceas.utilities.Options; |
|
28 | 27 |
import java.io.PrintStream; |
29 | 28 |
import java.sql.Connection; |
30 | 29 |
import java.sql.ResultSet; |
... | ... | |
35 | 34 |
import java.util.Date; |
36 | 35 |
import java.util.StringTokenizer; |
37 | 36 |
|
37 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
|
38 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
|
38 | 39 |
|
39 | 40 |
/** |
40 | 41 |
* Manages log entries to be inserted to the HARVEST_LOG table. |
... | ... | |
252 | 253 |
String getHarvestOperation(String fieldName, String harvestOperationCode) { |
253 | 254 |
String explanation = "No explanation available"; |
254 | 255 |
String harvestOperationCodeLevel = "debug"; |
255 |
Options options = Harvester.options; |
|
256 |
String propertyValue; |
|
256 |
String propertyValue = null; |
|
257 | 257 |
String returnString = ""; |
258 | 258 |
StringTokenizer stringTokenizer; |
259 | 259 |
|
260 |
propertyValue = options.getOption(harvestOperationCode); |
|
261 |
stringTokenizer = new StringTokenizer(propertyValue, ","); |
|
260 |
try { |
|
261 |
propertyValue = PropertyService.getProperty(harvestOperationCode); |
|
262 |
} catch (PropertyNotFoundException pnfe) { |
|
263 |
System.out.println("Error trying to get property: " + harvestOperationCode |
|
264 |
+ " : " + pnfe.getMessage()); |
|
265 |
} |
|
266 |
stringTokenizer = new StringTokenizer(propertyValue, ","); |
|
262 | 267 |
|
263 | 268 |
explanation = (String) stringTokenizer.nextElement(); |
264 | 269 |
harvestOperationCodeLevel = (String) stringTokenizer.nextElement(); |
Also available in: Unified diff
Replace Options class with PropertyService