for (InvMetadata md : mds) {
log.info("Found metadata "+md.toString());
}
//--- check and see whether this dataset is DIF writeable
DIFWriter difWriter = new DIFWriter();
StringBuffer sBuff = new StringBuffer();
Element dif = null;
if (difWriter.isDatasetUseable(ds, sBuff)) {
log.info("Yay! Dataset has DIF compatible metadata "+sBuff.toString());
dif = difWriter.writeOneEntry(ds, sBuff);
} else {
log.info("Dataset does not have DIF compatible metadata so we will write a relaxed DIF entry\n"+sBuff.toString());
dif = difWriter.writeOneRelaxedEntry(ds, sBuff);
addCoordSys = true;
}
//--- get the UUID assigned to the DIF record
String uuid = dif.getChild("Entry_ID", difNS).getText();