Revision 6852
Added by ben leinfelder over 12 years ago
GenerateSystemMetadata.java | ||
---|---|---|
61 | 61 |
boolean success = true; |
62 | 62 |
// include ORE? |
63 | 63 |
boolean includeOre = true; |
64 |
boolean downloadData = true; |
|
65 |
|
|
64 | 66 |
try { |
65 |
generateMissingSystemMetadata(includeOre); |
|
67 |
generateMissingSystemMetadata(includeOre, downloadData);
|
|
66 | 68 |
} catch (Exception e) { |
67 | 69 |
String msg = "Problem generating missing system metadata: " + e.getMessage(); |
68 | 70 |
log.error(msg, e); |
... | ... | |
95 | 97 |
* @throws McdbDocNotFoundException |
96 | 98 |
* @throws ServiceFailure |
97 | 99 |
*/ |
98 |
public void generateMissingSystemMetadata(boolean includeOre) |
|
100 |
public void generateMissingSystemMetadata(boolean includeOre, boolean downloadData)
|
|
99 | 101 |
throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, |
100 | 102 |
NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException |
101 | 103 |
{ |
... | ... | |
107 | 109 |
//for each id, add a system metadata doc |
108 | 110 |
try { |
109 | 111 |
log.debug("generating missing system metadata for " + localId); |
110 |
generateMissingSystemMetadata(localId, includeOre); |
|
112 |
generateMissingSystemMetadata(localId, includeOre, downloadData);
|
|
111 | 113 |
} catch (Exception e) { |
112 | 114 |
log.error("Error generating system metadata for: " + localId, e); |
113 | 115 |
} |
... | ... | |
137 | 139 |
* @throws PropertyNotFoundException |
138 | 140 |
* @throws McdbDocNotFoundException |
139 | 141 |
*/ |
140 |
public void generateMissingSystemMetadata(String localId, boolean includeOre) |
|
142 |
public void generateMissingSystemMetadata(String localId, boolean includeOre, boolean downloadData)
|
|
141 | 143 |
throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, |
142 | 144 |
NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException |
143 | 145 |
{ |
... | ... | |
147 | 149 |
|
148 | 150 |
//generate required system metadata fields from the document |
149 | 151 |
try { |
150 |
sm = SystemMetadataFactory.createSystemMetadata(localId, includeOre); |
|
152 |
sm = SystemMetadataFactory.createSystemMetadata(localId, includeOre, downloadData);
|
|
151 | 153 |
} catch (Exception e1) { |
152 | 154 |
e1.printStackTrace(); |
153 | 155 |
ServiceFailure sf = new ServiceFailure("00","Exception in generateMissingSystemMetadata: " + |
Also available in: Unified diff
download remote data and save locally when it is referenced by an EML package, then include it in the ORE map.
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5522