boolean found = false;
try {
Map<String,String> map = new HashMap<String,String>();
//retrieve URI
String fInput = localFileRefs.get(key);
DigitalObjectRefBean dobr = dh.get(fInput);
if( dobr != null ) {
URI uri = dobr.getDownloadUri();
map.put("uri", uri.toString()) ;
map.put("name", this.createShortDoName(dobr) );
map.put("inputID", key);
ret.add(map);
found = true;
} else {
log.error("Digital Object "+key+" could not be found!");
}
} catch (FileNotFoundException e) {
log.error(e.toString());
}
// Catch lost items...
if( !found ) {
Map<String,String> map = new HashMap<String,String>();
String fInput = localFileRefs.get(key);
map.put("uri", fInput);
map.put("name", "ERROR: Digital Object Not Found: " + getLeafnameFromPath(fInput));
map.put("inputID", key);
ret.add(map);
}
}
}
//when we're calling this in evaluate experiment -> fetch the external eval data refs
if(expStage.equals("evaluate expeirment") && this.getEvaluationExternalDigoRefs() != null ){
for(String digoRef : this.getEvaluationExternalDigoRefs()){
try {
Map<String,String> map = new HashMap<String,String>();
DigitalObjectRefBean dobr = dh.get(digoRef);
if(dobr != null ) {
URI uri = dobr.getDownloadUri();
map.put("uri", uri.toString()) ;
map.put("name", this.createShortDoName(dobr) );
map.put("inputID", dobr.getDomUri()+"");
ret.add(map);
} else {
log.error("Digital Object "+digoRef+" could not be found!");
}
} catch (FileNotFoundException e) {