+ "] is not being managed by this Ingestion Resource!";
LOG.log(Level.WARNING, errorMsg);
return this.encodeIngestResponseAsJSON(false, errorMsg);
}
Ingester ingest = this.configureIngester();
MetadataResource metService = new MetadataResource();
for (String file : task.getFileList()) {
Metadata fileMet = null;
try {
String vFilePath = this.getVirtualPath(CurationService.config
.getStagingAreaPath(), file);
LOG.log(Level.FINE,
"IngestionResource: getting staging metadata for virtual path: ["
+ vFilePath + "]");
fileMet = metService.getStagingMetadata(vFilePath, task.getExtConf()
.getIdentifier(), false);
} catch (Exception e) {
e.printStackTrace();
return this.encodeIngestResponseAsHTML(false, e.getMessage());
}
try {
ingest.ingest(safeGetUrl(CurationService.config.getFileMgrURL()),
new File(file), fileMet);
} catch (IngestException e) {
e.printStackTrace();
return this.encodeIngestResponseAsHTML(false, e.getMessage());
}