code: public String process(String document, Date documentCreationTime, ResultFormatter resultFormatter)
  			throws DocumentCreationTimeMissingException {
  		logger.log(Level.INFO, "Processing started");
  
  		// Generate jcas object ----------
  		logger.log(Level.FINE, "Generate CAS object");
  		JCas jcas = null;
  		try {
  			jcas = jcasFactory.createJCas();
  			jcas.setDocumentText(document);
  			logger.log(Level.FINE, "CAS object generated");
  		} catch (Exception e) {
  			e.printStackTrace();
  			logger.log(Level.WARNING, "Cas object could not be generated");
  		}
  
  		// Process jcas object -----------
  		try {
  			logger.log(Level.FINER, "Establishing preconditions...");
  			provideDocumentCreationTime(jcas, documentCreationTime);
  			establishHeidelTimePreconditions(jcas);
  			logger.log(Level.FINER, "Preconditions established");
  
  			heidelTime.process(jcas);
  
  			logger.log(Level.INFO, "Processing finished");
  		} catch (Exception e) {
  			e.printStackTrace();
  			logger.log(Level.WARNING, "Processing aborted due to errors");
  		}
  
  		// process interval tagging ---
  		if(doIntervalTagging)
  			runIntervalTagger(jcas);
  		
  		// Process results ---------------
  		logger.log(Level.FINE, "Formatting result...");
  		// PrintAnnotations.printAnnotations(jcas.getCas(), System.out);
  		String result = null;
  		try {
  			result = resultFormatter.format(jcas);
  			logger.log(Level.INFO, "Result formatted");
  		} catch (Exception e) {
  			e.printStackTrace();
  			logger.log(Level.WARNING, "Result could not be formatted");
  		}
  
  		return result;
  	}
docs: Processes document with HeidelTime
  
  @param document
  @param documentCreationTime
  Date when document was created - especially important if
  document is of type {@link DocumentType#NEWS}
  @return Annotated document
  @throws DocumentCreationTimeMissingException
  If document creation time is missing when processing a
  document of type {@link DocumentType#NEWS}