}
br.close();
String migrationResult = sb.toString();
wfResultItem.addLogInfo("Migrated file contents: " + migrationResult);
Metadata migrationMetadata = new Metadata(dgoA.getPermanentUri(), MIGRATION_METADATA, migrationResult);
dgoA = addMetadata(dgoA, migrationMetadata);
} catch (Exception e) {
wfResultItem.addLogInfo("migration error: " + e.getMessage());
}
}
// Insert in JCR repository
wfResultItem.addLogInfo("STEP 3: Insert in JCR repository. initial digital object: " + dgoA.toString());
// Manage the Digital Object Data Registry:
wfResultItem.addLogInfo("Initialize JCR repository instance.");
JcrDigitalObjectManagerImpl dodm =
(JcrDigitalObjectManagerImpl) JcrDigitalObjectManagerImpl.getInstance();
DigitalObject dgoB = dodm.store(PERMANENT_URI_PATH, dgoA, true);
wfResultItem.addLogInfo("Completed storing in JCR repository: " + dgoB.toString());
// Enrich digital object with metadata from characterization service
Metadata characterisationMetadata = new Metadata(dgoB.getPermanentUri(), CHARACTERISATION_METADATA, "testdata");
dgoB = addMetadata(dgoB, characterisationMetadata);
// Update digital object in JCR repository
wfResultItem.addLogInfo("STEP 4: Update digital object in JCR repository. initial digital object: " +
dgoB.toString());