Revision: 14469
          http://gate.svn.sourceforge.net/gate/?rev=14469&view=rev
Author:   valyt
Date:     2011-11-01 09:46:37 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
Example of how to use the Sesame helper.

Modified Paths:
--------------
    mimir/trunk/mimir-test/src/gate/mimir/test/QueryTests.java

Modified: mimir/trunk/mimir-test/src/gate/mimir/test/QueryTests.java
===================================================================
--- mimir/trunk/mimir-test/src/gate/mimir/test/QueryTests.java  2011-11-01 
09:38:06 UTC (rev 14468)
+++ mimir/trunk/mimir-test/src/gate/mimir/test/QueryTests.java  2011-11-01 
09:46:37 UTC (rev 14469)
@@ -86,16 +86,21 @@
     Gate.getCreoleRegister().registerDirectories(new 
File("gate-home/plugins/ANNIE-tokeniser").toURI().toURL());
     // load the DB plugin
     Gate.getCreoleRegister().registerDirectories(new 
File("../plugins/db-h2").toURI().toURL());
+//    // load the Sesame plugin
+//    Gate.getCreoleRegister().registerDirectories(new 
File("../plugins/sesame").toURI().toURL());    
     // load the measurements plugin
     Gate.getCreoleRegister().registerDirectories(new 
File("../plugins/measurements").toURI().toURL());
     
     File indexDir = File.createTempFile("mimir-index", null);
     indexDir.delete();
     // change this to use a different helper (e.g for the the ORDI one you 
-    // would use: "gate.mimir.ordi.ORDISemanticAnnotationHelper")
     IndexConfig indexConfig = TestUtils.getTestIndexConfig(indexDir, 
             Class.forName("gate.mimir.db.DBSemanticAnnotationHelper", true, 
                 
Gate.getClassLoader()).asSubclass(AbstractSemanticAnnotationHelper.class));
+//    IndexConfig indexConfig = TestUtils.getTestIndexConfig(indexDir, 
+//      Class.forName("gate.mimir.sesame.SesameSemanticAnnotationHelper", 
true, 
+//          
Gate.getClassLoader()).asSubclass(AbstractSemanticAnnotationHelper.class));
+    
     // now start indexing the documents
     Indexer indexer = new Indexer(indexConfig);
     String pathToZipFile = "data/gatexml-output.zip";
@@ -127,9 +132,9 @@
       engine.close();
       engine = null;
       // recursively delete index dir
-//      if(!TestUtils.deleteDir(indexDir)) {
-//        System.err.println("Could not delete index directory " + indexDir);
-//      }
+      if(!TestUtils.deleteDir(indexDir)) {
+        System.err.println("Could not delete index directory " + indexDir);
+      }
     }
   }
 

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


------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to