Index: /SRUAggregator/trunk/pom.xml
===================================================================
--- /SRUAggregator/trunk/pom.xml	(revision 2693)
+++ /SRUAggregator/trunk/pom.xml	(revision 2694)
@@ -60,4 +60,9 @@
             <version>1.2.2</version>
         </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-client</artifactId>
+            <version>1.17.1</version>
+        </dependency>
     </dependencies>
     <build>
Index: /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/Aggregator.java
===================================================================
--- /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/Aggregator.java	(revision 2693)
+++ /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/Aggregator.java	(revision 2694)
@@ -3,4 +3,5 @@
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
+import com.sun.jersey.api.client.Client;
 import eu.clarin.sru.client.SRUVersion;
 import eu.clarin.sru.fcs.aggregator.data.CenterRegistry;
@@ -15,4 +16,6 @@
 import java.util.Set;
 import java.util.logging.*;
+import org.zkoss.util.media.AMedia;
+import org.zkoss.util.media.Media;
 import org.zkoss.zk.ui.Component;
 import org.zkoss.zk.ui.Executions;
@@ -35,4 +38,12 @@
 import org.zkoss.zul.Window;
 import org.zkoss.zul.event.ZulEvents;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.config.ClientConfig;
+import com.sun.jersey.api.client.config.DefaultClientConfig;
+import eu.clarin.weblicht.wlfxb.tc.api.GeoLongLatFormat;
+import eu.clarin.weblicht.wlfxb.tc.api.Token;
+import eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusStored;
+import eu.clarin.weblicht.wlfxb.xb.WLData;
+import javax.ws.rs.core.MediaType;
 
 /**
@@ -77,4 +88,7 @@
     @Wire
     private Label searchResultsProgress;
+
+    private WebResource mapGenerator;
+    public static final String MAPS_SERVICE_URL = "http://weblicht.sfs.uni-tuebingen.de/rws/service-geolocationconsumer/resources/geoloc/";
     
     private Map<String, List<String>> xAggregationContext;
@@ -105,4 +119,7 @@
         tree.setItemRenderer(new CorpusTreeNodeRenderer());
         tree.setMultiple(true);
+        
+        
+        //tempMap();
 
     }
@@ -139,4 +156,9 @@
         int maxRecords = Integer.parseInt(maximumRecordsSelect.getValue());
         searchResultsController.executeSearch(tree.getSelectedItems(), maxRecords, searchString.getText(), version);
+    }
+    
+    @Listen("onOK = #searchString")
+    public void onEnterSearchString(Event ev) {
+        onExecuteSearch(ev);
     }
  
@@ -231,3 +253,27 @@
 
     }
+
+    private void tempMap() {
+        ClientConfig config = new DefaultClientConfig();
+        Client client = Client.create(config);
+        mapGenerator = client.resource(MAPS_SERVICE_URL);
+        TextCorpusStored tc = new TextCorpusStored("en");
+        Token t1 = tc.createTokensLayer().addToken("Virginia");
+        List<Token> s1 = new ArrayList<Token>(); s1.add(t1);
+        tc.createSentencesLayer().addSentence(s1);
+        tc.createGeoLayer("unknown", GeoLongLatFormat.DegDec);
+        //tc.getGeoLayer().addPoint("138.56027", "-34.6663", 15.0, null, null, null, t1);
+        WLData data = new WLData(tc);
+        
+        Iframe resultsPic = (Iframe) resultsBox.getFellow("resultsPic");
+        
+        try {
+                    String output = mapGenerator.path("3").accept(MediaType.TEXT_HTML).type("text/tcf+xml").post(String.class, data);
+                    Media media = new AMedia("map-" + 4 + ".html", null, "text/html", output);
+                    resultsPic.setContent(media);
+                } catch (Exception e) {
+                    Logger.getLogger(Aggregator.class.getName()).log(Level.SEVERE, "ERROR accessing the maps generator service", e);
+                    Messagebox.show("ERROR accessing the maps generator service \n" + e.getMessage(), "FCS", 0, Messagebox.INFORMATION);
+                }
+    }
 }
Index: /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/data/Endpoint.java
===================================================================
--- /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/data/Endpoint.java	(revision 2693)
+++ /SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/data/Endpoint.java	(revision 2694)
@@ -87,6 +87,8 @@
         corpora = new ArrayList<Corpus>();
         SRUScanResponse corporaResponse = null;
-        StringBuilder scanClause = new StringBuilder("fcs.resource");
+        
         try {
+            // old specification
+            StringBuilder scanClause = new StringBuilder("fcs.resource");
             SRUClient sruClient = new SRUClient(SRUVersion.VERSION_1_2);
             SRUScanRequest corporaRequest = new SRUScanRequest(url);
@@ -95,4 +97,11 @@
             //corporaRequest.setExtraRequestData("x-cmd-resource-info", "true");
             corporaResponse = sruClient.scan(corporaRequest);
+            if (corporaResponse == null || !corporaResponse.hasTerms() ) {
+                corporaRequest = new SRUScanRequest(url);
+                // new specification
+                corporaRequest.setScanClause(scanClause.toString() + "=root");
+                corporaResponse = sruClient.scan(corporaRequest);
+            }
+            
         } catch (SRUClientException ex) {
             logger.log(Level.SEVERE, "Error accessing corpora at {0} {1} {2}", new String[]{url, ex.getClass().getName(), ex.getMessage()});
Index: /SRUAggregator/trunk/src/main/webapp/index.zul
===================================================================
--- /SRUAggregator/trunk/src/main/webapp/index.zul	(revision 2693)
+++ /SRUAggregator/trunk/src/main/webapp/index.zul	(revision 2694)
@@ -102,4 +102,6 @@
                                 </groupbox>
 
+
+<!--
                                 <separator/>
                                 <separator/>
@@ -128,4 +130,5 @@
                                     </div>
                                 </groupbox>
+-->
                                 <separator/>
                             </panelchildren>
@@ -160,8 +163,8 @@
                     </north>
                     <center  margins="0,5,0,0" autoscroll="true" border="0">
-                        <panel>
+                        <panel width="100%" height="100%">
                             <panelchildren id="resultsPanel" style="overflow: auto">
-                                <window id="resultsBox" style="overflow:auto;">
-                                    <iframe src="help.html" width="800px" height="400px"/>
+                                <window id="resultsBox" style="overflow:auto;" width="100%" height="100%">
+                                    <iframe id="resultsPic" src="help.html" width="100%" height="100%"/>
                                 </window>
                                 <label value=" " id="searchResultsProgress" style="border-width:0px;margin-left:5px;"/>
