1 40 package org.dspace.browse; 41 42 import java.sql.SQLException ; 43 44 import org.dspace.core.Context; 45 46 52 public class InitializeBrowse 53 { 54 55 private InitializeBrowse() 56 { 57 } 58 59 65 public static void main(String [] argv) 66 { 67 Context context = null; 68 69 try 70 { 71 System.out.print("Indexing all Items in DSpace...."); 72 73 context = new Context(); 74 Browse.indexAll(context); 75 context.complete(); 76 77 System.out.println(" ... Done"); 78 } 79 catch (SQLException sqle) 80 { 81 if (context != null) 82 { 83 context.abort(); 84 } 85 86 System.err.println("Error: Browse index NOT created"); 87 sqle.printStackTrace(); 88 } 89 } 90 } 91 | Popular Tags |