Revision: 19708
          http://sourceforge.net/p/gate/code/19708
Author:   ian_roberts
Date:     2016-10-29 16:23:28 +0000 (Sat, 29 Oct 2016)
Log Message:
-----------
Need to init GATE and load plugins in order to be able to parse the index 
config.

Modified Paths:
--------------
    mimir/trunk/mimir-core/src/gate/mimir/util/TruncateIndex.java

Modified: mimir/trunk/mimir-core/src/gate/mimir/util/TruncateIndex.java
===================================================================
--- mimir/trunk/mimir-core/src/gate/mimir/util/TruncateIndex.java       
2016-10-29 16:15:16 UTC (rev 19707)
+++ mimir/trunk/mimir-core/src/gate/mimir/util/TruncateIndex.java       
2016-10-29 16:23:28 UTC (rev 19708)
@@ -14,6 +14,7 @@
  */
 package gate.mimir.util;
 
+import gate.Gate;
 import gate.mimir.IndexConfig;
 import gate.mimir.IndexConfig.SemanticIndexerConfig;
 import gate.mimir.IndexConfig.TokenIndexerConfig;
@@ -159,7 +160,14 @@
   };
 
   public static void main(String... args) throws Exception {
-    truncateIndex(new File(args[0]));
+    Gate.runInSandbox(true);
+    Gate.init();
+    int i = 0;
+    while(i < args.length && "-p".equals(args[i])) {
+      Gate.getCreoleRegister().registerDirectories(new 
File(args[++i]).toURI().toURL());
+      i++;
+    }
+    truncateIndex(new File(args[i]));
   }
 
   /**

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to