// Check hash of transferable graph to know whether to update or not.\r
if (platformBundle.getHashcode() == existingBundle.getHashcode())\r
continue;\r
- System.out.println("Ontology hashcodes does not match! platformBundle" + platformBundle.getName() + ".getHashCode()=" + platformBundle.getHashcode() + " existingBundle" + existingBundle.getName() + ".getHashCode()=" + existingBundle.getHashcode());\r
+ //System.out.println("Ontology hashcodes do not match: platform bundle="\r
+ // + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode()\r
+ // + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode());\r
reinstallTGs.put(platformBundle, existingBundle);\r
}\r
}\r
boolean changes = TransferableGraphs.hasChanges(readGraph(), oldResources, delta);\r
endTransaction();\r
if (!changes) {\r
- log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString()));\r
+ //log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Nothing to merge for "+tg.toString()));\r
continue;\r
}\r
\r
// 1. Assert there is a database at <workspace>/db\r
session = setupDatabase(databaseDriverId, progressMonitor, workspacePolicy, userAgent);\r
TimeLogger.log("Database setup complete");\r
-\r
+ \r
+ // 1.1 \r
+ XSupport support = session.getService(XSupport.class);\r
+ if (support.rolledback()) {\r
+ try {\r
+ DatabaseIndexing.deleteAllIndexes();\r
+ } catch (IOException e) {\r
+ throw new PlatformException(e);\r
+ }\r
+ }\r
+ \r
// 2. Assert all graphs, and correct versions, are installed to the database\r
synchronizeOntologies(progressMonitor, ontologyPolicy, requireSynchronize);\r
TimeLogger.log("Synchronized ontologies");\r