Updates to spreadsheet
Modified resource management due to issue with getID on resource unload
diff --git a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
index 3d09c21..eebf520 100644
--- a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
+++ b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/GenerateCDADataHandler.java
@@ -93,6 +93,7 @@
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -1647,7 +1648,7 @@
long t = stopwatch.elapsed(TimeUnit.MILLISECONDS);
- String s = "file.getName()" + " : " + formatSize(fileSize) + " took " + t / 1000.0 +
+ String s = file.getName() + " : " + formatSize(fileSize) + " took " + t / 1000.0 +
" Second(s) at " +
String.format("%.2f MB/S", (fileSize / (1024 * 1024)) / (t / 1000.0));
monitor.subTask(s);
@@ -1809,7 +1810,7 @@
}
long t = stopwatch.elapsed(TimeUnit.MILLISECONDS);
- String s = "file.getName()" + " : " + formatSize(fileSize) + " took " + t / 1000.0 +
+ String s = file.getName() + " : " + formatSize(fileSize) + " took " + t / 1000.0 +
" Second(s) at " +
String.format("%.2f MB/S", (fileSize / (1024 * 1024)) / (t / 1000.0));
monitor.subTask(s);
@@ -1865,6 +1866,11 @@
}
EncounterUtil.encounterCache.clear();
+ // Due to issue with unload and ECoreUtil.getid not returning id in
+ // public String getURIFragment(EObject eObject) - the
+ // We delete the clinical contents - then we unload
+
+ EcoreUtil.deleteAll(clinicalDocument.eContents(), true);
clinicalDocument.eResource().unload();
currentProcessingTime += stopwatch.elapsed(TimeUnit.MILLISECONDS);