@Override public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
  DB db=mongoResource.getDB();
  collection=db.getCollection(collectionName);
  collection.createIndex(new BasicDBObject(FIELD_UNIQUE_ID,1));
  collection.createIndex(new BasicDBObject(FIELD_PUBLISHEDIDS,1));
  stopFeatures=new HashSet<String>();
  stopFeatures.add("uima.cas.AnnotationBase:sofa");
  stopFeatures.add("uk.gov.dstl.baleen.types.BaleenAnnotation:internalId");
  maxContentLength=ConfigUtils.stringToInteger(maxContentLengthString,0);
}

@ Override public void doInitialize ( UimaContext aContext ) throws ResourceInitializationException { DB db = mongoResource . getDB ( ) ; collection = db . getCollection ( collectionName ) ; collection . createIndex ( new BasicDBObject ( FIELD_UNIQUE_ID , 1 ) ) ; collection . createIndex ( new BasicDBObject ( FIELD_PUBLISHEDIDS , 1 ) ) ; stopFeatures = new HashSet < String > ( ) ; stopFeatures . add ( "uima.cas.AnnotationBase:sofa" ) ; stopFeatures . add ( "uk.gov.dstl.baleen.types.BaleenAnnotation:internalId" ) ; maxContentLength = ConfigUtils . stringToInteger ( maxContentLengthString , 0 ) ; }
get the mongodb , collection and create some indexes
