@Test public void testSave() throws Exception { assertEquals(0L, recordsCollection.count()); process(); assertEquals(1L, recordsCollection.count()); }
private void save(MongoExtractedRecords mongoRecords) { Document document; try { document = createMongoDocument(mongoRecords); } catch (JsonProcessingException e) { getMonitor().warn("Failed to serialise records for Mongo", e); return; } recordsCollection.insertOne(document); }
MongoTemplateRecordConsumer extends AbstractTemplateRecordConsumer { private void save(MongoExtractedRecords mongoRecords) { Document document; try { document = createMongoDocument(mongoRecords); } catch (JsonProcessingException e) { getMonitor().warn("Failed to serialise records for Mongo", e); return; } recordsCollection.insertOne(document); } }
MongoTemplateRecordConsumer extends AbstractTemplateRecordConsumer { private void save(MongoExtractedRecords mongoRecords) { Document document; try { document = createMongoDocument(mongoRecords); } catch (JsonProcessingException e) { getMonitor().warn("Failed to serialise records for Mongo", e); return; } recordsCollection.insertOne(document); }  }
MongoTemplateRecordConsumer extends AbstractTemplateRecordConsumer { private void save(MongoExtractedRecords mongoRecords) { Document document; try { document = createMongoDocument(mongoRecords); } catch (JsonProcessingException e) { getMonitor().warn("Failed to serialise records for Mongo", e); return; } recordsCollection.insertOne(document); }  @Override void doInitialize(UimaContext aContext); }
MongoTemplateRecordConsumer extends AbstractTemplateRecordConsumer { private void save(MongoExtractedRecords mongoRecords) { Document document; try { document = createMongoDocument(mongoRecords); } catch (JsonProcessingException e) { getMonitor().warn("Failed to serialise records for Mongo", e); return; } recordsCollection.insertOne(document); }  @Override void doInitialize(UimaContext aContext); static final String KEY_MONGO; static final String PARAM_CONTENT_HASH_AS_ID; static final String PARAM_RECORDS_COLLECTION; }