public void migrateAllPhase() throws UnknownHostException { mongoSequence = sequenceColl_target.findOne(); if (mongoSequence == null) { mongoSequence = new MongoSequence(); } /* migratePhaseOne(conceptTermListColl_source, conceptTermColl_source, conceptTermListColl_target, conceptTermColl_target, ContextualCategory.CONCEPT, "concept"); migratePhaseOne(timespanTermListColl_source, timespanTermColl_source, timespanTermListColl_target, timespanTermColl_target, ContextualCategory.TIMESPAN, "period"); migratePhaseOne(agentTermListColl_source, agentTermColl_source, agentTermListColl_target, agentTermColl_target, ContextualCategory.AGENT, "people");*/ migratePhaseOne( placeTermListColl_source, placeTermColl_source, placeTermListColl_target, placeTermColl_target, ContextualCategory.PLACE, "place"); // loadCache(); /* migratePhaseTwo(conceptTermColl_source, conceptTermColl_target, ContextualCategory.CONCEPT, 0); migratePhaseTwo(timespanTermColl_source, timespanTermColl_target, ContextualCategory.TIMESPAN, 0); migratePhaseTwo(agentTermColl_source, agentTermColl_target, ContextualCategory.AGENT, 0); */ migratePhaseTwo(placeTermColl_source, placeTermColl_target, ContextualCategory.PLACE, 0); /*migratePhaseThree(conceptTermListColl_source, conceptTermListColl_target, new ConceptRepresentationMigration(lookupCodeUri, lookupOriginalCodeUri), ContextualCategory.CONCEPT, 0); migratePhaseThree(timespanTermListColl_source, timespanTermListColl_target, new TimespanRepresentationMigration(lookupCodeUri, lookupOriginalCodeUri), ContextualCategory.TIMESPAN, 0); migratePhaseThree(agentTermListColl_source, agentTermListColl_target, new AgentRepresentationMigration(lookupCodeUri, lookupOriginalCodeUri), ContextualCategory.AGENT, 0);*/ migratePhaseThree( placeTermListColl_source, placeTermListColl_target, new PlaceRepresentationMigration(lookupCodeUri, lookupOriginalCodeUri), ContextualCategory.PLACE, 0); sequenceColl_target.remove(new BasicDBObject()); mongoSequence.setId(null); sequenceColl_target.insert(mongoSequence); }
@Override public void deleteShipments() { shipments.remove(new BasicDBObject()); }