package uk.ac.ebi.quickgo.indexer;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * Process to index all the information in Solr
 * 
 * @author cbonill
 * 
 */
public class QuickGOIndexerProcess {


		static ApplicationContext appContext;
		static QuickGOIndexer quickGOIndexer;

		/**
		 * We can use this method for indexing the data in Solr for the moment
		 * 
		 * @param args
		 */
		public static void main(String[] args) {

			appContext = new ClassPathXmlApplicationContext("common-beans.xml",	"indexing-beans.xml", "query-beans.xml");
			quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
			String start = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
			System.out.println("STARTED: " + start);
			quickGOIndexer.index();
			String end = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
			System.out.println("DONE: " + end);
		}	
}

@@ -25,24 +25,53 @@
 o.indexer;%0A%0A
+import java.text.DateFormat;%0A
 import java.
@@ -307,17 +307,16 @@
  Solr%0A *
- 
 %0A * @aut
@@ -329,17 +329,16 @@
 onill%0A *
- 
 %0A */%0Apub
@@ -537,17 +537,16 @@
 ent%0A%09%09 *
- 
 %0A%09%09 * @p
@@ -815,46 +815,31 @@
 t = 
-new SimpleDateFormat(%22yyyyMMdd_HHmmss%22
+DateFormat.getInstance(
 ).fo
@@ -905,110 +905,385 @@
 ln(%22
-STARTED: %22 + start);%0A%09%09%09quickGOIndexer.index();%0A%09%09%09String end = new SimpleDateFormat(%22yyyyMMdd_HHmmss%22
+================================================================%22);%0A%09%09%09System.out.println(%22STARTED: %22 + start);%0A%09%09%09System.out.println(%22================================================================%22);%0A%09%09%09quickGOIndexer.index();%0A%09%09%09System.out.println(%22================================================================%22);%0A%09%09%09System.out.println(%22DONE: %22 + DateFormat.getInstance(
 ).fo
@@ -1312,32 +1312,33 @@
 nce().getTime())
+)
 ;%0A%09%09%09System.out.
@@ -1350,27 +1350,78 @@
 ln(%22
-DONE: %22 + end
+================================================================%22
 );%0A%09%09%7D
-%09
 %0A%7D%0A

Improve the formatting of the output to stdout.