Revision: 14465
          http://gate.svn.sourceforge.net/gate/?rev=14465&view=rev
Author:   valyt
Date:     2011-10-31 17:19:36 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Get the sizes from the first token index instead of the actaul annotation index 
(so that the sizes are the actual ones).

Modified Paths:
--------------
    mimir/trunk/mimir-core/.classpath
    mimir/trunk/mimir-core/src/gate/mimir/search/QueryEngine.java
    mimir/trunk/mimir-core/src/gate/mimir/search/query/AnnotationQuery.java

Modified: mimir/trunk/mimir-core/.classpath
===================================================================
--- mimir/trunk/mimir-core/.classpath   2011-10-31 15:54:25 UTC (rev 14464)
+++ mimir/trunk/mimir-core/.classpath   2011-10-31 17:19:36 UTC (rev 14465)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="src" path="src"/>
-       <classpathentry exported="true" kind="lib" path="lib/gate.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/gate.jar" 
sourcepath="/GATE"/>
        <classpathentry exported="true" kind="lib" 
path="lib/xstream-1.3.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.15.jar"/>
        <classpathentry exported="true" kind="lib" 
path="lib/commons-configuration-1.5.jar"/>
@@ -13,7 +13,6 @@
        <classpathentry exported="true" kind="lib" 
path="lib/gate-compiler-jdt.jar"/>
        <classpathentry exported="true" kind="lib" 
path="lib/commons-logging-1.1.jar"/>
        <classpathentry exported="true" kind="lib" 
path="lib/commons-io-1.4.jar"/>
-       <classpathentry kind="con" 
path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry exported="true" kind="lib" path="lib/nekohtml-X.jar"/>
        <classpathentry exported="true" kind="lib" 
path="lib/commons-collections-3.2.1.jar"/>

Modified: mimir/trunk/mimir-core/src/gate/mimir/search/QueryEngine.java
===================================================================
--- mimir/trunk/mimir-core/src/gate/mimir/search/QueryEngine.java       
2011-10-31 15:54:25 UTC (rev 14464)
+++ mimir/trunk/mimir-core/src/gate/mimir/search/QueryEngine.java       
2011-10-31 17:19:36 UTC (rev 14465)
@@ -332,8 +332,8 @@
           for(SemanticAnnotationHelper sah : sic.getHelpers()){
             sah.init(this);
             if(sah.isInDocumentMode() && documentSizes == null) {
-              documentSizes =
-                
getAnnotationIndex(sic.getAnnotationTypes()[0]).getIndex().sizes;
+              // we need to load the document sizes from a token index
+              documentSizes = getIndexes()[0].getIndex().sizes;
             }            
           }
         }

Modified: 
mimir/trunk/mimir-core/src/gate/mimir/search/query/AnnotationQuery.java
===================================================================
--- mimir/trunk/mimir-core/src/gate/mimir/search/query/AnnotationQuery.java     
2011-10-31 15:54:25 UTC (rev 14464)
+++ mimir/trunk/mimir-core/src/gate/mimir/search/query/AnnotationQuery.java     
2011-10-31 17:19:36 UTC (rev 14465)
@@ -161,8 +161,7 @@
       if(underlyingHit == null) return null;
       int doc = underlyingHit.getDocumentId();
       if(isInDocumentMode) {
-        return new Binding(query, doc, 0,
-          engine.getDocumentSizes().getInt(doc),
+        return new Binding(query, doc, 0, 
engine.getDocumentSizes().getInt(doc),
           underlyingHit.getContainedBindings());        
       } else {
         return new Binding(query, doc,

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


------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to