Index: /FederatedSearch/mpi-endpoint/CHANGES.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/CHANGES.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/CHANGES.txt	(revision 6059)
@@ -0,0 +1,71 @@
+-- 25/02/2015, 16:43. Schema locations (with even amounts of uri's) are added as context parameters
+to the application's web.xml
+
+-- 25/02/2015.  The following fragment have been moved from the tomcat's web.xml to the 
+applications' web.xml.
+  <context-param> 
+    <param-name>nl.mpi.cqlsearch2.imdiNamespaceURL</param-name>
+    <param-value>http://www.mpi.nl/IMDI/Schema/IMDI</param-value>
+  </context-param> 
+  
+  <context-param> 
+    <param-name>nl.mpi.cqlsearch2.imdiLanguageMapURL</param-name>
+    <param-value>http://www.mpi.nl/IMDI/Schema/LanguageCodeMap.xml</param-value>
+  </context-param> 
+  
+  <context-param> 
+    <param-name>nl.mpi.cqlsearch2.handleResolverURL</param-name>
+    <param-value>http://hdl.handle.net</param-value>
+  </context-param>
+  
+ 
+
+-- 16/02/2015. The bug with recordSchemaIdentifier is fixed. The bug is discovered after testing
+lux17's deployment on http://weblicht.sfs.uni-tuebingen.de/Aggregator-testing. also, some
+URL are moved from the source code to the web.xml as parameters.
+
+-- 16/02/2015. schemaRecordURL corrected to http://clarin.eu/fcs/resource. The complete  set of 
+permutations is generated now for clauses of an AND-request (using guava library). The mapping of 
+obsolete language codes in imdi-corpora to the ISO-3 ones is now happens not inside the package
+but using a corpus-management-generated mappoing at
+http://www.mpi.nl/IMDI/Schema/LanguageCodeMap.xml.
+
+-- 11/02/2015. 
+1) The endpoint is adjusted for the new FCS specification, that is the responds for âexplainâ and 
+âsearchRetriwveâ satisfy the new schema (it is done using JAXB translating schemata to java classes). 
+2) The search termas with AND and OR are implemented. 
+3) Languages of searchable corpora and their subcorpora are retrieved via retrieving languages 
+of the corresponding sessions; cache is used to preserve retrieved languages; to initiate cache
+(done in a separate thread) one needs to (re)start the application on the tomcat.
+
+-- 29/11/2013. Resolved handle problem (discovered for talkbank and childes which do not have handles).
+The new version delivers the link to the imd-file of a node if there is no handle.
+Moreover, it recongnizes such links when they are given, 
+instead of handles, as parameters for the search and scan operations. 
+
+-- the landing-page URL refers now not to xml-file but to a user-friendly page.
+
+November 2013 
+-- the parent pom version is updated to 1.7
+-- the mpi-libraries versions (including annot-search, corpusstructure- api) are updated to the latest ones mentioned on lux15
+-- the scan operation now is able to recognize handles ending with
+@format=cmdi, which is necessary froVLO-aggregator connection
+
+-- June 2013. CQLConfig.xml is removed, because all necessary parameters (incl. the list of searchable corpora)
+are placed in web.xml
+
+
+-- 24-25/01: README.txt, INSTALL.txt, UPDATE.txt, CHANGES.txt are added.
+
+January 2013:
+-- testing
+-- redistributing parameters in the project's context.xml, web.xml, CQLConfig.xml so that they
+satisfy criteria of the reasonable architecture and requirements of the external sru-library. 
+
+
+December 2012:
+-- small update of the code according to be compatible with the new version of the search library
+(done by Eric)
+
+
+
Index: /FederatedSearch/mpi-endpoint/DeploymentSettings/TestURIs.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/DeploymentSettings/TestURIs.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/DeploymentSettings/TestURIs.txt	(revision 6059)
@@ -0,0 +1,29 @@
+Note: <servlet> below is
+
+cqlservlet.mpi.nl/ or corpus1.mpi.nl/ds/cqlsearch/ for corpus1,
+lux17.mpi.nl/ds/cqlsearch/ for lux17
+lux16.mpi.nl/ds/cqlsearch2/ for lux16
+
+EXPLAIN
+
+<servlet>/?operation=explain&version=1.2&x-fcs-endpoint-description=true
+
+SEARCH
+
+<servlet>/?operation=searchRetrieve&query=kind&version=1.2
+
+<servlet>/?operation=searchRetrieve&query=kind&version=1.1&maximumRecords=19&startRecord=3
+
+Another search term (place instead of kind, use " "): "Bayern MÃŒnchen" (checks two-word search term and umlauts)
+
+<Servlet>?/?operation=searchRetrieve&version=1.2&query=kind AND (taal AND non-verbaal)&x-fcs-context=hdl:LUX16/00-0000-0000-0005-0986-5,hdl:LUX16/00-0000-0000-0006-584A-9
+
+In the last example node handles are given for Lux16, so replace it for some example nodes for <servlet>. Fro instance: for corpus1 there are
+
+hdl:1839/00-0000-0000-0001-53A5-2@format=cmdi (CGN)
+hdl:1839/00-0000-0000-0008-7CF8-E@format=cmdi (ESF)
+hdl:1839/00-0000-0000-0003-46DA-E@format=cmdi (IPA)
+
+
+Do not put the handles in â.  The postfix @format=cmdi is used when VLO triggers search.
+
Index: /FederatedSearch/mpi-endpoint/DeploymentSettings/exampleAnnexURI
===================================================================
--- /FederatedSearch/mpi-endpoint/DeploymentSettings/exampleAnnexURI	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/DeploymentSettings/exampleAnnexURI	(revision 6059)
@@ -0,0 +1,1 @@
+http://lux16.mpi.nl/ds/annex/runLoader?nodeid=MPI457850%23&time=1000&duration=1000&viewType=timeline
Index: /FederatedSearch/mpi-endpoint/DeploymentSettings/web.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/DeploymentSettings/web.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/DeploymentSettings/web.txt	(revision 6059)
@@ -0,0 +1,123 @@
+The web.xml should contain the following parameters: 
+
+The following parameters should be present in TomCat's web.xml 
+(with their values -- directories and passwords
+depending on the server and set for lux16, lux17, corpus1  by the adminsitrator)
+
+  <!-- ================= Trova (Annex, CQL Search) Configuration ===============  -->
+  <!--
+    *** Database configuration ***
+    
+    Note that Annex and Trova only need read rights to corpusstructure
+    + annex DB. These database settings may be used by other apps.
+-->
+  <resource-ref>
+    <description>Corpusstructure DB Datasource</description>
+    <res-ref-name>jdbc/CSDB</res-ref-name>
+    <res-type>javax.sql.DataSource</res-type>
+    <res-auth>Container</res-auth>
+  </resource-ref>
+  <context-param>
+    <param-name>nl.mpi.db.corpusstructure</param-name>
+    <param-value>java:comp/env/jdbc/CSDB</param-value>
+  </context-param>
+  <context-param>
+    <param-name>nl.mpi.annot.search.searchDbURL</param-name>
+    <param-value>jdbc:postgresql://lux16.mpi.nl:5432/annex</param-value>
+  </context-param>
+  <context-param>
+    <param-name>nl.mpi.annot.search.searchDbUser</param-name>
+    <param-value>annexreader</param-value>
+  </context-param>
+  
+  <context-param>
+    <param-name>nl.mpi.annot.search.searchDbPassword</param-name>
+    <param-value>PUT PASSWORD HERE</param-value>
+  </context-param>
+  
+  <context-param> 
+    <param-name>nl.mpi.annot.search.luceneDirectory</param-name>
+    <param-value>/Users/olhsha/repositories/lucene.5</param-value>
+  </context-param> 
+  
+  <context-param> 
+  <param-name>nl.mpi.annexUrl</param-name>
+  <param-value>http://lux16.mpi.nl/ds/annex/runLoader</param-value>
+  </context-param> 
+  
+ <!-- CQL search specific parameters -->
+  
+ <!-- lux16, lux17 <param-value>olhsha@mpi.nl</param-value> -->
+  <!-- corpus1 <param-value>cqlservlet</param-value> --> 
+  <context-param>
+    <param-name>nl.mpi.cqlsearch2.userId</param-name>
+    <param-value>olhsha@mpi.nl</param-value>
+  </context-param>
+  
+  
+  <!-- lux16 <param-value>MPI457405#,MPI457406#</param-value> CGN, ESF-->
+  <!-- lux17 <param-value>MPI86949#,MPI556280#</param-value> CGN, ESF -->
+  <!-- corpus1 <param-value>MPI86949#,MPI1377055#,MPI214746#,MPI1296694#,MPI1259419#</param-value> 
+    CGN, ESF, IFA, childes, talkbank-->
+  <context-param>
+    <param-name>nl.mpi.cqlsearch2.searchableCorpora</param-name>
+    <param-value>MPI86949#,MPI556280#</param-value>
+  </context-param>
+  
+  <!-- make it 1 or 2 less than the number of cores of the machine where Tomcat running cql-search works, 
+    e.g. for 4 cores  make it 3 threads-->
+  <context-param>
+    <param-name>nl.mpi.cqlsearch2.tierCollectionThreads</param-name>
+    <param-value>3</param-value>
+  </context-param>
+  
+  <!-- make it 1 or 2 less than the number of the cores of the server where the database is, 
+    e.g. for 4 cores  make it 3 threads -->  
+  <context-param>
+    <param-name>nl.mpi.cqlsearch2.queryThreads</param-name>
+    <param-value>3</param-value>
+  </context-param>
+   
+  <context-param> 
+    <param-name>eu.clarin.sru.server.database</param-name>
+    <param-value>cqlsearch2</param-value>
+    <!--  ds/cqlsearch2 for lux16, , ds/cqlsearch for lux17, ds/cqlsearch or cqlservlet.mpi.nl for corpus1.mpi.ml  -->
+  </context-param> 
+  
+  <context-param> 
+    <param-name>eu.clarin.sru.server.host</param-name>
+    <param-value>localhost</param-value>
+    <!-- respectively: lux16.mpi.ml, lux17.mpi.nl, corpus1.mpi.ml  -->
+  </context-param> 
+  
+  <context-param> 
+    <param-name>eu.clarin.sru.server.port</param-name>
+    <param-value>8080</param-value>
+    <!-- 80 for lux16.mpi.ml, lux17.mpi.nl, corpus1.mpi.ml  -->
+  </context-param> 
+  
+  <context-param> 
+    <param-name>eu.clarin.sru.server.transport</param-name>
+    <param-value>http</param-value>
+    <!-- or https if your servlet is on https -->
+  </context-param> 
+  
+  <context-param> 
+    <param-name>eu.clarin.sru.server.numberOfRecords</param-name>
+    <param-value>100</param-value>
+    <!-- Default number of records used if the user does not assign maximumRecords  in the request. -->
+    <!-- A sysadmin may want to chnaged it but better no. -->
+  </context-param> 
+ 
+  <context-param> 
+    <param-name>eu.clarin.sru.server.maximumRecords</param-name>
+    <param-value>1000</param-value>
+    <!-- If you think it is a too high limit make it less but not less than 250 pls!-->
+  </context-param> 
+  
+  <context-param> 
+    <param-name>eu.clarin.sru.server.allowOverrideMaximumRecords</param-name>
+    <param-value>true</param-value>
+  </context-param> 
+  
+  
Index: /FederatedSearch/mpi-endpoint/ExtraTermDataXPath.java
===================================================================
--- /FederatedSearch/mpi-endpoint/ExtraTermDataXPath.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/ExtraTermDataXPath.java	(revision 6059)
@@ -0,0 +1,311 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.Node;
+import nl.mpi.corpusstructure.UnknownNodeException;
+import nl.mpi.imdi.api.IMDIDom;
+import nl.mpi.util.OurURL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ *
+ * @author olhsha
+ */
+public class ExtraTermData {
+
+    private HashMap<String, String> _nodeTitle=null; // to do; make it a hash-map: language->title
+    private String _landingPageURL = null;
+    private ArrayList<String> _languages = null;
+    private boolean _hasSubResources = false;
+    private HashMap<String, String> _descriptions = null;
+    private Logger _logger = LoggerFactory.getLogger(ExtraTermData.class);
+
+    public ExtraTermData(CorpusStructureDBImpl db, String nodeId, String user) {
+
+        try {
+            _landingPageURL = db.getObjectURI(nodeId).toString();
+            Node[] nodes = db.getChildrenNodes(nodeId);
+            _hasSubResources = (nodes.length > 0);
+
+            // find the catalogue 
+            int catalogueIndex = catalogueIsFound(nodes);
+            if (catalogueIndex > -1) {
+                setExtraTermDataFromCatalogue(db, nodes[catalogueIndex]);
+            }            
+            else {
+                setEmptyExtraTermData();
+            }
+
+        } catch (UnknownNodeException e) {
+            _logger.error(nodeId + " is an unknown node",  e);
+        }
+
+    }
+
+    private int catalogueIsFound(Node[] nodes) {
+        for (int i = 0; i < nodes.length; i++) {
+            if (nodes[i].getNodeType() == Node.CATALOGUE) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    private void setExtraTermDataFromCatalogue(CorpusStructureDBImpl db, Node catalogue) {
+        URL catalogueURL = null;
+        // InputStream catalogueStream = null;
+        // DocumentBuilder docBuilder = null;
+        // URLConnection con = null;        
+         
+        try {
+            catalogueURL = db.getObjectURI(catalogue.getNodeId()).toURL();
+        } catch (MalformedURLException catalogueURIException) {
+            _logger.error("Cannot translate catalogue's URI " + db.getObjectURI(catalogue.getNodeId()) + " into an URL",  catalogueURIException);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        }
+        
+        IMDIDom dom = new IMDIDom();
+        Hashtable hasTable = null;        
+        Document doc = null;
+        
+        try {
+        doc = dom.loadIMDIDocument(new OurURL(catalogueURL), false);
+        hasTable=(dom.getKeyValuePairs(doc,  "Catalogue"));
+        } catch (MalformedURLException e){
+            _logger.error("Cannot turn " + catalogueURL+" into OurURL", e);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        }
+        
+        /*
+        try {
+            con = catalogueURL.openConnection();
+            con.setConnectTimeout(5000);
+            con.setReadTimeout(5000);
+            catalogueStream = con.getInputStream();
+        } catch (IOException openCatalogueException) {
+            _logger.error("Cannot get strean form the catalogue's URL " + catalogueURL, openCatalogueException);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        }
+
+        try {
+            DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
+            docBuilder = fac.newDocumentBuilder();
+        } catch (ParserConfigurationException parserE) {
+            _logger.error("Cannot create parser for the catalogue " + catalogueURL, parserE);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        }
+
+        try {
+            doc = docBuilder.parse(catalogueStream);
+            catalogueStream.close();
+        } catch (SAXException saxE) {
+            _logger.error("Cannot parse the catalogues stream obtained from " + catalogueURL, saxE);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        } catch (IOException ioE) {
+            _logger.error("Cannot parse the catalogue's stream obtained from " + catalogueURL, ioE);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        } */
+
+
+        //XPathFactory factory = XPathFactory.newInstance();
+        _nodeTitle = getTitles(hasTable, doc, dom);
+        _languages = null;
+        _descriptions = null; 
+        
+        //_languages = getLanguages(factory, doc, catalogueURL);
+        //_descriptions = getDescriptions(factory, doc, catalogueURL);
+    }
+
+    //private HashMap<String, String> getTitles(XPathFactory factory, Document doc, URL catalogueURL) {
+      
+        private HashMap<String, String> getTitles(Hashtable hashTable, Document doc, IMDIDom dom) {
+    
+        HashMap<String, String> result = new HashMap<String, String>();
+
+        String englishTitle = hashTable.get("EnglishTitle").toString();
+        result.put(englishTitle, "eng");
+
+        String otherTitles = (dom.getIMDIElement(doc, "Catalogue.Title")).getValue();
+        //int amountOfOtherTitles = (otherTitles == null) ? 0 : otherTitles.getLength();
+
+        String otherLanguages = hashTable.get("TitleLanguage").toString();
+        //int amountOfOtherLanguages = (otherLanguages == null) ? 0 : otherLanguages.getLength();
+
+        /*if (amountOfOtherTitles != amountOfOtherLanguages) {
+            _logger.error("The amount of titles does not match the amount of title languages in the catalogue");
+        }
+        for (int i = 0; i < amountOfOtherTitles; i++) {
+            result.put(otherTitles.item(i).getTextContent(), otherLanguages.item(i).getTextContent());
+        }*/
+        result.put(otherTitles, otherLanguages);
+        return result;
+    }
+
+    ///// 
+    // private String getEnglishTitle(XPathFactory factory, Document doc, URL catalogueURL) {
+        /*
+        NodeList xmlNodes = null;
+        XPath xpath = factory.newXPath();
+        String xpathEnglishTitle = "/METATRANSCRIPT/Catalogue/Keys/Key[@Name=\"EnglishTitle\"]";
+        try {
+            xmlNodes = (NodeList) xpath.evaluate(xpathEnglishTitle, doc, XPathConstants.NODESET);
+        } catch (XPathExpressionException xpathE) {
+            _logger.error("Cannot parse the English Title obtained from the catalogue " + catalogueURL, xpathE);
+            _logger.error("At least one title must be given according to FCS specification");
+        }
+
+        String result = ((xmlNodes != null) ? (xmlNodes.getLength() > 0 ? xmlNodes.item(0).getTextContent() : "No English title is given") : "No English title is given");
+        
+        */
+      /*  IMDIDom dom = new IMDIDom();
+        try {
+        Document docNew = dom.loadIMDIDocument(new OurURL(catalogueURL), false);
+        Hashtable tmpTable=(dom.getKeyValuePairs(docNew,  "Catalogue"));
+        String result = tmpTable.get("EnglishTitle").toString();
+        return result;
+        } catch (MalformedURLException e){
+            _logger.error("Cannot parse the English Title obtained from the catalogue " + catalogueURL, e);
+        }
+        
+        return " ";
+    }*/
+
+    /////
+    /*private NodeList getOtherTitles(Hashtable hashtable) {
+        NodeList result = null;
+        XPath xpathOthers = factory.newXPath();
+        String xpathTitle = "/METATRANSCRIPT/Catalogue/Title";
+        try {
+            result = (NodeList) xpathOthers.evaluate(xpathTitle, doc, XPathConstants.NODESET);
+        } catch (XPathExpressionException xpathE) {
+            _logger.error("Cannot parse the Title obtained from the catalogue " + catalogueURL, xpathE);
+        }
+        
+        
+        return result;
+    }*/
+
+    ////
+    /*private NodeList getLanguagesOfOtherTitles(Hashtable hashTable) {
+        NodeList result = null;
+        XPath xpathOthersLanguages = factory.newXPath();
+        String xpathTitleLanguages = "/METATRANSCRIPT/Catalogue/Keys/Key[@Name=\"TitleLanguage\"]";
+        try {
+            result = (NodeList) xpathOthersLanguages.evaluate(xpathTitleLanguages, doc, XPathConstants.NODESET);
+        } catch (XPathExpressionException xpathE) {
+            _logger.error("Cannot parse the title language obtained from the catalogue " + catalogueURL, xpathE);
+        }
+
+        return result;
+    }*/
+
+    /////////////
+    private ArrayList<String> getLanguages(XPathFactory factory, Document doc, URL catalogueURL) {
+        XPath xpath = factory.newXPath();
+        String xpathLanguages = "/METATRANSCRIPT/Catalogue/SubjectLanguages/Language/Id";
+        try {
+            NodeList xmlNodes = (NodeList) xpath.evaluate(xpathLanguages, doc, XPathConstants.NODESET);
+            int lengthLanguages = (xmlNodes == null) ? 0 : xmlNodes.getLength();
+            if (lengthLanguages == 0) {
+                _logger.error("At least one language must be given according to FCs specification");
+                return null;
+            }
+            ArrayList<String> result = new ArrayList<String>();
+            for (int i = 0; i < lengthLanguages; i++) {
+                result.add(CQLHelpers.removeISO369prefix(xmlNodes.item(i).getTextContent()));
+            }
+            return result;
+        } catch (XPathExpressionException xpathE) {
+            _logger.error("Cannot parse the languages in the catalogue " + catalogueURL, xpathE);
+            _logger.error("At least one language must be given according to FCs specification");
+        }
+        return null;
+    }
+
+    private HashMap<String, String> getDescriptions(XPathFactory factory, Document doc, URL catalogueURL) {
+        XPath xpath = factory.newXPath();
+        String xpathDescriptions = "/METATRANSCRIPT/Catalogue/Description";
+        try {
+            NodeList xmlNodes = (NodeList) xpath.evaluate(xpathDescriptions, doc, XPathConstants.NODESET);
+            int lengthDescriptions = (xmlNodes == null) ? 0 : xmlNodes.getLength();
+            if (lengthDescriptions == 0) {
+                _logger.info("There are no descriptions for this corpus");
+                return null;
+            }
+            HashMap<String, String> result = new HashMap<String, String>();
+            String currentLanguage = null;
+            String currentDescriptionText = null;
+            for (int i = 0; i < lengthDescriptions; i++) {
+                currentLanguage = CQLHelpers.removeISO369prefix(xmlNodes.item(i).getAttributes().getNamedItem("LanguageId").getTextContent());
+                currentDescriptionText = xmlNodes.item(i).getTextContent();
+                result.put(currentLanguage, currentDescriptionText);
+            }
+            return result;
+        } catch (XPathExpressionException xpathE) {
+            _logger.info("Cannot parse the descriptions obtained from the catalogue " + catalogueURL, xpathE);
+            _logger.info("There will be no descriptions for this corpus");
+        }
+        return null;
+    }
+    
+    private void setEmptyExtraTermData(){
+        _nodeTitle = new HashMap<String, String>();
+        _nodeTitle.put("eng", "No extra-term data are provided for non-root searchabale corpora");
+        _landingPageURL = "??";
+        _languages = new ArrayList<String>();
+        _languages.add("??");
+        _hasSubResources=false;
+        _descriptions = new HashMap<String, String>();
+        _descriptions.put("??", "??");
+    }
+    
+    public HashMap<String, String> getNodeTitle(){
+        return _nodeTitle;
+    }
+    
+    public String getLandingPageURL(){
+        return _landingPageURL;
+    }
+    
+    public ArrayList<String> getLanguages(){
+        return _languages;
+    }
+    
+    public boolean getHasSubResources(){
+        return _hasSubResources;
+    }
+    
+    
+    public HashMap<String, String> getDescriptions(){
+        return _descriptions;
+    }
+}
Index: /FederatedSearch/mpi-endpoint/INSTALL.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/INSTALL.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/INSTALL.txt	(revision 6059)
@@ -0,0 +1,73 @@
+CQL Search Installation 
+(The part of the text about context.xml and  web.xml files 
+can be used to build NetBeans projects as well.)
+------------------------------------
+
+Contents:
+- Requirements
+- Installation and Configuration of CQLSearch
+-- placing war-file
+-- The fragment web.txt to be present in Tomcat's web.xml file
+- Testing URI's file.
+- For the developer: information about Federated-Content-Search subproject of 
+CLARIN and over the external library that
+supplies interfaces and parent classes
+
+= Requirements =
+
+* cqlsearch2-XXX package 
+* Tomcat >=5, with the Trova search engine deployed
+
+
+
+= Installation and Configuration of CQLSearch  =
+=========================================================================================
+== PLACING WAR-file ==
+
+You must deploy the cqlsearch2's .war file to the Tomcat instance where Trova search engine
+is deployed. E.g. on lux16 it is tomcat-webuser.
+
+
+=============================================================================================
+== web.xml ===
+
+Find the following in this tar-ball:
+-- DeploymentSettings/web.txt
+
+Check if you have listed there parameters in TomCat's web.xml and re-set them properly if necessary. 
+
+Th file consist of two parts: the first part contains the parameters shared by Trova, Annex, 
+cqlsearch. The second part consists of the server-dependent parameters specific only for
+CQLSearch. There are comments near these parameters on how to set the values. Read these comments.
+
+
+=============================================================================================
+
+= Testing URI's =
+
+You need to run a couple of url-requests to see if the things work after installation. Take the
+url's from the corresponding file DeploymentSettings/TestURIs.txt.
+
+The base URI depends on a server, so read the first sentence where the base URI's for all
+three srevers lux16, lux17 and corpus1 are listed.
+
+If you are a deploying sysadmin, you do not have to analyse and report the search or scan results,
+you just have to check if there are no exceptions, errors and warnings and report about them 
+if necessary.
+
+=============================================================================================
+
+= For the developer: information over the external library 
+(supplies interfaces and parent classes) =
+
+CQL search is a part of the Federated (aggregated) search project with the idea that via one common 
+interface a user can make a SRU/CQL request which is dispatched across all the institutions 
+participating in the project. See http://weblicht.sfs.uni-tuebingen.de/Aggregator/.
+
+As a result the user obtains hits from all the participants, including
+MPI. Each participant implements its own search engine, and responsible to make it compatible 
+with the common interface.  That's why all the participants are using the same library of interfaces 
+and parent classes, created in Mannheim by Oliver Schoenefeld. The commented sources are available 
+(for reading only!!!) at https://svn.clarin.eu/ (e.g. SRUServer).
+
+
Index: /FederatedSearch/mpi-endpoint/README.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/README.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/README.txt	(revision 6059)
@@ -0,0 +1,37 @@
+CQL Search
+
+The CQL-search servlet is a part of the CLARIN Federated Search Project. 
+The information about the project can be found at 
+http://www.clarin.eu/fcs .
+
+The servelt provides  a (simple) SRU/CQL-based interface to the outside world 
+which can be used  to search through the Trova Database.
+
+=== SRU/CQL Requests ===
+
+The servlet is implemented to perform SRU/CQL requests according to the sandart
+that can be found at http://www.loc.gov/standards/sru/specs/search-retrieve.html.
+Typical search request look as follows.
+
+For corpus1:
+
+cqlservlet.mpi.nl/?operation=searchRetrieve&query=kind&version=1.1
+cqlservlet.mpi.nl/?operation=searchRetrieve&query=kind&version=1.1&maximumRecords=19
+cqlservlet.mpi.nl/?operation=scan&scanClause=fcs.resource=root&version=1.1
+cqlservlet.mpi.nl/?operation=scan&scanClause=fcs.resource=root&version=1.1&x-clarin-resource-info=true
+
+For lux16, lux17, replace "cqlservlet.mpi.nl" with "lux16.mpi.nl:8080/ds/cqlsearch2" 
+and "lux17.mpi.nl:8080/ds/cqlsearch" respectively
+
+The servlet is still under development: for instance, complex logical CRU requests 
+built up using AND and OR still have to be implemented.
+
+=== Logging in ===
+
+So far no login procedure is assumed. An external user gets standard default name 
+that allows to search for terms in the corpora (within Trova Database) that MPI 
+keeps open for Federated Search. 
+
+=== License ===
+
+GNU GPL
Index: /FederatedSearch/mpi-endpoint/UPDATE.txt
===================================================================
--- /FederatedSearch/mpi-endpoint/UPDATE.txt	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/UPDATE.txt	(revision 6059)
@@ -0,0 +1,2 @@
+Take the tar-ball of the new  version 4.4, and follow the standard deployment procedure
+(see the instructions from INSTALL.txt.). web.ml and context.xml are staying intact.
Index: /FederatedSearch/mpi-endpoint/lib/README
===================================================================
--- /FederatedSearch/mpi-endpoint/lib/README	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/lib/README	(revision 6059)
@@ -0,0 +1,8 @@
+THere are some problems resolving some maven dependencies.
+Instead of depending on hundreds of external repos, add them to your own!
+
+
+Do the following with the appropriate values for the as3corelib and scrollbar:
+
+mvn install:install-file -Dfile=cql-java.jar -DgroupId=z3950.org -DartifactId=cql-java -Dversion=1.7 -Dpackaging=jar
+
Index: /FederatedSearch/mpi-endpoint/nb-configuration.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/nb-configuration.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/nb-configuration.xml	(revision 6059)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+    <config-data xmlns="http://www.netbeans.org/ns/maven-config-data/1">
+        <configurations>
+            <configuration id="no-test" profiles=""/>
+        </configurations>
+    </config-data>
+</project-shared-configuration>
Index: /FederatedSearch/mpi-endpoint/nbactions-no-test.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/nbactions-no-test.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/nbactions-no-test.xml	(revision 6059)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+        <action>
+            <actionName>test</actionName>
+            <goals>
+                <goal>test</goal>
+            </goals>
+            <properties>
+                <skipTests>true</skipTests>
+            </properties>
+        </action>
+    </actions>
Index: /FederatedSearch/mpi-endpoint/nbactions.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/nbactions.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/nbactions.xml	(revision 6059)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+        <action>
+            <actionName>run</actionName>
+            <goals>
+                <goal>package</goal>
+            </goals>
+            <properties>
+                <netbeans.deploy>true</netbeans.deploy>
+                <netbeans.deploy.clientUrlPart></netbeans.deploy.clientUrlPart>
+            </properties>
+        </action>
+        <action>
+            <actionName>debug</actionName>
+            <goals>
+                <goal>package</goal>
+            </goals>
+            <properties>
+                <netbeans.deploy.debugmode>true</netbeans.deploy.debugmode>
+                <netbeans.deploy>true</netbeans.deploy>
+                <netbeans.deploy.clientUrlPart></netbeans.deploy.clientUrlPart>
+            </properties>
+        </action>
+        <action>
+            <actionName>profile</actionName>
+            <goals>
+                <goal>package</goal>
+            </goals>
+            <properties>
+                <netbeans.deploy>true</netbeans.deploy>
+                <netbeans.deploy.profilemode>true</netbeans.deploy.profilemode>
+                <netbeans.deploy.clientUrlPart></netbeans.deploy.clientUrlPart>
+            </properties>
+        </action>
+    </actions>
Index: /FederatedSearch/mpi-endpoint/pom.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/pom.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/pom.xml	(revision 6059)
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>nl.mpi</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.7.0</version>
+    </parent>
+
+    <groupId>nl.mpi.annot.search</groupId>
+    <artifactId>cqlsearch2</artifactId>
+    <version>4.4</version>
+    <packaging>war</packaging>
+    <name>CQLSearch</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
+    </properties>
+    
+      
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.3</version>
+            </plugin>
+            
+           
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <executions>
+                    <execution>
+                        <id>copy-resources</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}.${buildNumber}</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <!-- I have no idea why this stuff doesn't get
+                                       copied automatically, but it has to be done.
+                                    -->
+                                    <directory>src/main/resources</directory>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                    <filtering>false</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!--  <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <dependencies>
+                    <dependency>
+                        <groupId>nl.mpi</groupId>
+                        <artifactId>mpi-deploy</artifactId>
+                        <version>1.0</version>
+                    </dependency>
+                </dependencies>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptorRefs>
+                                <descriptorRef>mpi-deploy</descriptorRef>
+                            </descriptorRefs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.5.3</version>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/threeservers.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.jvnet.jaxb2.maven2</groupId>
+                <artifactId>maven-jaxb2-plugin</artifactId>
+                <version>0.12.3</version>
+                <executions>
+                    <execution>
+                        <id>jaxb-components</id>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                        <configuration>
+                            <bindingDirectory>${basedir}/src/main/resources</bindingDirectory>
+                            <bindingIncludes>
+                                <include>bindingsfcs.xml</include>
+                                <include>bindingshits.xml</include>
+                                <include>bindingsed.xml</include>
+                            </bindingIncludes>
+                            <args>
+                                <arg>-extension</arg>
+                                <arg>-Xnamespace-prefix</arg>
+                            </args>
+                            <forceRegenerate>true</forceRegenerate>
+                            <generatePackage>de.clarin.fcs.schema</generatePackage>                 
+                            <outputDirectory>${basedir}/src/generated/jaxb</outputDirectory>
+                            <schemas>
+                                <schema>
+                                    <fileset>
+                                        <!-- Defaults to schemaDirectory. -->
+                                        <directory>${basedir}/src/main/schemas</directory>
+                                        <!-- Defaults to schemaIncludes. -->
+                                        <includes>
+                                            <include>*.xsd</include>
+                                        </includes>
+                                    </fileset>
+                                </schema>
+                            </schemas>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>  
+                    <dependency>
+                        <groupId>org.jvnet.jaxb2_commons</groupId>
+                        <artifactId>jaxb2-namespace-prefix</artifactId>
+                        <version>1.1</version>
+                    </dependency>
+                </dependencies>
+            </plugin>  
+        </plugins>
+    </build>
+
+    <dependencies>
+      
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>9.1.0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-dom</artifactId>
+            <version>9.1.0.8</version>
+            <scope>compile</scope>	    
+        </dependency>
+        
+        <dependency>
+            <groupId>nl.mpi</groupId>
+            <artifactId>corpusstructure-api</artifactId>
+            <version>1.8.6</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j</artifactId>
+                    <groupId>log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        
+
+        <dependency>
+            <groupId>nl.mpi.annot</groupId>
+            <artifactId>annot-tools</artifactId>
+            <version>1.1.12</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j</artifactId>
+                    <groupId>log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        
+        
+        <dependency>
+            <groupId>nl.mpi.annot.tools</groupId>
+            <artifactId>annot-tools-servlets</artifactId>
+            <version>1.1.12</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j</artifactId>
+                    <groupId>log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        
+         
+        <dependency>
+            <groupId>nl.mpi</groupId>
+            <artifactId>imdi-api</artifactId>
+            <version>1.1.5</version>
+        </dependency>
+        
+        
+        <dependency>
+            <groupId>nl.mpi.annot.search</groupId>
+            <artifactId>annot-search-lib</artifactId>
+            <version>1.4.11</version> 
+            <exclusions>
+                <exclusion>                    
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        <dependency>
+            <groupId>nl.mpi</groupId>
+            <artifactId>mpi-util</artifactId>
+            <version>1.2.4</version>
+        </dependency>
+        
+        
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>2.7.2</version>
+        </dependency>
+       
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+            <version>2.0.3</version>
+            <!-- Note: the annotations package is needed at compile time only. -->
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>nl.mpi</groupId>
+            <artifactId>mpi-deploy</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.simpleframework</groupId>
+            <artifactId>simple-xml</artifactId>
+            <version>2.7.1</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>eu.clarin.sru</groupId>
+            <artifactId>sru-server</artifactId>
+            <version>1.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${mpi.parent.slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring</artifactId>
+            <version>2.5.6</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>18.0</version>
+        </dependency>
+
+       
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>MPI-repos</id>
+            <url>http://lux15.mpi.nl/nexus/content/repositories/MPI</url>
+        </repository>
+        <repository>
+            <id>clarin</id>
+            <url>http://catalog.clarin.eu/ds/nexus/content/repositories/Clarin/</url>
+            <layout>default</layout>
+        </repository>
+    </repositories>
+    
+    <pluginRepositories>
+        <pluginRepository>
+            <id>MPI</id>
+            <name>MPI LAT Repository</name>
+            <url>http://lux15.mpi.nl/nexus/content/groups/public</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+
+
+</project>
Index: /FederatedSearch/mpi-endpoint/src/main/assembly/threeservers.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/assembly/threeservers.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/assembly/threeservers.xml	(revision 6059)
@@ -0,0 +1,44 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    
+    <id>mpi-deploy-cql</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    
+    <fileSets>
+        
+        <fileSet>
+            <directory>${project.basedir}</directory>
+            <outputDirectory>/</outputDirectory>
+            <includes>
+                <include>UPDATE*</include>
+                <include>LICENSES*</include>
+                <include>README*</include>
+                <include>CHANGES*</include>
+                <include>INSTALL*</include>
+            </includes>
+            <fileMode>0644</fileMode>
+        </fileSet>
+        
+        <fileSet>            
+            <directory>${project.basedir}/DeploymentSettings</directory>
+            <outputDirectory>DeploymentSettings</outputDirectory>
+            <fileMode>0644</fileMode>
+            <directoryMode>0755</directoryMode>
+        </fileSet>
+               
+        <fileSet>            
+            <directory>target</directory>
+            <outputDirectory>war</outputDirectory>
+            <includes>
+                <include>*.war</include>
+            </includes>
+            <fileMode>0644</fileMode>
+            <directoryMode>0755</directoryMode>
+        </fileSet>
+
+            
+    </fileSets>              
+</assembly>
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLConstants.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLConstants.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLConstants.java	(revision 6059)
@@ -0,0 +1,48 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+/**
+ * The collection of constants, e.g. standard prefixes or url-s, used throughout this endpoint implementation.
+ * Consider moving these constants to web.xml or so to avoid recompilation once some of the constants is changed.
+ * @author olhsha
+ * 
+ */
+public class CQLConstants {
+    
+    public static final String HANDLE_HDL = "hdl:";
+    public static final String X_FCS_ENDPOINT_DESCRIPTION ="x-fcs-endpoint-description";
+    public static final String X_FCS_CONTEXT ="x-fcs-context";
+    public static final String X_FCS_DATAVIEWS ="x-fcs-dataviews";
+    public static final String hits_type ="application/x-clarin-fcs-hits+xml";
+    public static final String hits ="hits";
+    public static final String send_by_default ="send-by-default";
+    public static final String need_to_request ="need-to-request";
+    
+    
+    
+    public static final char LOZENGE = (char) (Integer.parseInt("2666", 16)); // black lozenge (diamondsuit)
+    public static final char SPANISHQUESTION = (char) (Integer.parseInt("191"));
+    public static final char SPANISHBANG = (char) (Integer.parseInt("161"));
+    public static final String SEPARATORS = "[ \\[\\].,!?\"#$%&()*+/<>=:;^_~{}|''`-]";
+    
+    private static final String FCS_DIAGNOSTIC_URI_PREFIX = "http://clarin.eu/fcs/diagnostic/";
+    public static final String FCS_DIAGNOSTIC_PERSISTENT_IDENTIFIER_INVALID =
+            FCS_DIAGNOSTIC_URI_PREFIX + 1;
+    public static final String FCS_DIAGNOSTIC_RESOURCE_TOO_LARGE_CONTEXT_ADJUSTED =
+            FCS_DIAGNOSTIC_URI_PREFIX + 2;
+    public static final String FCS_DIAGNOSTIC_RESOURCE_TOO_LARGE_CANNOT_PERFORM_QUERY =
+            FCS_DIAGNOSTIC_URI_PREFIX + 3;
+    public static final String FCS_DIAGNOSTIC_REQUESTED_DATA_VIEW_INVALID =
+            FCS_DIAGNOSTIC_URI_PREFIX + 4;
+   
+    
+    public static final String ISO_3_PREFIX="ISO639-3:";
+    
+    public static final String openPathLux16 = "https://lux16.mpi.nl/ds/asv/?openpath=";
+    public static final String openPathCorpus1 = "https://corpus1.mpi.nl/ds/asv/?openpath=";
+    
+}
+
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLHelpers.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLHelpers.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLHelpers.java	(revision 6059)
@@ -0,0 +1,189 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import nl.mpi.corpusstructure.ArchiveObjectsDBImpl;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.UnknownNodeException;
+import nl.mpi.util.OurURL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author olhsha
+ */
+public class CQLHelpers {
+
+    // two fields below are used temporary to support temporary solution for VLO, untill http-accept-compatible facade service is in place
+    public static final String formatcmdi = "@format=cmdi";
+    private static final int formatcmdLength = formatcmdi.length();
+    public static Logger _logger = LoggerFactory.getLogger(CQLHelpers.class);
+    
+    /**
+     * 
+     * @param archObjectDBImp reference to the corpus-structure database. Class {@link ArchiveObjectsDBImpl} is a superclass of {@link  CorpusStructureDBImpl}.
+     * @param term node handle or node URI.
+     * @return the ID of the node with the handle "term" or URI "term" in the database "archObjectDBImpl".
+     */
+    public static String handleOrURItoNodeId(ArchiveObjectsDBImpl archObjectDBImp, String term) {
+
+        if (term == null) {
+            _logger.error("The term " + term + " is null");
+            return null;
+        }
+        String termTrimmed = term.trim();
+        String termProcessed = termTrimmed.endsWith(formatcmdi) ? termTrimmed.substring(0, termTrimmed.length() - formatcmdLength) : termTrimmed;
+        OurURL url=null;
+        try {
+            // term is a handle
+            url = archObjectDBImp.getObjectURLForPid(termProcessed);
+        } catch (UnknownNodeException e) {
+            // is not a valid PID (handle), now I'm checking if it is an imdi-uri (for childes and talkbank) 
+            try {
+                url = new OurURL(URI.create(termProcessed).toURL());
+            } catch (MalformedURLException murle) {
+                _logger.error("The term " + termProcessed + " is neither a proper nodeId, nor a handle, nor an imdi-URI (for the deployed database)");
+                return null;
+            }
+        }
+        return archObjectDBImp.getObjectId(url);
+
+    }
+    
+    /**
+     * Calls  handleOrURItoNodeId(-,-) while iteration the list "termS".
+     * 
+     * @param archObjectDBImp reference to the corpus-structure database. Class {@link  ArchiveObjectsDBImpl} is a superclass of {@link CorpusstructureDBImpl}.
+     * @param termS list of the node handles or URIs.
+     * @return the list of node identifiers in the database "archObjectDBImp"  whose handles or URI-s are in the list "termS".
+     * 
+     * 
+     */
+    public static ArrayList<String> inListHandleOrURItoNodeId(ArchiveObjectsDBImpl archObjectDBImp, List<String> termS) {
+        ArrayList<String> result = new ArrayList<String>(termS.size());
+        for (String term : termS) {
+            result.add(handleOrURItoNodeId(archObjectDBImp, term));
+        }
+        return result;
+    }
+    
+    /**
+     * 
+     * @param archObjectDBImp reference to the corpus-structure database. Class {@link  ArchiveObjectsDBImpl} is a superclass of {@link  CorpusStructureDBImpl}.
+     * @param nodeId the id of a node within "archObjectDBImp".
+     * 
+     * @return the PID of the node with "nodeId" within the database "archObjectDBImp".
+     */
+    public static String nodeIdToPID(ArchiveObjectsDBImpl archObjectDBImp, String nodeId, String handleResolverURI) {
+        return handleResolverURI+"/"+archObjectDBImp.getObjectPID(nodeId);
+    }
+    
+    /**
+     * 
+     * @param term a string which is supposed to be an iso-3 code of a language.
+     * @return removes the first ISO_3_PREFIX-length symbols from "term". It does not check if the term is a correct ISO language code.
+     */
+    public static String removeISO369_3_prefix(String term) {
+        return term.substring(CQLConstants.ISO_3_PREFIX.length());
+    }
+
+    /**
+     * 
+     * @param list a list of strings.
+     * @param allowedElements a list of "allowed" strings.
+     * @return "true" at least one of the elements of the "list" is not in "allowed", and false otherwise.
+     */
+    public static boolean isInvalidElementsInTheList(List<String> list, ArrayList<String> allowedElements) {
+        if (list == null) {
+            return false;
+        }
+        if (allowedElements == null) {
+            return true;
+        }
+        for (String element : list) {
+            if (!allowedElements.contains(element)) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    /**
+     * 
+     * @param db corpus-structure database.
+     * @param nodeId the id of a node in the database "db".
+     * @return the handle of the node to which "@ view" is appended, or the open path of the node.
+     */
+    public static String constructHandleView(CorpusStructureDBImpl db, String nodeId, String handleResolverURL) {        
+        String host = db.getObjectURI(nodeId).getHost();
+        String nodeForOpenPath=(nodeId.replaceAll("MPI", "node:")).replaceAll("#","");
+        
+        if (host.startsWith("lux16")){
+           return CQLConstants.openPathLux16 + nodeForOpenPath; 
+        }       
+        String nodePID = db.getObjectPID(nodeId);
+        if (nodePID != null) {
+            // yes, there is a handle for the node
+            String handle = nodePID.startsWith(CQLConstants.HANDLE_HDL)
+                    ? nodePID.substring(CQLConstants.HANDLE_HDL.length()) : nodePID;            
+            return handleResolverURL+"/" + handle + "@view";
+        }
+        else {
+            // no handle
+            return CQLConstants.openPathCorpus1 + nodeForOpenPath;
+        }
+    }
+    
+    /**
+     * 
+     * @param languageId ISO or RFC language code, with the corresponding prefix.
+     * @return the three-letter id of the language with the id "languageId". The method Must be rewritten once the language codes in imdi/cmdi are cleaned up
+     */
+    public static String toThreeLetterISOCode(String languageId, LanguageCodeToISO3 codeMap){
+        String languageIdTrimmed = languageId.trim();
+        if (languageIdTrimmed.startsWith(CQLConstants.ISO_3_PREFIX)) {
+            String result = languageIdTrimmed.substring(CQLConstants.ISO_3_PREFIX.length());
+            if (result.length() == 3) {
+                return result.toLowerCase();
+            }
+        };
+        String mapValue = codeMap.getCodeMap().get(languageIdTrimmed);
+        if (mapValue != null) {
+            return mapValue.substring(CQLConstants.ISO_3_PREFIX.length());
+        };
+        return "und";
+    }
+
+    /**
+     * 
+     * @param result
+     * @param list
+     * @return result with the elements of list added, where an element is added if and only if it is not in "list".
+     */
+    public static List<String> merge(List<String> result, List<String> list){
+        if(list == null) {
+            return result;
+        }
+        
+        if (result == null) {
+            result = list;
+            return result;
+        }
+        
+        for (String str:list){
+            if (result.indexOf(str) == -1){
+                result.add(str);
+            }
+        }
+        
+        return result;
+    }
+    
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CatalogData.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CatalogData.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/CatalogData.java	(revision 6059)
@@ -0,0 +1,431 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import de.clarin.fcs.schema.I18NString;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.Node;
+import nl.mpi.corpusstructure.UnknownNodeException;
+import nl.mpi.imdi.api.IMDIDom;
+import nl.mpi.imdi.api.IMDIElement;
+import nl.mpi.util.OurURL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+
+/**
+ *
+ * @author olhsha
+ */
+public class CatalogData {
+
+    private List<I18NString> _nodeTitle = null; 
+    private String _landingPageURL = null;
+    private ArrayList<String> _languages = null;
+    private boolean _hasSubResources = false;
+    private List<I18NString> _descriptions = null;
+    private Logger _logger = LoggerFactory.getLogger(CatalogData.class);
+    
+    /**
+     * Contains not accessible via the corpus-structure API information about 
+     * a corpus node with "nodeId".  The information is taken from the catalog file for this node. The extended information includes 
+     * the list of node titles and descriptions in different languages, subject languages of the node. 
+     * @param db corpus-structure database.
+     * @param nodeId the Id of a node in the database "db".
+     * @param user the logged-in corpus-structure database user. The parameter is passed from context.xml of the tomcat via the instance of  {@link SRUSearchEngineImpl} class.s
+     */
+
+    public CatalogData(CorpusStructureDBImpl db, String nodeId, String user, String handleResolverURL) {
+
+        try {
+
+            _landingPageURL = CQLHelpers.constructHandleView(db, nodeId, handleResolverURL);
+            Node[] nodes = db.getChildrenNodes(nodeId);
+            _hasSubResources = (nodes.length > 0);
+
+            // find the catalogue 
+            int catalogueIndex = catalogueIsFound(nodes);
+            if (catalogueIndex > -1) {
+                setCatalogData(db, nodes[catalogueIndex]);
+            } else {
+                setEmptyCatalogData();
+            }
+
+        } catch (UnknownNodeException e) {
+            _logger.error(nodeId + " is an unknown node", e);
+        }
+
+    }
+
+   /**
+    * 
+    * @param nodes an array of nodes.
+    * @return the index of the first catalog found in the array "nodes", or -1 is such a catalog is not found.
+    */
+    private int catalogueIsFound(Node[] nodes) {
+        for (int i = 0; i < nodes.length; i++) {
+            if (nodes[i].getNodeType() == Node.CATALOGUE) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Fills-in the fields of *this* instance of {@link CatalogData} by the data given in  "catalogue".
+     * @param db a corpus-structure database.
+     * @param catalogue a catalog node in this database.
+     */
+    private void setCatalogData(CorpusStructureDBImpl db, Node catalogue) {
+        OurURL catalogueURL = null;
+        try {
+            URL catalogueURLtmp = db.getObjectURI(catalogue.getNodeId()).toURL();
+            catalogueURL = new OurURL(catalogueURLtmp);
+        } catch (MalformedURLException catalogueURIException) {
+            _logger.error("Cannot translate catalogue's URI " + db.getObjectURI(catalogue.getNodeId()) + " into an URL", catalogueURIException);
+            _logger.error("Extra term data stay at their default empty setting");
+            return;
+        }
+
+        IMDIDom dom = new IMDIDom();
+        Document doc = dom.loadIMDIDocument(catalogueURL, false);
+        _nodeTitle = computeTitles(doc, dom);
+        _languages = computeLanguages(doc, dom);
+        _descriptions = computeDescriptions(doc, dom);
+    }
+
+    /**
+     * 
+     * @param doc an xml document.
+     * @param dom the document's dom.
+     * @param prefixPath the prefix of "XPath".
+     * @param suffixPath the suffix of "XPath".
+     * @param attributeName
+     * @param attributeValue
+     * @return the list of (string) values of the xml document "doc" corresponding to the XPath-like
+     * prefixPath+(nummer)+suffixPath+(nummer); if the attribute name and value are given, then
+     * they are added to this XPpath-like presentation as well.
+     * 
+     */
+    private ArrayList<String[]> getElementValues(Document doc, IMDIDom dom,
+            String prefixPath, String suffixPath, String attributeName, String attributeValue) {
+        ArrayList<String[]> result = new ArrayList<String[]>();
+        IMDIElement imdiElementRunner;
+        IMDIElement imdiAttributeRunner;
+        String whereElement;
+
+        String dotSuffixPath = (suffixPath == null) ? null : ("." + suffixPath);
+        String dotAttributeName = (attributeName == null) ? null : ("." + attributeName);
+
+        int elementNumber = 1;
+        do {
+            whereElement = (suffixPath == null) ? prefixPath + "(" + elementNumber + ")"
+                    : prefixPath + "(" + elementNumber + ")" + dotSuffixPath;
+            imdiElementRunner = dom.getIMDIElement(doc, whereElement);
+            if (imdiElementRunner != null) {
+                if (dotAttributeName == null) {
+                    // the value of the attribue is not important to know, and no filtering on the attribute
+                    addElementAndAttribute(result, imdiElementRunner.getValue(), null);
+                } else {
+                    imdiAttributeRunner = dom.getIMDIElement(doc, whereElement + dotAttributeName);
+                    if (imdiAttributeRunner != null) {
+                        if (imdiAttributeRunner.isAttribute()) {
+                            if (attributeValue == null) {
+                                // the value of the attribute is important to know, but no filtering
+                                addElementAndAttribute(result, imdiElementRunner.getValue(), imdiAttributeRunner.getValue());
+                            } else if ((imdiAttributeRunner.getValue()).equals(attributeValue)) {
+                                // filtering on the value of the attribute
+                                addElementAndAttribute(result, imdiElementRunner.getValue(), attributeValue);
+                            }
+                        }
+                    }
+                }
+            }
+            elementNumber++;
+        } while (imdiElementRunner != null);
+        return result;
+
+    }
+
+   /**
+    * 
+    * @param l a list of string arrays of length 2, representing a pair "element value" -- "attribute value".
+    * @param elementVal  the "zero" element of the array to be added to the list
+    * @param attributeVal the "first" element of the array to be added to th list
+    */
+    private void addElementAndAttribute(ArrayList<String[]> l, String elementVal, String attributeVal) {
+        String[] tmp = new String[2];
+        tmp[0] = elementVal;
+        tmp[1] = attributeVal;
+        l.add(tmp);
+    }
+
+    /**
+     * 
+     * @param doc catalog document.
+     * @param dom the document's dom.
+     * @return the list of titles listed in the catalog, also as "keys". A title consist of the title itself and its language.
+     */
+    private List<I18NString> computeTitles(Document doc, IMDIDom dom) {
+        List<I18NString> result = new ArrayList<I18NString>();
+
+        // setting up English Titles    
+        ArrayList<String[]> englishTitles = getElementValues(doc, dom, "Catalogue.Key", null, "Name", "EnglishTitle");
+        for (int i = 0; i < englishTitles.size(); i++) {
+            I18NString i18nstring = new I18NString();
+            i18nstring.setLang("eng");
+            i18nstring.setValue(englishTitles.get(i)[0]);
+            result.add(i18nstring);
+        }
+
+        // searching for the other-languages titles        
+        IMDIElement imdiElementTitle = dom.getIMDIElement(doc, "Catalogue.Title");
+        ArrayList<String[]> otherTitles = new ArrayList<String[]>();
+        addElementAndAttribute(otherTitles, imdiElementTitle.getValue(), null);
+        ArrayList<String[]> otherTitlesInKeys = getElementValues(doc, dom, "Catalogue.Key", null, "Name", "ExtraTitle");
+        otherTitles.addAll(otherTitlesInKeys);
+        int amountOfOtherTitles = otherTitles.size();
+
+        // searching for languages the for language titles
+        // the first language is the language of the catalogue title, the rest are the languages of extra titles
+        ArrayList<String[]> otherLanguages = getElementValues(doc, dom, "Catalogue.Key", null, "Name", "TitleLanguage");
+        int amountOfOtherLanguages = otherLanguages.size();
+
+        // setting up other-language titles
+        if (amountOfOtherTitles != amountOfOtherLanguages) {
+            _logger.info("The amount of titles does not match the amount of title languages in the catalogue, truncated to the minimum");
+            if (amountOfOtherTitles > amountOfOtherLanguages) {
+                amountOfOtherTitles = amountOfOtherLanguages;
+            }
+        }
+        for (int i = 0; i < amountOfOtherTitles; i++) {
+            I18NString i18nstring = new I18NString();
+            i18nstring.setLang(otherLanguages.get(i)[0]);
+            i18nstring.setValue(otherTitles.get(i)[0]);
+            result.add(i18nstring);
+        }
+        this.removeDuplicatedElements(result);
+        return result;
+    }
+    
+    /**
+     * 
+     * @param l a list of I18NString-s, where  an instance of {@link I18NString} represents a pair "language-text".
+     * @param begin the first index.
+     * @param end the last index.
+     * @param i18nstring a pair "language-text".
+     * @return the index of "i18nstring" in the list "l" if found, and -1 otherwise.
+     */
+    private int getIndex(List<I18NString> l, int begin, int end, I18NString i18nstring){
+        for (int i=begin; i<=end; i++) {
+           if(l.get(i).getLang().equals(i18nstring.getLang()) && l.get(i).getValue().equals(i18nstring.getValue())) {
+               return i;
+           }
+        }
+        return -1;
+    }
+    
+    /**
+     * Removes the duplicated elements from the list "l"
+     * @param l a list of I18NString-s, where  an instance of {@link I18NString} represents a pair "language-text".
+     */
+    private void removeDuplicatedElements(List<I18NString> l){
+        if (l==null) {
+            return;
+        }
+        if (l.isEmpty() || l.size() == 1) {
+          return;  
+        }
+        int i=1; 
+        while(i<l.size()) {
+           if (this.getIndex(l, 0, i-1, l.get(i)) >-1) {
+               l.remove(i);
+           } else {
+               i++;
+           }
+        }
+    }
+
+    /**
+     * 
+     * @param doc a catalog document.
+     * @param dom the document's dom.
+     * @return the list of subject languages listed in the catalog.
+     */
+    private ArrayList<String> computeLanguages(Document doc, IMDIDom dom) {
+        ArrayList<String> result = new ArrayList<String>();
+        ArrayList<String[]> languages = getElementValues(doc, dom, "Catalogue.SubjectLanguage", "Id", null, null);
+
+        int lengthLanguages = languages.size();
+        for (int i = 0; i < lengthLanguages; i++) {
+            result.add(CQLHelpers.removeISO369_3_prefix(languages.get(i)[0]));
+        }
+        return result;
+    }
+
+    /**
+     * 
+     * @param doc a catalog document.
+     * @param dom the document's dom.
+     * @return a list of descriptions listed in the catalog as pairs "language-text", represented via the type {@link I18NString}.
+     */
+    private List<I18NString> computeDescriptions(Document doc, IMDIDom dom) {
+        List<I18NString> result = new ArrayList<I18NString>();
+        ArrayList<String[]> descriptions = getElementValues(doc, dom, "Catalogue.Description", null, "LanguageId", null);
+        int descriptionsLength = descriptions.size();
+        for (int i = 0; i < descriptionsLength; i++) {
+            I18NString i18nstring = new I18NString();
+            i18nstring.setLang(CQLHelpers.removeISO369_3_prefix(descriptions.get(i)[1]));
+            i18nstring.setValue(descriptions.get(i)[0]);
+            result.add(i18nstring);
+        }
+
+        return result;
+    }
+
+    /**
+     * Sets empty fields for *this* {@link CatalogData} instance. Used for corpora for which no catalog is given.
+     */
+    private void setEmptyCatalogData() {
+        _logger.info("No extra-term data are provided for non-root searchable corpora");
+        _nodeTitle = new ArrayList<I18NString>();
+        //      _landingPageURL = " ";
+        _languages = new ArrayList<String>();
+        _languages.add(" ");
+        _hasSubResources = false;
+        _descriptions = new ArrayList<I18NString>();
+    }
+
+    /**
+     * 
+     * @return the list of node titles set in *this* {@link CatalogData} instance. A node title is of type {@link I18NString}, which represents a pair "language-text".
+     */
+    public List<I18NString> getNodeTitle() {
+        return _nodeTitle;
+    }
+
+    /**
+     * 
+     * @return the landing-page URI set in *this* {@link CatalogData} instance.
+     */
+    public String getLandingPageURL() {
+        return _landingPageURL;
+    }
+    
+    /**
+     * 
+     * @return the list of languages set in *this* {@link CatalogData} instance. 
+     */
+    public ArrayList<String> getLanguages() {
+        return _languages;
+    }
+
+    /**
+     * 
+     * @return "the value of *this* _hasSubResources. 
+     */
+    public boolean getHasSubResources() {
+        return _hasSubResources;
+    }
+
+    /**
+     * 
+     * @return the list of languages set in *this* {@link CatalogData} instance. A description is of type {@link I18NString}, which represents a pair "language-text".
+     */
+    public List<I18NString> getDescriptions() {
+        return _descriptions;
+    }
+
+   
+}
+
+
+/* Catalogue specs
+ * 
+Catalogue.Access.Availability
+Catalogue.Access.Contact.Address
+Catalogue.Access.Contact.Email
+Catalogue.Access.Contact.Name
+Catalogue.Access.Contact.Organisation
+Catalogue.Access.Date
+Catalogue.Access.Description(X)
+Catalogue.Access.Owner
+Catalogue.Access.Publisher
+
+Catalogue.Applications
+Catalogue.Author(X)
+Catalogue.ContactPerson
+Catalogue.ContentType(X)
+Catalogue.Date
+Catalogue.Description(X)
+Catalogue.DistributionForm
+
+Catalogue.DocumentLanguage.Description(X)
+
+Catalogue.DocumentLanguage(X)
+Catalogue.DocumentLanguage(X).Id
+Catalogue.DocumentLanguage(X).Name
+
+Catalogue.Format.Audio
+Catalogue.Format.Image
+Catalogue.Format.Text
+Catalogue.Format.Video
+
+Catalogue.Id
+Catalogue.Key(X)
+
+Catalogue.LocationList(X).Address
+Catalogue.LocationList(X).Continent
+Catalogue.LocationList(X).Country
+Catalogue.LocationList(X).Region
+Catalogue.LocationList(X).Region(X)
+
+Catalogue.MetadataLink
+Catalogue.Name
+Catalogue.Pricing
+
+Catalogue.Project(X)
+Catalogue.Project(X).Contact.Address
+Catalogue.Project(X).Contact.Email
+Catalogue.Project(X).Contact.Name
+Catalogue.Project(X).Contact.Organisation
+Catalogue.Project(X).Description
+Catalogue.Project(X).Description(X)
+Catalogue.Project(X).Id
+Catalogue.Project(X).Name
+Catalogue.Project(X).Title
+
+Catalogue.Publications
+Catalogue.Publisher(X)
+
+Catalogue.Quality.Audio
+Catalogue.Quality.Image
+Catalogue.Quality.Text
+Catalogue.Quality.Video
+
+Catalogue.ReferenceLink
+Catalogue.Size
+Catalogue.SmallestAnnotationUnit
+
+Catalogue.SubjectLanguage.Description(X)
+
+Catalogue.SubjectLanguage(X)
+Catalogue.SubjectLanguage(X).Id
+Catalogue.SubjectLanguage(X).Name
+
+Catalogue.Title
+
+Note: CORPUS files link to CATALOGUE using:
+
+Corpus.Catalogue.CatalogueHandle
+Corpus.Catalogue.CatalogueLink
+
+ * 
+ * 
+ */
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/DefaultDataView.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/DefaultDataView.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/DefaultDataView.java	(revision 6059)
@@ -0,0 +1,29 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import de.clarin.fcs.schema.EndpointDescriptionType.SupportedDataViews.SupportedDataView;
+
+/**
+ * Representing a data view that corresponds to a data view "hits".
+ * @author olhsha
+ */
+public class DefaultDataView extends SupportedDataView{
+    
+    private final String _defaultDataViewId = CQLConstants.hits;
+    private final String _defaultDeliveryPolicy = CQLConstants.send_by_default;
+    private final String _defaultDataView = CQLConstants.hits_type;
+    
+    /**
+     * Creates a DefaultDataView instance and setss up the fields
+     * "_defaultDataViewId", "_defaultDeliveryPolicy" and "_defaultDataView" to
+     * "hits", "send-by-default", and "application/x-clarin-fcs-hits+xml" respectively.
+     */
+    public DefaultDataView(){
+        this.id = _defaultDataViewId;
+        this.deliveryPolicy = _defaultDeliveryPolicy;
+        this.value = _defaultDataView;
+    }
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/JaxbMarshallerFactory.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/JaxbMarshallerFactory.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/JaxbMarshallerFactory.java	(revision 6059)
@@ -0,0 +1,61 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.PropertyException;
+
+/**
+ *
+ * @author olhsha
+ */
+public class JaxbMarshallerFactory {
+     
+    private JAXBContext _context;
+    private Marshaller _marshaller;
+    private String _schemaLocation;
+    
+    public JaxbMarshallerFactory(){
+        
+    }
+    
+    /**
+     * 
+     * @return "_schemaLocation" field of *this* factory instance.
+     */
+    public String getSchemaLocation() {
+        return _schemaLocation;
+    }
+    
+    /**
+     * Sets the schema-location string to "_schemaLocation" field of *this*.
+     * @param schemaLocation a string (url).
+     * @throws PropertyException.
+     */
+    public void setSchemaLocation(String schemaLocation) {
+        _schemaLocation = schemaLocation;
+    }
+    
+    /**
+     * 
+     * @param type
+     * @return "marshaller" field value, after _marshaller" has been initialised with "_schemaLocation", Marshaller.JAXB_FORMATTED_OUTPUT and Marshaller.JAXB_FRAGMENT are set to "true".
+     * @throws JAXBException. 
+     * 
+     */
+    public Marshaller createMarshaller(Class<?> type) throws JAXBException{
+        _context = JAXBContext.newInstance(type); 
+        _marshaller = _context.createMarshaller();        
+        _marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, _schemaLocation);
+        _marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+        _marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+        return _marshaller;
+    }
+    
+   
+    
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageCodeToISO3.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageCodeToISO3.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageCodeToISO3.java	(revision 6059)
@@ -0,0 +1,74 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * This class uses an xml file which map obsolete language codes to ISO3 code. 
+ * The location of the file must be set to "_imdiLanguageMapURL".
+ * @author olhsha
+ */
+public class LanguageCodeToISO3 {
+
+    private Logger _logger = LoggerFactory.getLogger(CatalogData.class);
+    private Map<String, String> _codeMap = new HashMap<String, String>();
+    private String _imdiLanguageMapURL;
+    private String _imdiNamespaceURL;
+
+    public LanguageCodeToISO3(String imdiLanguageMapURL, String imdpiNamespaceURL) {
+        _imdiLanguageMapURL = imdiLanguageMapURL;
+        _imdiNamespaceURL = imdpiNamespaceURL;
+        _codeMap = this.retrieveCodeMap();
+    }
+
+    public Map<String, String> getCodeMap() {
+        return _codeMap;
+    }
+
+    private Map<String, String> retrieveCodeMap() {
+        Map<String, String> result = new HashMap<String, String>();
+        try {
+            URL fileURL = new URL(_imdiLanguageMapURL);
+            InputStream mapStream = fileURL.openStream();
+            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+            dbFactory.setNamespaceAware(true);
+            DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+            Document doc = dBuilder.parse(mapStream);
+            doc.getDocumentElement().normalize();
+            NodeList nList = doc.getElementsByTagNameNS(_imdiNamespaceURL, "Entry");
+            int length = nList.getLength();
+            for (int i = 0; i < length; i++) {
+                Node nNode = nList.item(i);
+                Element eElement = (Element) nNode;
+                String isoCode = eElement.getTextContent();
+                String originalCode = eElement.getAttribute("Value");
+                result.put(originalCode, isoCode);
+            }
+
+        } catch (ParserConfigurationException e1) {
+            _logger.error("Will return empty code map because: " + e1.getMessage());
+        } catch (SAXException e2) {
+            _logger.error("Will return empty code map because: " + e2.getMessage());
+        } catch (IOException e3) {
+            _logger.error("Will return empty code map because: " + e3.getMessage());
+        }
+        return result;
+    }
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvester.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvester.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvester.java	(revision 6059)
@@ -0,0 +1,191 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import de.clarin.fcs.schema.EndpointDescriptionResource;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.Node;
+import nl.mpi.imdi.api.IMDIDom;
+import nl.mpi.imdi.api.IMDIElement;
+import nl.mpi.util.OurURL;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+
+/**
+ *
+ * @author olhsha
+ */
+public class LanguageHarvester {
+    
+   private Logger _logger = LoggerFactory.getLogger(LanguageHarvester.class);
+   
+   private List<String> _mainCorpora;
+   private HashMap<String, List<String>> _corpora_subcorpora;
+   private List<String> _subcorpora;
+   private HashMap<String, List<String>> _subcorpora_sessions;
+   private List<String> _sessions;
+   private HashMap<String, List<String>> _sessions_languages;
+   private HashMap<String, List<String>> _corpora_sessions;
+   private LanguageCodeToISO3 _languageCodeMap;
+   
+  /**
+   * The constructor generates a number of maps according to the outline "corpus --> subcorpus --> session --> language".
+   * @param db corpus-structure database.
+   * @param searchableMainCorpora the list of main ("root") searchable corpora. 
+   */ 
+   public LanguageHarvester(CorpusStructureDBImpl db, List<String> searchableMainCorpora, String imdiLanguageMapURL, String imdiNamespaceURL){
+       
+       _languageCodeMap = new LanguageCodeToISO3(imdiLanguageMapURL, imdiNamespaceURL);
+       _mainCorpora  = searchableMainCorpora;
+       _corpora_subcorpora = this.retrieveCorporaSubcorpora(db, _mainCorpora);
+       _subcorpora = this.getValuesWithCheckDuplicates(_corpora_subcorpora); 
+       _subcorpora_sessions = this.retrieveSubcorporaSessions(db, _subcorpora);
+       _corpora_sessions = this.retrieveSubcorporaSessions(db, _mainCorpora);
+       _sessions = this.getValues(_corpora_sessions);
+       _sessions_languages = this.retrieveSessionLanguages(db, _sessions);
+   }
+   
+   /**
+    * 
+    * @param map a map from strings to lists of strings.
+    * @return the list of elements (with no repetitions) of all the lists which are values of the map.
+    */
+   private List<String> getValuesWithCheckDuplicates(HashMap<String, List<String>> map){
+     List<String> result = new ArrayList(); 
+     Collection<List<String>> values = map.values();
+       for (List<String> list:  values) {
+           result = CQLHelpers.merge(result, list);
+       }
+       return result;
+   }
+   
+   /**
+    * 
+    * @param map a map from strings to lists of strings
+    * @return the list of elements (possible repetitions) of all the lists which are values of the map.
+    */
+    private List<String> getValues(HashMap<String, List<String>> map){
+     List<String> result = new ArrayList(); 
+     Collection<List<String>> values = map.values();
+       for (List<String> list:  values) {
+           result.addAll(list);
+       }
+       return result;
+   }
+   
+   /**
+    * 
+    * @param db corpus-structure database.
+    * @param searchableMainCorpora the list of corpora
+    * @return the mapping from corpus-node id-s to lists of their corresponding direct subcorpus-node id-s
+    */ 
+   private HashMap<String, List<String>> retrieveCorporaSubcorpora(CorpusStructureDBImpl db, List<String> searchableMainCorpora){
+      HashMap<String, List<String>> result = new HashMap<String, List<String>>();
+       for (String nodeId: searchableMainCorpora) {
+           try {
+               Node[] kids = db.getChildrenNodes(nodeId);
+               List<String> kidIds = new ArrayList<String>();
+               for (Node kid : kids) {
+                   kidIds.add(kid.getNodeId());
+               }
+               result.put(nodeId, kidIds);
+               //_logger.info(nodeId);
+           } catch (Exception e) {
+               _logger.error("Exception in node " + nodeId + ": " + e.getMessage());
+           }
+       }
+       return result;
+   }
+   
+   /**
+    * 
+    * @param db corpus-structure database.
+    * @param corpora list of corpus-node identifiers.
+    * @return the mapping from corpus-node identifiers to lists of corresponding session-node identifiers.
+    */
+   private HashMap<String, List<String>> retrieveSubcorporaSessions(CorpusStructureDBImpl db, List<String> corpora){
+      HashMap<String, List<String>> result = new HashMap<String, List<String>>();
+       for (String nodeId: corpora) {
+           try {
+           String[] tmp = db.getSessions(nodeId);
+           List<String> sessions = Arrays.asList(tmp); 
+           result.put(nodeId, sessions);
+           } catch (Exception e) {
+               _logger.error("Eception on getting sessions of node "+nodeId+": "+e.getMessage());
+           }
+       }
+       return result;
+   }
+   
+   /**
+    * 
+    * @param db corpus-structure database.
+    * @param sessions lists of session-node identifiers.
+    * @return a map from session-node  identifiers to the lists of corresponding language ISO-3 codes.
+    */
+   private HashMap<String, List<String>> retrieveSessionLanguages(CorpusStructureDBImpl db, List<String> sessions){
+       HashMap result = new HashMap<String, List<String>>(); 
+       for (String id: sessions) {
+           result.put(id, getLanguagesForSession(db, id));
+       }
+       return result;
+   }
+   
+   
+   
+   /**
+    * 
+    * @param nodeId a corpus-node identifier.
+    * @return the instance of {@link Languages} containing the list of ISO-3 codes of the languages spoken and referred to in the node with "nodeId". 
+    */
+   public EndpointDescriptionResource.Languages getLanguages(String nodeId) {
+        EndpointDescriptionResource.Languages result = new EndpointDescriptionResource.Languages();
+        List<String> languages = result.getLanguage();
+        List<String> sessions  = (_mainCorpora.contains(nodeId)) ?
+                _corpora_sessions.get(nodeId) : _subcorpora_sessions.get(nodeId);
+        for (String sessionId : sessions) {
+            List<String> sessionLanguages = _sessions_languages.get(sessionId);
+            CQLHelpers.merge(languages, sessionLanguages);
+        }
+        return result;
+    }
+
+   /**
+    * 
+    * @param db a corpus-structure database.
+    * @param nodeId a session-node identifier.
+    * @return a list of the languages (iso-3 codes), spoken and referred to in the node with "nodeId".
+    */
+    private List<String> getLanguagesForSession(CorpusStructureDBImpl db, String nodeId) {
+        List<String> result = new ArrayList<String>();
+        try {
+            URL sessionURLtmp = db.getObjectURI(nodeId).toURL();
+            OurURL sessionURL = new OurURL(sessionURLtmp);
+            IMDIDom dom = new IMDIDom();
+            Document doc = dom.loadIMDIDocument(sessionURL, false);
+            IMDIElement elem = dom.getIMDIElement(doc, "Session.Content.Languages.Language(1).Id");
+            int elementNumber = 1;
+            while (elem != null) {
+                String langaugeCode = CQLHelpers.toThreeLetterISOCode(elem.getValue(), _languageCodeMap);
+                if (langaugeCode != null && result.indexOf(langaugeCode) == -1) {
+                    result.add(langaugeCode);
+                }
+                elementNumber++;
+                elem = dom.getIMDIElement(doc, "Session.Content.Languages.Language(" + elementNumber + ").Id");
+            }
+        } catch (Exception e) {
+            _logger.error(e.getMessage());
+        }
+        return result;
+    }
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread.java	(revision 6059)
@@ -0,0 +1,95 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import de.clarin.fcs.schema.EndpointDescriptionResource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.Node;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The tread is run separately from the main thread when the application is initiated (see "init" method of {@link SRUSearchEngineImpl}). 
+ * In this thread the languages of searchable ("root") corpora and their direct subcorpora are retrieved from the corresponding sessions and saved in a cache.
+ * 
+ * @author olhsha
+ */
+public class LanguageHarvestingThread extends Thread{
+    
+   private CorpusStructureDBImpl _db;
+   private List<String> _searchableCorpora;
+   private ArrayList<LoadingCache<String, EndpointDescriptionResource.Languages>> _cache;
+   private Logger _logger = LoggerFactory.getLogger(LanguageHarvestingThread.class);
+   private LanguageHarvester _languageHarvester;
+   private String _imdiLanguageMapURL;
+   private String _imdiNamespaceURL;
+   
+   /**
+    * 
+    * @param db corpus-structure database.
+    * @param searchableCorpora the list of main searchable-node identifiers.
+    * @param cache the reference to list of language caches; the reference is used to implement the side effect of creating a language-storing cache while thread is running; only cache[0] will be used later.
+    */
+   public LanguageHarvestingThread(CorpusStructureDBImpl db, List<String> searchableCorpora, String imdiLanguageMapURL, String imdiNamespaceURL, ArrayList<LoadingCache<String, EndpointDescriptionResource.Languages>> cache){
+       _imdiLanguageMapURL = imdiLanguageMapURL;
+       _imdiNamespaceURL = imdiNamespaceURL;
+       _db =db;
+       _searchableCorpora = searchableCorpora;
+       _cache = cache;
+   }
+   /**
+    * creates a single-element of the array "cache".
+    * While creating, the instance of {@link LanguageHarvester} is made and used to retrieve languages of the given node (via its nodeId). Trade-off space-time is in the favor of time.
+    * Also, the method calls the method "initLanguageCache" which triggers loading cached lists of languages when the application is started on the server.
+    */
+   @Override
+   public void run(){
+      _languageHarvester = new LanguageHarvester(_db, _searchableCorpora, _imdiLanguageMapURL, _imdiNamespaceURL);
+      LoadingCache<String, EndpointDescriptionResource.Languages> cache = CacheBuilder.newBuilder()
+                .maximumSize(10000)
+                .expireAfterWrite(365, TimeUnit.DAYS)
+                .build(
+                new CacheLoader<String, EndpointDescriptionResource.Languages>() {
+                    @Override
+                    public EndpointDescriptionResource.Languages load(String nodeId) {
+                        EndpointDescriptionResource.Languages result = _languageHarvester.getLanguages(nodeId);
+                        return result;
+                    }
+                }); 
+      _cache.add(cache);
+     try {
+           this.initLanguageCache(_cache.get(0));
+           //this.stop();
+        } catch (ExecutionException e) {
+            _logger.error("Cannot initialise cached list of languages: " + e.getMessage());
+        } 
+   }
+   
+   /**
+    * Calls get method of LoadingCache that initiates loading cache if it is not loaded yet.
+    * @param cache a cached mapping from corpus-node identifiers to the corresponding instances of the {@link Languages} class containing a list of ISO-3 codes of languages for a given node id.
+    * @throws ExecutionException if cache.get(-) throws it.
+    * 
+    */
+   private void initLanguageCache(LoadingCache<String, EndpointDescriptionResource.Languages> cache) throws ExecutionException{
+        for (String nodeId : _searchableCorpora) {
+            cache.get(nodeId);
+            Node[] kids = _db.getChildrenNodes(nodeId);
+            for (Node kid : kids) {
+                if (kid.getNodeType() == Node.CORPUS || kid.getNodeType() == Node.SESSION) {
+                    cache.get(kid.getNodeId());
+                }
+            }
+        }
+    } 
+   
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/NonSupportedQueryException.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/NonSupportedQueryException.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/NonSupportedQueryException.java	(revision 6059)
@@ -0,0 +1,13 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+/**
+ * Used to indicate that SRU-CQL query cannot be performed because it is not supported by the endpoint.
+ * @author olhsha
+ */
+public class NonSupportedQueryException extends Exception{
+    
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUExplainResultImpl.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUExplainResultImpl.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUExplainResultImpl.java	(revision 6059)
@@ -0,0 +1,348 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package nl.mpi.annot.search.cqlsearch2;
+
+import de.clarin.fcs.schema.EndpointDescriptionType.SupportedDataViews;
+import de.clarin.fcs.schema.EndpointDescriptionResource;
+import de.clarin.fcs.schema.EndpointDescriptionResource.AvailableDataViews;
+import de.clarin.fcs.schema.EndpointDescriptionResource.Languages;
+import de.clarin.fcs.schema.EndpointDescriptionType;
+import de.clarin.fcs.schema.EndpointDescriptionType.Capabilities;
+import de.clarin.fcs.schema.I18NString;
+import de.clarin.fcs.schema.ObjectFactory;
+import de.clarin.fcs.schema.Resources;
+import eu.clarin.sru.server.SRUConstants;
+import eu.clarin.sru.server.SRUDiagnosticList;
+import eu.clarin.sru.server.SRUExplainResult;
+import eu.clarin.sru.server.SRURequest;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import nl.mpi.corpusstructure.Node;
+import nl.mpi.corpusstructure.NodeIdUtils;
+import nl.mpi.corpusstructure.UnknownNodeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.google.common.cache.LoadingCache;
+import eu.clarin.sru.server.SRUServer;
+import java.util.concurrent.ExecutionException;
+
+/**
+ * Extention of SRUExplainResult class from {@link SRUServer package}. It is adapted for our endpoint.
+ * @author olhsha
+ */
+public class SRUExplainResultImpl extends SRUExplainResult {
+
+    private EndpointDescriptionType _endpointDesc = new EndpointDescriptionType();
+    private final BigInteger _version = BigInteger.ONE;
+    private final String[] _capabilities = {"http://clarin.eu/fcs/capability/basic-search"};
+    private List<String> _searchableCopropa;
+    private SRUSearchEngineImpl _sruEngineImpl = null;
+    private static final String[] ALL_FORMATS = {"*"};
+    private SRUDiagnosticList _diag;
+    private SRURequest _request;
+    private final String[] _auxALLOWED_EXTRA_REQUEST_PARAMETERS = {CQLConstants.X_FCS_ENDPOINT_DESCRIPTION};
+    private final ArrayList<String> ALLOWED_EXTRA_REQUEST_PARAMETERS = new ArrayList<String>(Arrays.asList(_auxALLOWED_EXTRA_REQUEST_PARAMETERS));
+    private boolean _needExtraEndpointDescription;
+    private Logger _logger = LoggerFactory.getLogger(SRUExplainResultImpl.class);
+    private ArrayList<LoadingCache<String, Languages>> _cache;
+    /**
+     * 
+     * @param sruEngineImpl implementation of {@link SRUSearchEngine} class of SRUServer package. 
+     * It initiates the endpoint by filling in parameters and triggering connection to the database. Also, it dispatches SRU-CQL requests from the aggregator;
+     * @param searchableCopropa list of the node identifiers of main ("root") searchable corpora.
+     * @param sruRequest SRU/CQL "explain" request passed from the aggregator.
+     * @param sruDiagnosticList the reference to the list of diagnostics passed from/to the aggregator. 
+     * to be filled in during computations when something goes wrong.
+     * @param cache the reference to an array (which should contain only 1 element) of cached mappings from node identifiers
+     * to the corresponding {@link Languages}; the cache is to be filled in when connection between the aggregator and 
+     * the endpoint is initialized via the {@link SRUSearchEngineImpl} instance.
+     */
+    public SRUExplainResultImpl(SRUSearchEngineImpl sruEngineImpl, List<String> searchableCopropa, SRURequest sruRequest, SRUDiagnosticList sruDiagnosticList, ArrayList<LoadingCache<String, Languages>> cache) {
+        super(sruDiagnosticList);
+        _diag = sruDiagnosticList;
+        _request = sruRequest;
+        _searchableCopropa = searchableCopropa;
+        _sruEngineImpl = sruEngineImpl;
+        _cache = cache;
+    }
+    
+    
+
+    
+    /**
+     * 
+     * @return "true" if the current sru explain request has "x-fcs-endpoint-description=true".
+     */
+    @Override
+    public boolean hasExtraResponseData() {
+        return _needExtraEndpointDescription;
+    }
+
+    /**
+     * 
+     * @param writer passed from/to aggregator and filled in by the current method.
+     */
+    @Override
+    public void writeExtraResponseData(XMLStreamWriter writer)
+            throws XMLStreamException {
+        JAXBElement<EndpointDescriptionType> endpointDescriptionElement = (new ObjectFactory()).createEndpointDescription(_endpointDesc);
+        try {
+            _sruEngineImpl.getExplainMarshaller().marshal(endpointDescriptionElement, writer);
+        } catch (JAXBException e1) {
+            _diag.addDiagnostic(SRUConstants.SRU_GENERAL_SYSTEM_ERROR, "Marshalling Exception", e1.getMessage());
+        }
+
+    }
+
+    /**
+     * Handles the explain request. 
+     * It adds the corresponding diagnostics if the request contains an unsupported parameter or a cached map for corpora languages is not computed yet.
+     * It calls help methods if extra description data have been requested.
+     */
+    public void handleRequest() {
+        _logger.debug("I have started to handle the request");
+        if (CQLHelpers.isInvalidElementsInTheList(_request.getExtraRequestDataNames(), ALLOWED_EXTRA_REQUEST_PARAMETERS)) {
+            _diag.addDiagnostic(SRUConstants.SRU_UNSUPPORTED_PARAMETER, "SRU unsupported parameter", "There is an unsupported extra request parameter");
+        } else {
+            _needExtraEndpointDescription = parseBoolean(_request.getExtraRequestData(CQLConstants.X_FCS_ENDPOINT_DESCRIPTION));
+            if (_needExtraEndpointDescription) {
+                if (_cache.isEmpty()) {
+                _diag.addDiagnostic(SRUConstants.SRU_RECORD_TEMPORARILY_UNAVAILABLE, "The extra data are not ready yet", "The information about corpora languages is being retrieved.");
+                return;
+                }
+                this.setDescription();
+            }
+        };
+    }
+
+    /**
+     * Calls help methods that fill in the endpoint-description fields: version, capabilities, supported data views, sub-resources.
+     */
+    private void setDescription() {
+        _endpointDesc.setVersion(_version);
+        _endpointDesc.setCapabilities(this.setCapabilities(_capabilities));
+        _endpointDesc.setSupportedDataViews(this.SetSuportedDataViews());
+        _endpointDesc.setResources((new Resources()));
+        _endpointDesc.getResources().getResource().addAll(this.makeResources(this.makeListTopNodes(_searchableCopropa)));
+
+    }
+
+    /**
+     * 
+     * @return supported dataviews which is by now contain only a default data view "hits".
+     */
+    private SupportedDataViews SetSuportedDataViews() {
+        SupportedDataViews result = new SupportedDataViews();
+        result.getSupportedDataView().add(new DefaultDataView());
+        return result;
+    }
+
+    /**
+     * 
+     * @param capabilitiesListed the list of used capabilities. By now consists only of "http://clarin.eu/fcs/capability/basic-search".
+     * @return the instance of the class {@link Capabilities} filled in by the elements of the input list. 
+     */
+    private Capabilities setCapabilities(String[] capabilitiesListed) {
+        Capabilities capabilly = new Capabilities();
+        List<String> capList = capabilly.getCapability();
+        for (String runner : capabilitiesListed) {
+            capList.add(runner);
+        }
+        return capabilly;
+    }
+
+    /**
+     * 
+     * @param searchableCorpora the list of node identifiers of main ("root") searchable corpora.
+     * @return the list of nodes (instances of class {@link Node} of corpus-structure API) corresponding to node id-s from the input list.
+     */
+    private List<Node> makeListTopNodes(List<String> searchableCorpora) {
+        List<Node> nodes = new ArrayList<Node>();
+        for (String corpusId : searchableCorpora) {
+            if (NodeIdUtils.isNodeId(corpusId)) {
+                try {
+                    nodes.add(_sruEngineImpl.getCorpusStructureDB().getNode(corpusId));
+                } catch (UnknownNodeException e) {
+                    _logger.error(corpusId + " is an unknown node", e);
+                }
+            } else {
+                _logger.error("There is a wrong nodeId " + corpusId + " in the root list of searchable corpora.");
+                return null;
+            }
+        }
+        return nodes;
+    }
+
+    /**
+     * 
+     * @param nodes the list of instances of {@link Node} class of corpus-structure API.
+     * @return the list of instances of {@link EndpointDescriptionResource} class whose fields are filled in by calling the help method on each element of the input list.
+     */
+    private List<EndpointDescriptionResource> makeResources(List<Node> nodes) {
+        ArrayList<EndpointDescriptionResource> results = new ArrayList<EndpointDescriptionResource>();
+        for (Node node : nodes) {
+            if (node.getNodeType() == Node.CORPUS || node.getNodeType() == Node.SESSION) {
+                EndpointDescriptionResource resource = this.makeEndpointDescriptionResource(_sruEngineImpl.getCorpusStructureDB(), node, _sruEngineImpl.getUserId());
+                results.add(resource);
+            }
+
+        }
+        return results;
+    }
+
+    /**
+     * 
+     * @param db the corpus-structure database.
+     * @param node an instance of the class {@link Node} from corpus-structure API.
+     * @param user the id of the user who accesses the database,passed from context.xml file of tomcat.
+     * @return an instance of the {@link EndpoinDescriptionResource} class whose fields are set using the information from "node", the catalog data and cached mapping "nodeId --> Languages".
+     */
+    private EndpointDescriptionResource makeEndpointDescriptionResource(CorpusStructureDBImpl db, Node node, String user) {
+
+        EndpointDescriptionResource resource = new EndpointDescriptionResource();
+        String nodeId = node.getNodeId();
+        String nodeHandle;
+        try {
+            String nodePID = db.getObjectPID(nodeId);
+            if (nodePID != null) {
+                // before VLO was connected to Aggregator we did not need suffix "@format=cmdi"
+                nodeHandle = nodePID.endsWith(CQLHelpers.formatcmdi) ? nodePID : nodePID.concat(CQLHelpers.formatcmdi);
+            } else {
+                URI nodeURI = db.getObjectURI(nodeId);
+                if (nodeURI != null) {
+                    nodeHandle = nodeURI.toString();
+                    _logger.debug("For node " + nodeId + " we take not its handle (since it is absent), but its URI " + nodeHandle);
+                } else {
+                    nodeHandle = null;
+                    _logger.error("Node " + nodeId + " does not have either a handle or URI");
+                }
+            }
+
+            resource.setPid(nodeHandle);
+            resource.setAvailableDataViews(this.makeAvailableDataViews());
+            //not used
+//            String nodeName = (stringSanityCheck(node.getName()) ? node.getName() : (stringSanityCheck(node.getTitle()) ? node.getTitle() : "No valid name or title provided for this node "));
+
+//            _logger.debug("Node " + nodeId + ": db.countDescendants is called");
+//            int _numberOfRecords = db.countDescendants(nodeId, user, -1, true, ALL_FORMATS, true);
+//            _logger.debug("Node " + nodeId + ": db.countDescendants returns " + _numberOfRecords);
+
+            CatalogData cd = new CatalogData(db, nodeId, user, _sruEngineImpl.getHandleResolverURL());
+            resource.getDescription().addAll(cd.getDescriptions());
+            resource.setLandingPageURI(cd.getLandingPageURL());
+
+            Resources subresources = new Resources();
+            subresources.getResource().addAll(this.makeSubresourcesForNode(db, node));
+            resource.setResources(subresources);
+
+            // get languages as a union of languages of the subresources after the subresources are constructed
+            resource.setLanguages(this.makeLanguages(subresources));
+            resource.getTitle().addAll(cd.getNodeTitle());
+
+        } catch (UnknownNodeException e) {
+            _logger.error(nodeId + " is an invalide nodeID", e.getMessage());
+        }
+        return resource;
+    }
+
+    /**
+     * 
+     * @param subresources an instance of {@link Resources} class that contains the list of instances of {@link EndpointDescriptionResource} class.
+     * @return the instance of {@link Language}class that contains the list of all languages spoken or referred to in "subresources".
+     */
+    private Languages makeLanguages(Resources subresources) {
+        List<EndpointDescriptionResource> subresourceList = subresources.getResource();
+        Languages langs = new Languages();
+        for (EndpointDescriptionResource subresource : subresourceList) {
+            CQLHelpers.merge(langs.getLanguage(), subresource.getLanguages().getLanguage());
+        }
+        return langs;
+    }
+
+    /**
+     * 
+     * @return  the instance of {@link AvailableDataviews}  based on the single supported dataview "hits". 
+     */
+    private AvailableDataViews makeAvailableDataViews() {
+        AvailableDataViews result = new AvailableDataViews();
+        result.getRef().add(_endpointDesc.getSupportedDataViews().getSupportedDataView().get(0));
+        return result;
+    }
+
+    /**
+     * 
+     * @param value a string.
+     * @return Boolean.parseBoolean(value) if value not null, and "false" otherwise.
+     */
+    private boolean parseBoolean(String value) {
+        if (value != null) {
+            return Boolean.parseBoolean(value);
+        }
+        return false;
+    }
+
+    /**
+     * 
+     * @param db the corpus-structure database.
+     * @param node an instance of the class {@link Node} from corpus-structure API.
+     * @return the list of instances of {@link EndpointDescriptionResource} corresponding to the direct children nodes (corpora or sessions) of "node".
+     */
+    private List<EndpointDescriptionResource> makeSubresourcesForNode(CorpusStructureDBImpl db, Node node) {
+        List<EndpointDescriptionResource> result = new ArrayList<EndpointDescriptionResource>();
+        Node[] kids = db.getChildrenNodes(node.getNodeId());
+        for (Node kid : kids) {
+            if (kid.getNodeType() == Node.CORPUS || kid.getNodeType() == Node.SESSION) {
+                result.add(this.makeSubresource(db, kid.getNodeId()));
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 
+     * @param db the corpus-structure database.
+     * @param nodeId the identifier of a corpus node.
+     * @return the instance of the {@link EndpointDescriptionResource} class whose fields are filled 
+     * based on corpus-structure information for the "nodeId" and the cached mapping "nodeId --> Languages"
+     */
+    private EndpointDescriptionResource makeSubresource(CorpusStructureDBImpl db, String nodeId) {
+        EndpointDescriptionResource result = new EndpointDescriptionResource();
+        result.setAvailableDataViews(this.makeAvailableDataViews());
+        result.setLandingPageURI(CQLHelpers.constructHandleView(db, nodeId, _sruEngineImpl.getHandleResolverURL()));
+        try {
+            result.setLanguages(_cache.get(0).get(nodeId));
+        } catch (ExecutionException e) {
+            _diag.addDiagnostic(SRUConstants.SRU_GENERAL_SYSTEM_ERROR, nodeId, e.getMessage());
+             result.setLanguages((new LanguageHarvester(db, _searchableCopropa, _sruEngineImpl.getImdiLanguageMapURL(), _sruEngineImpl.getImdiNamespaceURL())).getLanguages(nodeId));
+        }
+        result.setPid(db.getObjectPID(nodeId));
+
+        //resource.setResources(new Resources()); implement subresources for the subcorpora of the first level later, via xml-cash
+        //result.getDescription().add("??");
+
+
+        I18NString i18nstring = new I18NString();
+        i18nstring.setLang("eng");
+        Node node = db.getNode(nodeId);
+        String nodeTitle = node.getTitle();
+        String title = (nodeTitle == null || nodeTitle.trim().isEmpty()) ? node.getName() : nodeTitle;
+        i18nstring.setValue(title);
+        result.getTitle().add(i18nstring);
+
+        return result;
+    }
+
+   
+   
+   
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchEngineImpl.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchEngineImpl.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchEngineImpl.java	(revision 6059)
@@ -0,0 +1,259 @@
+package nl.mpi.annot.search.cqlsearch2;
+
+import com.google.common.cache.LoadingCache;
+import de.clarin.fcs.schema.EndpointDescriptionResource.Languages;
+import de.clarin.fcs.schema.EndpointDescriptionType;
+import de.clarin.fcs.schema.ResourceType;
+import eu.clarin.sru.server.*;
+import eu.clarin.sru.server.utils.SRUSearchEngineBase;
+import java.io.File;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.ServletContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.PropertyException;
+import nl.mpi.annot.search.lib.SearchClient;
+import nl.mpi.corpusstructure.CorpusStructureDBImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+ /**
+     * Implementation of SRUSearchEngine class of SRUServer package. It initiates the endpoint by filling in parameters and triggering connection to the database. 
+     * Moreover, it dispatches SRU-CQL requests from the aggregator.
+     **/
+
+public class SRUSearchEngineImpl extends SRUSearchEngineBase {
+
+    private SearchClient _searchClient = null;
+    private CorpusStructureDBImpl _db;
+    private String _searchDbUrl = null;
+    private String _userId = null;
+    private List<String> _searchableCorpora;
+    private int _tierCollectionThreads = 3;
+    private int _queryThreads = 3;
+    private Logger _logger = LoggerFactory.getLogger(SRUSearchEngineImpl.class);
+    private Marshaller explainMarshaller;
+    private Marshaller searchRetrieveMarshaller;        
+    private ArrayList<LoadingCache<String, Languages>> _cache = new ArrayList<LoadingCache<String, Languages>>();
+    private LanguageHarvestingThread _languageThread;
+    private String _imdiLanguageMapURL;
+    private String _imdiNamespaceURL;
+    private String _handleResolverURL;
+    private String _recordSchemaIdentifier;
+    private String _schemaLocationExplain;
+    private String _schemaLocationSearchRetrieve;
+    /**
+     *  Performs SRU/CQL explain request; the results will be passed serialised to the aggregator via 
+     * "writer" parameter near the exit point of "handleRequest" method.
+     * 
+     * @param sruServerConfig an instance of {@link SRUServerConfig} class (SRUServer package), passed from/ the aggregator.
+     * @param sruRequest an instance of {@link SRURequest} class (SRUServer package), passed from the aggregator.
+     * @param sruDiagnosticList an instance of {@link SRUDiagnosticList} class (SRUServer package), passed from/to the aggregator.
+     * @return instance of {@link SRUExplainResult} class (SRUServer package) which is created and used within this method.
+     */
+    @Override
+    public SRUExplainResult explain(SRUServerConfig sruServerConfig, SRURequest sruRequest, SRUDiagnosticList sruDiagnosticList){
+        SRUExplainResultImpl result = new SRUExplainResultImpl(this, _searchableCorpora, sruRequest, sruDiagnosticList, _cache);
+        result.handleRequest();
+        return result;
+    }
+    
+    /**
+     * Performs SRU/CQL search request; the results will be passed serialised to the aggregator via 
+     * "writer" parameter near the exit point of "handleRequest" method.
+     * 
+    * @param sruServerConfig an instance of {@link SRUServerConfig} class (SRUServer package), passed from the aggregator.
+     * @param sruRequest an instance of {@link SRURequest"} class (SRUServer package), passed from the aggregator.
+     * @param sruDiagnosticList an instance of {@link SRUDiagnosticList} class (SRUServer package), passed from/to the aggregator.
+     * @return instance of {@link SRUSearchResultSet} class (SRUServer package) which is created and used within this method.
+     
+     * @throws SRUException if recordSchemaIdentifier is null or not equal to CLARIN_FCS_RECORD_SCHEMA, 
+     * or the exception is passed from "handleRequest"  method.
+     */
+    @Override
+    public SRUSearchResultSet search(SRUServerConfig sruServerConfig, SRURequest sruRequest, SRUDiagnosticList sruDiagnosticList) throws SRUException {
+       
+        final String recordSchemaIdentifier =
+                sruRequest.getRecordSchemaIdentifier();
+        if ((recordSchemaIdentifier != null)
+                && !recordSchemaIdentifier.equals(sruServerConfig.getSchemaInfo().get(0).getIdentifier())) {
+            throw new SRUException(
+                    SRUConstants.SRU_UNKNOWN_SCHEMA_FOR_RETRIEVAL,
+                    recordSchemaIdentifier, "Record schema \""
+                    + recordSchemaIdentifier
+                    + "\" is not supported.");
+        }
+
+        SRUSearchResultSetImpl ret = new SRUSearchResultSetImpl(sruServerConfig, sruRequest, sruDiagnosticList, this, _searchableCorpora);
+        ret.handleRequest();
+        return ret;
+    }
+
+   /** Performs SRU/CQL scan request, which is not specified yet.
+     * @param sruServerConfig an instance of {@link SRUServerConfig} class (SRUServer package), passed from the aggregator.
+     * @param sruRequest an instance of {@link SRURequest} class (SRUServer package), passed from the aggregator.
+     * @param sruDiagnosticList an instance of {@link SRUDiagnosticList} class (SRUServer package), passed from/to the aggregator.
+     * @return instance of {@link SRUScanResult} class (SRUServer package).
+    * 
+    */
+    @Override
+    public SRUScanResultSet scan(SRUServerConfig sruServerConfig, SRURequest sruRequest, SRUDiagnosticList sruDiagnosticList) {
+         return null;
+    }
+
+    /**
+     * Initializes the search engine.
+     *
+     * @param config (not used at the moment) the {@link SRUServerConfig} object for this search engine.
+     * @param params additional parameters gathered from the Servlet configuration and Servlet context.
+     */
+    @Override
+    public void init(ServletContext context, SRUServerConfig config, Map<String, String> params) throws SRUConfigException {
+        super.init(context, config, params);
+        _logger.info("INIT");
+        _userId = params.get("nl.mpi.cqlsearch2.userId");
+        _searchableCorpora = Collections.unmodifiableList(Arrays.asList((params.get("nl.mpi.cqlsearch2.searchableCorpora")).split(",")));
+        _tierCollectionThreads = Integer.parseInt(params.get("nl.mpi.cqlsearch2.tierCollectionThreads"));
+        _queryThreads = Integer.parseInt(params.get("nl.mpi.cqlsearch2.queryThreads"));
+        _searchDbUrl = params.get("nl.mpi.annexUrl");
+        _imdiLanguageMapURL = params.get("nl.mpi.cqlsearch2.imdiLanguageMapURL");
+        _imdiNamespaceURL =params.get("nl.mpi.cqlsearch2.imdiNamespaceURL");
+        _handleResolverURL = params.get("nl.mpi.cqlsearch2.handleResolverURL");
+        _recordSchemaIdentifier = params.get("eu.clarin.sru.server.recordScemaIdentifier");
+        _schemaLocationExplain=params.get("nl.mpi.cqlsearch2.schemaLocationEndpointDescription");
+        _schemaLocationSearchRetrieve = params.get("nl.mpi.cqlsearch2.schemaLocationResource");
+        
+        this.initDbConnection(params.get("nl.mpi.annot.search.searchDbURL"),
+                params.get("nl.mpi.annot.search.searchDbUser"),
+                params.get("nl.mpi.annot.search.searchDbPassword"),
+                params.get("nl.mpi.annot.search.luceneDirectory"),
+                params.get("nl.mpi.db.corpusstructure"));
+       
+       JaxbMarshallerFactory jaxbMarshallerFactoryExplain =  new JaxbMarshallerFactory();
+       JaxbMarshallerFactory jaxbMarshallerFactorySearchRetrieve =  new JaxbMarshallerFactory();
+       try {
+         jaxbMarshallerFactoryExplain.setSchemaLocation(_schemaLocationExplain);
+         explainMarshaller = jaxbMarshallerFactoryExplain.createMarshaller(EndpointDescriptionType.class);
+         jaxbMarshallerFactorySearchRetrieve.setSchemaLocation(_schemaLocationSearchRetrieve);
+         searchRetrieveMarshaller = jaxbMarshallerFactorySearchRetrieve.createMarshaller(ResourceType.class);
+       
+       } catch (PropertyException e) {
+            throw new SRUConfigException("JaxbMarshallerFactory cannot set schema: "+e.getMessage());   
+        } catch (JAXBException e2) {
+            throw new SRUConfigException("JaxbMarshallerFactory cannot create marshaller: "+e2.getMessage());
+            
+        }
+       
+       
+       // Side effect on cache: there it is filled in
+       _languageThread = new LanguageHarvestingThread(_db, _searchableCorpora, _imdiLanguageMapURL, _imdiNamespaceURL, _cache);
+       int currentPriority = _languageThread.getPriority();
+       //_languageThread.setPriority(currentPriority-1);
+       _languageThread.setName("Language Thread");
+       _languageThread.start();
+    }
+    
+    public String getHandleResolverURL(){
+        return _handleResolverURL;
+    }
+    
+    public String getImdiNamespaceURL(){
+        return _imdiNamespaceURL;
+    }
+    
+    public String getImdiLanguageMapURL(){
+        return _imdiLanguageMapURL;
+    }
+    
+  
+    /**
+     * 
+     * @return {@link Marshaller} object for serializing extra data on "explain" request.
+     */
+    public Marshaller getExplainMarshaller(){
+        return explainMarshaller;
+    }
+    
+    /**
+     * 
+     * @return {@link Marshaller} object for serializing response on "search" request.
+     */
+    public Marshaller getSearchRetrieveMarshaller(){
+        return searchRetrieveMarshaller;
+    }
+
+    /**
+     * 
+     *
+     * @param url Trova JDBC url.
+     * @param user SQL user for url.
+     * @param pass SQL user password.
+     * @param luceneDir directory with Lucene index for Trova, or null (name must indicate N-gram N, e.g. /data/lucene-indexes/trova.5)
+     * @param corpusStructureDBName 
+     * @throws IllegalStateException if the connection to the database fails (creation of the search client throws an SQLException).
+     */
+    private void initDbConnection(String url, String user, String pass, String luceneDir, String corpusStructureDBName) throws IllegalStateException {
+
+        try {
+            _searchClient = new SearchClient(url, user, pass, ((luceneDir == null || luceneDir.trim().length() == 0) ? null : new File(luceneDir))); // for searchRetrieve
+        } catch (SQLException sqle) {
+            throw new IllegalStateException("Cannot connect to Annex/Trova search DB at " + url + " as user " + user, sqle);
+        }
+        _db = new CorpusStructureDBImpl(corpusStructureDBName);
+    }
+
+    /**
+     * 
+     * @return the database-user id.
+     */
+    public String getUserId() {
+        return _userId;
+    }
+
+    /**
+     * 
+     * @return the {@link CorpusStructureDBImpl} object set for *this*.
+     */
+    public CorpusStructureDBImpl getCorpusStructureDB() {
+        return _db;
+    }
+
+     /**
+     * 
+     * @return the {@link SearchClient} object set for *this*.
+     */
+    public SearchClient getSearchClient() {
+        return _searchClient;
+    }
+
+     /**
+     * 
+     * @return the URL of the search database set for *this*.
+     */
+    public String getSearchDBUrl() {
+        return _searchDbUrl;
+    }
+
+    /**
+     * 
+     * @return the number of threads for making tier collection.
+     */
+    public int getTierCollectionThreads() {
+        return _tierCollectionThreads;
+    }
+
+    /**
+     * 
+     * @return the number of threads for performing Trova query.
+     */
+    public int getQueryThreads() {
+        return _queryThreads;
+    }
+   
+    
+}
Index: /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchResultSetImpl.java
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchResultSetImpl.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchResultSetImpl.java	(revision 6059)
@@ -0,0 +1,556 @@
+package nl.mpi.annot.search.cqlsearch2;
+
+//import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
+import de.clarin.fcs.schema.DataViewType;
+import de.clarin.fcs.schema.ObjectFactory;
+import de.clarin.fcs.schema.ResourceType;
+import de.clarin.fcs.schema.ResourceType.ResourceFragment;
+import de.clarin.fcs.schema.Result;
+import eu.clarin.sru.server.*;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import com.google.common.collect.Collections2;
+
+import java.util.Collection;
+import javax.xml.stream.XMLStreamWriter;
+
+import nl.mpi.annot.search.lib.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.z3950.zing.cql.CQLAndNode;
+import org.z3950.zing.cql.CQLNode;
+import org.z3950.zing.cql.CQLOrNode;
+import org.z3950.zing.cql.CQLTermNode;
+
+/**
+ * Extention of {@link SRUSearchResultSet} class from SRUServer package; it is adapted for our endpoint.
+ * @author olhsha
+ */
+public class SRUSearchResultSetImpl extends SRUSearchResultSet {
+
+    SRUServerConfig _srvConfig = null;
+    SRURequest _request = null;
+    SRUDiagnosticList _diag = null;
+    private static Logger _logger = LoggerFactory.getLogger(SRUSearchResultSetImpl.class);
+    /**
+     * Connection to a single query for the Trova search engine
+     */
+    QueryServer _pQuery = null;
+    /**
+     * Used by nextRecord and writeRecord to access a specific hit
+     */
+    int _index = -1;
+    private String _matchMode = Constants.REGEXP_MATCH;
+    private SRUSearchEngineImpl _sruEngineImpl = null;
+    private List<String> _searchableCorpora;
+    private int _startRecord;
+    private int _totalRecordCounter; // amount of found records
+    private int _recordCount; // amount of found records within total found records, starting from startRecord till startRecord+maximumRecords
+    private List<SearchHit> _foundRecords = null;
+    private int _contextSize = 3;
+    private final String dataviewTypeHits = "application/x-clarin-fcs-hits+xml";
+    /**
+     * the list of characters that cause XML-parser exception *
+     **/
+    private final char[] WeirdCHARACTERS = {(char) (Integer.parseInt("0013", 16))};
+    private final String[] _auxTIERS = {Constants.TIER_TYPE_LABEL + "Spch", /* CGN */
+        Constants.TIER_TYPE_LABEL + "text", /* ESF, IFA, childes, talkbank */
+        Constants.TIER_TYPE_LABEL + "eng", /* childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "exp", /* childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "flo", /* childes*/
+        Constants.TIER_TYPE_LABEL + "ort", /* hieroglyphs:  childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "META_Comment", /* ESF, talkbank */
+        Constants.TIER_TYPE_LABEL + "META_Bck", /* childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "META_Situation", /* childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "act", /* childes, talkbank*/
+        Constants.TIER_TYPE_LABEL + "com", /* childes, talkbank*/};
+    private final ArrayList<String> TIERCONSTRAINTS = new ArrayList<String>(Arrays.asList(_auxTIERS));
+    private final String[] _auxALLOWED_EXTRA_REQUEST_PARAMETERS = {CQLConstants.X_FCS_CONTEXT, CQLConstants.X_FCS_DATAVIEWS};
+    private final ArrayList<String> ALLOWED_EXTRA_REQUEST_PARAMETERS = new ArrayList<String>(Arrays.asList(_auxALLOWED_EXTRA_REQUEST_PARAMETERS));
+    
+ 
+    /**
+     * 
+     * @param sruServerConfig the {@link SRUServerConfig} passed from the aggregator.
+     * @param sruRequest the object of {@link SRURequest} representing  SRU/CQL "search" request with parameters; the request is passed from the aggregator.
+     * @param sruDiagnosticList the reference to the list of diagnostics passed from/to the aggregator.
+     * @param sruEngineImpl the instance of {@link SRUSearchEngine} class of SRUServer package.
+     * @param searchableCorpora the list of the node id-s of main ("root") searchable corpora.
+     */
+    protected SRUSearchResultSetImpl(SRUServerConfig sruServerConfig, SRURequest sruRequest, SRUDiagnosticList sruDiagnosticList,
+            SRUSearchEngineImpl sruEngineImpl, List<String> searchableCorpora) {
+
+        super(sruDiagnosticList);
+
+        _srvConfig = sruServerConfig;
+        _request = sruRequest;
+        _diag = sruDiagnosticList;
+        _sruEngineImpl = sruEngineImpl;
+        _searchableCorpora = searchableCorpora;
+        _startRecord = (sruRequest.getStartRecord() < 1) ? 1 : sruRequest.getStartRecord();
+        _index = _startRecord - 1; // SRU-indexing, starts with 1; will be increased by one on the first iteration
+        _foundRecords = null;
+        _totalRecordCounter = 0;
+        _recordCount = 0;
+    }
+
+    /**
+     * Performs search request; if the query is not supported adds the corresponding diagnostics and returns.
+     * @throws SRUException if the method "makePQuery" or "runSearch" throws exceptions.
+     */
+    public void handleRequest() throws SRUException {
+      
+        List<String> searchExpressions ;
+        try {
+           searchExpressions =  this.cqlToTrovaRequests(_request.getQuery());
+        } catch (NonSupportedQueryException e){
+            _diag.addDiagnostic(SRUConstants.SRU_QUERY_FEATURE_UNSUPPORTED, "query", "Query "+_request.getQuery()+" is not supported.");
+            return;
+        }
+
+
+        if (CQLHelpers.isInvalidElementsInTheList(_request.getExtraRequestDataNames(), ALLOWED_EXTRA_REQUEST_PARAMETERS)) {
+            _foundRecords = null;
+            _recordCount = 0;
+            _diag.addDiagnostic(SRUConstants.SRU_UNSUPPORTED_PARAMETER, "SRU unsupported parameter", "There is an unsupported extra request parameter");
+            return;
+        }
+        
+        // checkDataviews return true iff the list of dataviews contains at least one supported view (hits in our case)
+        if (!this.checkDataviews(_request)){
+            return;
+        }
+        
+        
+        TierCollection domain = makeDomain(_request, _sruEngineImpl.getUserId(), _sruEngineImpl.getTierCollectionThreads(),
+                _searchableCorpora, _sruEngineImpl.getSearchClient());
+        _pQuery = makePQuery(_sruEngineImpl, _logger);
+
+        
+        int requestedMaximumRecords = (_request.getMaximumRecords() > _srvConfig.getMaximumRecords())
+                ? _srvConfig.getMaximumRecords() : _request.getMaximumRecords();
+        
+        _foundRecords = this.runSearch(_pQuery, domain, searchExpressions, _matchMode, TIERCONSTRAINTS, _startRecord, requestedMaximumRecords);
+
+    }
+    
+   
+
+    /**
+     * 
+     * @return the amount of found suitable records containing the search terms.
+     */
+    @Override
+    public int getTotalRecordCount() {
+        return _totalRecordCounter;
+    }
+
+    /**
+     * 
+     * @return the amount of records to be return to the aggregator.
+     */
+    @Override
+    public int getRecordCount() {
+        return _recordCount;
+    }
+
+    /**
+     * 
+     * @return the record schema identifier.
+     */
+    @Override
+    public String getRecordSchemaIdentifier() {
+        return _request.getRecordSchemaIdentifier();
+    }
+
+    /**
+     * 
+     * @return true if the next record is expected by the aggregator.
+     */
+    @Override
+    public boolean nextRecord() {
+        _index++;
+        return (_index < _startRecord + _recordCount);
+    }
+
+    /**
+     * 
+     * @return null. Not implemented, not clear what must be there: check SRUServer package/interface.
+     */
+    @Override
+    public String getRecordIdentifier() {
+        return null;
+    }
+
+    /**
+     * 
+     * @param writer serialized presentation of the response passed from and then back to the aggregator.
+     */
+    @Override
+    public void writeRecord(XMLStreamWriter writer) {
+        
+        SearchHit hit = _foundRecords.get(_index - _startRecord);
+        ResourceType fcsResource = this.getResource(hit, hit.getFirstField(), hit.layerTiers.get(0));
+        JAXBElement<ResourceType> resourceTypeElem = (new ObjectFactory()).createResource(fcsResource);
+        
+        try {
+            _sruEngineImpl.getSearchRetrieveMarshaller().marshal(resourceTypeElem, writer);
+        } catch (JAXBException e1) {
+            _diag.addDiagnostic(SRUConstants.SRU_GENERAL_SYSTEM_ERROR, "Serialization error", e1.getMessage());
+        } 
+
+
+    }
+
+    /**
+     * 
+     * @param source a string.
+     * @return overworked output string with escape symbols (causing xml-parser exception) replaced with lozenge.
+     */ 
+    private String replaceStrangeSymbolsWithLozenge(String source) {
+
+        if (source == null) {
+            return source;
+        }
+
+        String cleanedSource = source;
+        String tmp;
+        for (char c : WeirdCHARACTERS) {
+            tmp = cleanedSource.replace(c, CQLConstants.LOZENGE);
+            cleanedSource = tmp;
+        }
+        return cleanedSource;
+    }
+
+    /**
+     * 
+     * @param request an {@link SRURequest} object.
+     * @return true if the request does not contain extra-parameter "x-fcs-dataviews", or if it contains "hits" since  for our endpoint "hits" is the only implemented dataview. Must be re-implemented once another possible data-view is
+     * implemented for the end-point.
+     * Also checks, if a dataview is in the list of acceptable FCS dataviews, and if not, adds the corresponding FCS diagnostics. 
+     */
+    private boolean checkDataviews(SRURequest request){
+       if (!(request.getExtraRequestDataNames()).contains(CQLConstants.X_FCS_DATAVIEWS)) {
+           return true;
+       }
+       String dataviewsstring  = request.getExtraRequestData(CQLConstants.X_FCS_DATAVIEWS);
+       List<String> dataviews = Arrays.asList(dataviewsstring.split(","));
+       for (String dataview: dataviews) {
+           if (!dataview.equals(CQLConstants.hits)) {
+              _diag.addDiagnostic(CQLConstants.FCS_DIAGNOSTIC_REQUESTED_DATA_VIEW_INVALID, dataview, "Requested Data View is not valid for this resource");
+           }
+       }
+       return dataviews.contains(CQLConstants.hits);
+    }
+  
+    /**
+     * 
+     * @param request an {@link SRURequest} object.
+     * @param searchableCorpora the list of node id-s of searchable corpora.
+     * @return the list of node identifiers of top search nodes. If the request contains 
+     * "x-fcs-context" parameter then the tope node identifiers are generated from the value
+     * of this parameter which is a coma-separated list of handles of node-id-s. Otherwise
+     * the searchable corpora form the list of the top-nodes.
+     */
+    private ArrayList<String> makeTopNodesList(SRURequest request, List<String> searchableCorpora) {
+
+        ArrayList<String> topNodes = new ArrayList<String>();
+        String tosearch = request.getExtraRequestData(CQLConstants.X_FCS_CONTEXT);
+        if (tosearch != null) {
+            topNodes = CQLHelpers.inListHandleOrURItoNodeId(_sruEngineImpl.getCorpusStructureDB(), Arrays.asList(tosearch.split(",")));
+        } else {
+            for (String c : searchableCorpora) {
+                topNodes.add(c);
+            }
+        }
+        return topNodes;
+    }
+    
+    /**
+     * 
+     * @param request an {@link SRURequest} object.
+     * @param userId the database-user id.
+     * @param tierCollectionThreads the number of threads for creating tier collection.
+     * @param searchableCorpora the list of node identifiers of searchable ("root") corpora.
+     * @param searchClient a {@link SearchClient} object.
+     * @return a {@link TierCollection} object constructed for the input parameters.
+     */
+    private TierCollection makeDomain(SRURequest request, String userId, int tierCollectionThreads, List<String> searchableCorpora, SearchClient searchClient) {
+        ArrayList<String> topNodes = makeTopNodesList(request, searchableCorpora);
+        TierCollection domain = new TierCollection(tierCollectionThreads, searchClient, userId, topNodes);
+        return domain;
+    }
+
+    /**
+     * 
+     * @param engineImpl an {@link SRUSearchEngineImpl} object.
+     * @param logger this logger used to log an exception if thrown while creating a query.
+     * @return a {@link QueryServer} object, a pQuery. 
+     * @throws SRUException if an exception is thrown while creating a query for the "engineImpl".
+     */
+    private QueryServer makePQuery(SRUSearchEngineImpl engineImpl, Logger logger) throws SRUException {
+        QueryServer pQuery = null;
+        int queryThreads = engineImpl.getQueryThreads();
+        try {
+            pQuery = engineImpl.getSearchClient().createQuery(queryThreads);
+        } catch (Exception e) {
+            logger.info(e.toString());
+            throw new SRUException(SRUConstants.SRU_GENERAL_SYSTEM_ERROR, e.toString());
+        }
+
+        return pQuery;
+    }
+
+    /**
+     * 
+     * @param pQuery a {@link QueryServer} object.
+     * @param domain a {@link TierCollection} object.
+     * @param trovaQueries a list of string Trova queries, which is translation of CQL query to a collection of conjunctions;
+     * for instance, a query (a AND b) OR (c AND d) is translated to [a.*c, c.*a, a.*d, d.*a, b.*c, c.*b, b.*d,d.*b].
+     * @param matchMode Trova Match mode.
+     * @param tierConstraints a list of Trova tiers within which the search must be run. 
+     * @param startRecord the first record to be passed to the aggregator.
+     * @param requestedMaximumRecords the upper bound on the amount of requested records.
+     * @return the list of Trova search hits, each of which contains the left and the right contexts and the term/regular expression hit itself.
+     * @throws SRUException if the amount of found hits is less than the requested index of the first record to display.
+     */
+    private List<SearchHit> runSearch(QueryServer pQuery, TierCollection domain, List<String> trovaQueries, String matchMode,
+            ArrayList<String> tierConstraints, int startRecord, int requestedMaximumRecords) throws SRUException {
+        List<SearchHit> result = new ArrayList<SearchHit>();
+        _totalRecordCounter = 0;
+        long expectRecords = (long) startRecord + (long) requestedMaximumRecords - 1;
+        for (String trovaQuery : trovaQueries) {
+            pQuery.setSimpleQuery(trovaQuery, Constants.ANNOTATIONS, false, matchMode, tierConstraints);
+
+            // first null: no filetype constraints; second null: query as set by setSimpleQuery
+            pQuery.doQuery(domain, null, null);
+            SearchStatistics stats = pQuery.getSearchStatistics();
+            while (_totalRecordCounter + stats.nHits < (expectRecords) && pQuery.isRunning()) {
+                try {
+                    Thread.sleep(50);
+                } catch (InterruptedException ie) {
+                    // Do Nothing, being interrupted is not bad.
+                }
+                stats = pQuery.getSearchStatistics();
+            }
+            _totalRecordCounter = _totalRecordCounter + stats.nHits;
+            result.addAll(pQuery.getHits(0, stats.nHits, _contextSize));
+        }
+        if (startRecord > _totalRecordCounter) {
+            _recordCount = 0;
+            if (_totalRecordCounter > 0) {
+                throw new SRUException(SRUConstants.SRU_FIRST_RECORD_POSITION_OUT_OF_RANGE, "startRecord", "Value of startRecord is higher than the number of hits of the query");
+            } else {
+                return null;
+            }
+        } else {
+            int usefulRecordCount = (_totalRecordCounter < expectRecords) ? _totalRecordCounter : (int) expectRecords;
+            _recordCount = usefulRecordCount - (startRecord - 1);
+            return result.subList(startRecord - 1, _recordCount);
+        }
+    }
+
+    /**
+     * 
+     * @param hit a {@link SearchHit} object.
+     * @param atomicHit a {@link HitField} object.
+     * @param layer a {@link HitLayer} object.
+     * @return the {@link resourceType} object whose fields are filled based on input parameters.
+     */
+    private ResourceType getResource(SearchHit hit, HitField atomicHit, HitLayer layer) {
+
+        ResourceType resultingFcsResource = new ResourceType();
+        
+        //setting up ref
+        
+        String landingPage = this.getLandingPageOfHit(hit, String.valueOf(hit.beginTime),
+                String.valueOf(hit.endTime - atomicHit.beginTime), layer.tierName);
+        resultingFcsResource.setRef(landingPage);
+        
+        // setting up PID
+        String PID = CQLHelpers.nodeIdToPID(_sruEngineImpl.getCorpusStructureDB(), hit.transcriptionNodeId, _sruEngineImpl.getHandleResolverURL());
+        resultingFcsResource.setPid(PID);
+        
+        // setting resource fragment (from top to bottom in the xml structure)
+        List<ResourceFragment> resourceFragments = resultingFcsResource.getResourceFragment();
+        ResourceFragment resourceFragment = new ResourceFragment();
+        resourceFragments.add(resourceFragment);
+
+        // setting data-view in resource fragment
+        List<DataViewType> fragmentDataViewTypes = resourceFragment.getDataView();
+        DataViewType fragmentDataView = new DataViewType();
+        fragmentDataViewTypes.add(fragmentDataView);
+        fragmentDataView.setType(dataviewTypeHits);
+        
+        // setting "result"  in data-view
+        Result searchResult = new Result();
+
+        StringBuilder sb = new StringBuilder();
+        // Start building the string representing the KWIC Hit
+
+        Collections.reverse(hit.leftContext); // // next-to-hit was first, leftmost was last! 
+        for (String s : hit.leftContext) {
+            sb.append(s);
+            sb.append(" ");
+        }
+        String leftcontext = sb.toString();
+
+        sb = new StringBuilder();
+        for (String s : hit.rightContext) {
+            sb.append(s);
+            sb.append(" ");
+        }
+        String rightcontext = sb.toString();
+
+        int length = atomicHit.hitLength;
+        int index = atomicHit.hitPositionInAnnotation;
+        List<Serializable> content = searchResult.getContent();
+        content.add(replaceStrangeSymbolsWithLozenge(leftcontext + atomicHit.annotation.substring(0, index)).trim());
+        String hitStr = replaceStrangeSymbolsWithLozenge(atomicHit.annotation.substring(index, index + length).trim());
+        JAXBElement<String> hitJaxbElement = (new ObjectFactory()).createResultHit(hitStr);
+        content.add(hitJaxbElement);
+        content.add(replaceStrangeSymbolsWithLozenge(atomicHit.annotation.substring(index + length) + " " + rightcontext).trim());
+       
+        fragmentDataView.setAny(searchResult);
+        
+        return resultingFcsResource;
+    }
+
+    /**
+     * 
+     * @param hit a {@link SearchHit} object.
+     * @param beginTime a string representing the start time of the video under the hit.
+     * @param duration the duration of the video fragment corresponding to the hit.
+     * @param tierName the name of the annotation tier where the hit takes place.
+     * @return the URI of the landing page based on the input parameters.
+     */
+    private String getLandingPageOfHit(SearchHit hit, String beginTime, String duration, String tierName) {
+        return _sruEngineImpl.getSearchDBUrl() + "?nodeid=" + hit.transcriptionNodeId.replaceAll("#", "%23")
+                + "&time=" + beginTime + "&duration=" + duration + "&tiername=" + tierName;
+    }
+    
+    /**
+     * Constructs a presentation of the DNF of the request, so that e.g on (A OR B) AND (C OR D) it outputs [[A,C], [A, D], [B,C], [B, D]].
+     * @param request a {@link CQLNode} object representing CQL search request.
+     * @return a list of lists of terms, so that the outer list means the disjunction of the the inner lists, where an inner list contains the operands of a conjunction.
+     * @throws NonSupportedQueryException if the CQL input query is not supported.
+     */
+    private List<List<String>> listConjunctions(CQLNode request) throws NonSupportedQueryException{
+        
+        if (request instanceof CQLTermNode) {
+            List<List<String>> result = new ArrayList<List<String>>();
+            ArrayList<String> resultElement = new ArrayList<String>();
+            String searchTerm = ((CQLTermNode) request).getTerm();
+            resultElement.add(searchTerm);
+            result.add(resultElement);
+            return result;
+        }
+        
+        if (request instanceof CQLAndNode) {
+            CQLAndNode requestDowncasted = (CQLAndNode) request;
+            CQLNode leftOperand = requestDowncasted.getLeftOperand();
+            CQLNode rightOperand = requestDowncasted.getRightOperand();
+            List<List<String>> leftRegExps = this.listConjunctions(leftOperand);
+            List<List<String>> rightRegExps = this.listConjunctions(rightOperand);
+            List<List<String>> result = new ArrayList<List<String>>();
+            for (List<String> left : leftRegExps) {
+                for (List<String> right : rightRegExps) {
+                    ArrayList<String> l = new ArrayList<String>(left);
+                    ArrayList<String> r = new ArrayList<String>(right);
+                    //regExpA.append("(").append(left).append(") .* (").append(right).append(")");
+                    l.addAll(r);
+                    result.add(l);
+                }
+            }
+            return result;
+        }
+        
+         if (request instanceof CQLOrNode) {
+            CQLOrNode requestDowncasted = (CQLOrNode) request;
+            CQLNode leftOperand = requestDowncasted.getLeftOperand();
+            CQLNode rightOperand = requestDowncasted.getRightOperand();
+            List<List<String>> result = this.listConjunctions(leftOperand);
+            List<List<String>> rightRegExp = this.listConjunctions(rightOperand);
+            result.addAll(rightRegExp);
+            return result;
+        }
+        
+        throw  (new NonSupportedQueryException());  
+    }
+    
+   
+    /**
+     * 
+     * @param term an atomic search term, a word; e.g. "kind".
+     * @return maps an atomic search term into a Trova reg.exp.
+     */
+    private String termToRegexpr(String term) {
+        StringBuilder regExp = new StringBuilder();
+        regExp.append('\\').append('b').append(term).append('\\').append('b');
+       return regExp.toString();
+    }
+    
+    /**
+     * 
+     * @param listOfConjunctions list of lists of strings, where each inner list represents a set of conjuncts.
+     * @return list of all possible permutations of all the elements of the input; e.g. on [[a,b], [x,y]] it outputs [[a, b], [b,a], [x, y], [y, x]].
+     */
+    private List<List<String>> permuteConjunctions(List<List<String>> listOfConjunctions) {
+       
+       //now we need to permute each conjunction
+        List<List<String>> result = new ArrayList<List<String>>();
+        for (List<String> conjunction : listOfConjunctions) {
+            Collection<List<String>> listOfPermutedConjunctions = Collections2.permutations(conjunction);
+            for (List<String> permutedConjunction: listOfPermutedConjunctions){
+                result.add(permutedConjunction);
+            }
+        }
+        return result;
+    }
+    
+    /**
+     * 
+     * @param terms list of strings, each of them represents an atomic search term.
+     * @return a regular expression representing ordered occurrences of all the terms from the input; e.g. on [x, y, z] it outputs (x).*((y).*(z)) .
+     */
+    private String listToRegExp(List<String> terms){
+       if (terms == null){
+           return null;
+       }
+       if (terms.isEmpty()) {
+           return "";
+       }
+       int length = terms.size();
+       if (length == 1) {
+           return this.termToRegexpr(terms.get(0));
+       }
+       StringBuilder result = new StringBuilder();
+       String firstTerm = this.termToRegexpr(terms.get(0));
+       List<String> tail = terms.subList(1, length);
+       String tailRegExp = this.listToRegExp(tail);
+       result.append("(").append(firstTerm).append(").*(").append(tailRegExp).append(")");
+       return result.toString();
+    }
+    
+    /**
+     * 
+     * @param request a CQL request term.
+     * @return a collection of trova regular expressions equivalent to the input CQL search term,
+     * @throws NonSupportedQueryException 
+     */
+    public List<String> cqlToTrovaRequests(CQLNode request) throws NonSupportedQueryException{
+       List<List<String>> listOfConjucntions = this.listConjunctions(request);
+       List<List<String>> listOfPermutedConjunctions  = this.permuteConjunctions(listOfConjucntions);
+       List<String> result = new ArrayList<String>();
+       for (List<String> permutedConjunction:listOfPermutedConjunctions){
+           result.add(this.listToRegExp(permutedConjunction));
+       }
+       return result;
+    }
+    
+}
Index: /FederatedSearch/mpi-endpoint/src/main/resources/bindingsed.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/resources/bindingsed.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/resources/bindingsed.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    
+      
+    <jxb:bindings schemaLocation="../schemas/Endpoint-Description.xsd" >
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="ed" />
+        </jxb:bindings>
+        <jxb:bindings node="//xs:element[@name='Resource']">
+            <jxb:class name="EndpointDescriptionResource"/>
+        </jxb:bindings>
+    </jxb:bindings>
+        
+</jxb:bindings>
+
Index: /FederatedSearch/mpi-endpoint/src/main/resources/bindingsfcs.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/resources/bindingsfcs.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/resources/bindingsfcs.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    <jxb:bindings schemaLocation="../schemas/Resource.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="fcs" />
+        </jxb:bindings>
+    </jxb:bindings>
+      
+   
+    
+</jxb:bindings>
+
+
+ <!-- node ="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element[@name='Hit']"
+ node="/xs:schema/xs:element" -->
Index: /FederatedSearch/mpi-endpoint/src/main/resources/bindingshits.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/resources/bindingshits.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/resources/bindingshits.xml	(revision 6059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+  
+               
+    <jxb:bindings schemaLocation="../schemas/DataView-Hits.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="hits" />
+        </jxb:bindings>
+        
+    </jxb:bindings>
+        
+   
+    
+</jxb:bindings>
Index: /FederatedSearch/mpi-endpoint/src/main/resources/log4j.properties
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/resources/log4j.properties	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/resources/log4j.properties	(revision 6059)
@@ -0,0 +1,42 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+# Default logging configuration file for logging package
+# log4j
+# File must be present in a root-dir of classpath or its path
+# must be set in System-property log4j.configuration 
+# e.g. 
+# java xxx.class -Dlog4j.configuration=blabla/log4j.properties
+#
+# if this file is missing and no configuration is set within
+# the java source code, no logging will occur
+#
+
+# set level to "info" (all statements are printed), 
+# add appender with name "stdout"
+
+# log4j.rootCategory=INFO, stdout
+# log4j.rootCategory=DEBUG, ROOT
+log4j.rootCategory=info, ROOT
+
+log4j.appender.ROOT.File=${catalina.base}/logs/cqlsearch2.log
+log4j.appender.ROOT=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROOT.layout.ConversionPattern=%d %p [%c#%M:%L] - %m%n
+
+
+# configuration of appender; output sent to console
+# log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+# log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+
+# log4j.appender.stdout.Threshold=INFO
+
+# Pattern to output the caller's file name and line number.
+# e.g.: INFO - (xxx.java:112) - message
+log4j.appender.stdout.layout.ConversionPattern=%5p %t (%F:%L) - %m%n
+
+log4j.logger.nl.mpi.corpusstructure=info
+log4j.logger.nl.mpi.util.DBConnection=info
+# log4j.logger.nl.mpi.annot=debug
+log4j.logger.nl.mpi.annot=info
Index: /FederatedSearch/mpi-endpoint/src/main/schemas/DataView-Hits.xsd
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/schemas/DataView-Hits.xsd	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/schemas/DataView-Hits.xsd	(revision 6059)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+    xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
+    targetNamespace="http://clarin.eu/fcs/dataview/hits" elementFormDefault="qualified">
+
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This schema defines the structure of a
+                <h:em>generic result</h:em> data view. All CLARIN-FCS endpoints
+                MUST support this data view.
+            </h:p>
+            <h:p>
+                The value <h:code>application/x-clarin-fcs-hits+xml</h:code>
+                MUST be used to indicate a <h:em>generic result</h:em> data view.
+            </h:p>
+        </xs:documentation>    
+    </xs:annotation>
+
+    <xs:element name="Result">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A single result line with one or more marked hits.
+                    White-space is considered <h:em>non-signification</h:em>,
+                    except for delimiting tokens.
+                </h:p>
+                <h:p>
+                    CLARIN-FCS client MAY
+                    normalize white-space and strip leading and tailing
+                    white-space and collapse all white-space between
+                    tokens to a single #x20 character.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType mixed="true">
+            <xs:sequence>
+                <xs:element name="Hit" type="xs:string" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A hit highlight. It SHALL not be empty.
+                            </h:p>
+                            <h:p>
+                                One <h:code>Result</h:code> element MUST
+                                one <h:code>Hit</h:code> element, but MAY
+                                contain more than one.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    
+</xs:schema>
Index: /FederatedSearch/mpi-endpoint/src/main/schemas/Endpoint-Description.xsd
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/schemas/Endpoint-Description.xsd	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/schemas/Endpoint-Description.xsd	(revision 6059)
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+    xmlns:ed="http://clarin.eu/fcs/endpoint-description" 
+    xml:lang="en"
+    vc:minVersion="1.0" vc:maxVersion="1.1"
+    elementFormDefault="qualified"
+    targetNamespace="http://clarin.eu/fcs/endpoint-description">
+    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
+               schemaLocation="http://www.w3.org/2001/xml.xsd" />
+
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This schema defines the structure of an extension to SRU/CQL
+                used by CLARIN-FCS.
+                </h:p>
+            <h:p>
+                An Endpoint MUST provide this information in the
+                <h:code>&lt;extraResponseData&gt;</h:code> element of the result
+                to an <h:em>explain</h:em> operation, if (and only if) a
+                CLARIN-FCS client performed the request with the
+                <h:code>x-clarin-fcs-endpoint-description</h:code> extra
+                request parameter with a value of <h:code>true</h:code>.  
+            </h:p>
+        </xs:documentation>    
+    </xs:annotation>
+    
+    <xs:element name="EndpointDescription" type="ed:EndpointDescriptionType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    The root element of the Endpoint description extension for
+                    CLARIN-FCS extension.
+                </h:p>
+                <h:p>
+                    An Endpoint MUST provide this information in the
+                    <h:code>&lt;extraResponseData&gt;</h:code>
+                    element of the result to an 
+                    <h:em>explain</h:em> operation,
+                    if (and only if) a CLARIN-FCS client performed the request
+                    with the 
+                    <h:code>x-clarin-fcs-endpoint-description</h:code>
+                    extra request parameter with a value of 
+                    <h:code>true</h:code>.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation> 
+    </xs:element>
+    
+    <xs:complexType name="EndpointDescriptionType">
+        <xs:sequence>
+            <!-- Capabilities -->
+            <xs:element name="Capabilities">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>A list of Capabilities, that are supported by this Endpoint.</h:p>
+                    </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="Capability" maxOccurs="unbounded">
+                            <xs:annotation>
+                                <xs:documentation>
+                                    A Capability, encoded by an URI, that is supported by this Endpoint.
+                                    For valid URIs, consult the CLARIN-FCS specification.
+                                </xs:documentation>
+                            </xs:annotation>
+                            <xs:simpleType>
+                                <xs:restriction base="xs:anyURI">
+                                    <xs:pattern value="http://clarin.eu/fcs/capability/\w([\.\-]{0,1}\w)*" />
+                                </xs:restriction>
+                            </xs:simpleType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+
+            <!-- SupportedDataViews -->
+            <xs:element name="SupportedDataViews">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p> A list of Data Views, that are supported
+                            by this Endpoint. 
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="SupportedDataView"  maxOccurs="unbounded">
+                            <xs:annotation>
+                                <xs:documentation>
+                                    The MIME type of a supported Data View.
+                                </xs:documentation>
+                            </xs:annotation>
+                            <xs:complexType>
+                                <xs:simpleContent>
+                                    <xs:extension base="ed:mimetypeString">
+                                        <xs:attribute name="id" type="xs:ID" use="required">
+                                            <xs:annotation>
+                                                <xs:documentation>
+                                                    <h:p>
+                                                        An unique ID for this support Data View. This value will be used,
+                                                        when referencing in the &lt;AvailableDataViews&gt; element in
+                                                        the &lt;Resource&gt; description. 
+                                                    </h:p>
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                        </xs:attribute>
+                                        <xs:attribute name="delivery-policy" use="required">
+                                            <xs:annotation>
+                                                <xs:documentation>
+                                                    <h:p>
+                                                        This attribute indicated the 
+                                                        <h:em>delivery policy</h:em> of this supported Data View.
+                                                    </h:p> 
+                                                </xs:documentation>
+                                            </xs:annotation>
+                                            <xs:simpleType>
+                                                <xs:restriction base="xs:string">
+                                                    <xs:enumeration value="send-by-default">
+                                                        <xs:annotation>
+                                                            <xs:documentation>
+                                                                <h:p>
+                                                                    This Data View is automatically sent by the Endpoint for supported Resources.
+                                                                </h:p>
+                                                            </xs:documentation>
+                                                        </xs:annotation>
+                                                    </xs:enumeration>
+                                                    <xs:enumeration value="need-to-request">
+                                                        <xs:annotation>
+                                                            <xs:documentation>
+                                                                <h:p>
+                                                                    This Data View needs to be explicatively requested by the Client.
+                                                                </h:p>
+                                                            </xs:documentation>
+                                                        </xs:annotation>
+                                                    </xs:enumeration>
+                                                </xs:restriction>
+                                            </xs:simpleType>
+                                        </xs:attribute>
+                                    </xs:extension>
+                                </xs:simpleContent>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+                
+            <!-- Resources -->
+            <xs:element ref="ed:Resources">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            A list of top-level resources, that are available
+                            at an Endpoint. An Endpoint MUST
+                            declare at least one top-level resource.
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+
+            <!-- extension point -->
+            <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            Extension point to allow Endpoints to embed custom data in the Endpoint Description.
+                            CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:any>
+        </xs:sequence>
+        <xs:attribute name="version" type="xs:nonNegativeInteger" use="required">
+            <xs:annotation>
+                <xs:documentation>
+                    <h:p>
+                        Version used for Endpoint Description. Endpoints MUST use the value "1".
+                    </h:p>
+                </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+
+    <xs:element name="Resources">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A list of resources, that are available
+                    at an Endpoint. An Endpoint MUST
+                    declare at least one resource.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="ed:Resource" maxOccurs="unbounded"/>
+            </xs:sequence>                            
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="Resource">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    Detailed description of a resource that is available at an
+                    Endpoint. A resource is a searchable
+                    entity at an Endpoint, e.g. a single corpus.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="Title" type="ed:i18nString" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A human readable title for the resource. An English version is
+                                mandatory.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="Description" type="ed:i18nString" minOccurs="0" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                An optional human-readable description of the resource. Is should
+                                be at most one sentence. If supplied, an English version is
+                                mandatory.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="LandingPageURI" type="xs:anyURI" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                A link to a website for the resource, e.g. a landing page for a corpus. 
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                
+                <xs:element name="Languages">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                The (relevant) languages available <h:em>within</h:em> the resource.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="Language" maxOccurs="unbounded">
+                                <xs:annotation>
+                                    <xs:documentation>
+                                        <p>
+                                            A ISO 639-3 three letter language code. This
+                                            element should be repeated for all languages
+                                            (relevant) available <h:em>within</h:em> the resource.
+                                        </p>
+                                    </xs:documentation>
+                                </xs:annotation>
+                                <xs:simpleType>
+                                    <xs:restriction base="xs:string">
+                                        <xs:pattern value="[a-zA-Z]{3}"/>
+                                    </xs:restriction>
+                                </xs:simpleType>
+                            </xs:element>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+                
+                <xs:element name="AvailableDataViews">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                This element contains a reference to all Data Views that are
+                                supported by this resource in the <h:code>@ref</h:code> attribute.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="ref" type="xs:IDREFS" use="required" />
+                    </xs:complexType>
+                </xs:element>
+
+                <xs:element ref="ed:Resources" minOccurs="0">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                If a resource has searchable sub-resources
+                                the Endpoint MUST supply additional finer grained
+                                &lt;Resource&gt; elements. A sub-resource is a
+                                searchable entity within a resource, e.g. a sub-corpus.
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+
+                <!-- extension point -->
+                <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded">
+                    <xs:annotation>
+                        <xs:documentation>
+                            <h:p>
+                                Extension point to allow Endpoints to embed custom data in the Endpoint Description
+                                for a specific resource. CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                            </h:p>
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:any>
+            </xs:sequence>
+            <xs:attribute name="pid" type="xs:anyURI" use="required">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            The persistent identifier of this resource. This
+                            value MUST be the same as the <h:code>MdSelfLink</h:code>
+                            of the CMDI record describing the collection.
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:attribute>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:simpleType name="mimetypeString">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:complexType name="i18nString">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="xml:lang" use="required" />
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+</xs:schema>
Index: /FederatedSearch/mpi-endpoint/src/main/schemas/Resource.xsd
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/schemas/Resource.xsd	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/schemas/Resource.xsd	(revision 6059)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
+    xmlns:h="http://www.w3.org/1999/xhtml"
+    xmlns:fcs="http://clarin.eu/fcs/resource"
+    xml:lang="en" vc:minVersion="1.0" vc:maxVersion="1.1"
+    targetNamespace="http://clarin.eu/fcs/resource" elementFormDefault="qualified">
+
+   
+    <xs:annotation>
+        <xs:documentation>
+            <h:p>
+                This XML schema defines the inner structure of a hit within the
+                search result in the CLARIN federated content search (CLARIN-FCS).
+            </h:p>
+            <h:p>
+                Every hit in the result set must be represented as one
+                <h:code>&lt;sru:record&gt;</h:code> element in the
+                <h:code>&lt;sru:searchRetrieveResponse;gt;</h:code> response
+                document.
+            </h:p>
+            <h:p>
+                This schema allows Endpoint to return:
+            </h:p>
+            <h:ul>
+                <h:li>metadata about the matched record, including
+                    reference to a CMDI record</h:li>
+                <h:li>separate (metadata) description of full
+                    Resource and ResourceFragment (matching part of the
+                    resource, i.e. an addressable sentence)</h:li>
+                <h:li>various views on the data delivered (HITS, text-snippet,
+                    image, individual annotation-layers, ...)</h:li>
+                <h:li>providing links (either as PID or as
+                    simple URLs) to any of: Resource, ResourceFragment,
+                    Metadata (CMDI record), Data Views</h:li>
+                <h:li>Endpoint specific extensions through an
+                    extension mechanism</h:li>
+            </h:ul>
+         </xs:documentation>
+    </xs:annotation>
+
+    <xs:element name="Resource" type="fcs:ResourceType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A one hit in a resource in one or more representations.
+                </h:p> 
+            </xs:documentation>
+        </xs:annotation>
+    </xs:element>
+
+    <xs:complexType name="ResourceType">
+        <xs:sequence>
+            <xs:element name="DataView" type="fcs:DataViewType" minOccurs="0" maxOccurs="unbounded" />
+            <xs:element name="ResourceFragment" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            A one hit in a resource in one or more representations.
+                            Use this instead of a plain <h:code>&lt;Resource&gt;</h:code>, if the
+                            fragment can be addresses directly, e.g. a sentence in
+                            a corpus that can be addressed via a PID (with fragment)
+                            or a regular URI.
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="DataView" type="fcs:DataViewType"/>
+                    </xs:sequence>
+                    <xs:attribute name="pid" type="fcs:PidType"/>
+                    <xs:attribute name="ref" type="fcs:ReferenceType"/>
+                </xs:complexType>
+            </xs:element>
+            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>
+                        <h:p>
+                            Extension point to allow Endpoints to add custom data to a resource.
+                            CLARIN-FCS clients SHOULD ignore any data they do not understand.  
+                        </h:p>
+                        <h:p>
+                            This extension mechanism can for example be used to provide hints
+                            to an (XSLT/XQuery) application that works directly on CLARIN-FCS,
+                            e.g. to allow it to generate back and forward links to
+                            navigate in the result set. 
+                        </h:p>
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:any>
+        </xs:sequence>
+        <xs:attribute name="pid" type="fcs:PidType"/>
+        <xs:attribute name="ref" type="fcs:ReferenceType"/>
+    </xs:complexType>
+
+    <xs:complexType name="DataViewType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A representation of a hit, e.g. a HITS, a Geolocation,
+                    an image, etc.
+                </h:p>
+                <h:p>
+                    A HITS Data View is mandatory for every hit in the result set.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:any namespace="##other" processContents="strict"/>
+        </xs:sequence>
+        <!-- <xs:element name="Result" type=" " minOccurs="1" maxOccurs="1"/>-->
+        <xs:attribute name="type" use="required">
+            <xs:annotation>
+                <xs:documentation>
+                    <h:p>
+                        The type of the content of the Data View as a MIME type.
+                    </h:p>
+                    <h:p>
+                        For the mandatory HITS Data View, use the MIME type
+                        <h:code>application/x-clarin-fcs-hits+xml</h:code>.
+                    </h:p>
+                </xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:string">
+                    <xs:pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+        <xs:attribute name="pid" type="fcs:PidType"/>
+        <xs:attribute name="ref" type="fcs:ReferenceType"/>
+    </xs:complexType>
+
+    <xs:simpleType name="PidType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A persistent identifier of given entity. This attribute
+                    should be used, if a PID is available for the given entity.
+                </h:p>
+                <h:p>
+                    An Endpoint SHOULD also make the PID available tough the
+                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element of
+                    the <h:code>&lt;sru:record&gt;/</h:code> element.
+                    If more PIDs are available for one record (i.e. Resource,
+                    Metadata, the individual Data View), the Endpoint is MUST
+                    to put the "most important" (e.g. the primary) PID into the
+                    <h:code>&lt;sru:recordIdentifier&gt;</h:code> element.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:anyURI"/>
+    </xs:simpleType>
+
+    <xs:simpleType name="ReferenceType">
+        <xs:annotation>
+            <xs:documentation>
+                <h:p>
+                    A regular URI for the given entity, that can be retrieved
+                    directly (via HTTP or HTTPS). 
+                </h:p>
+                <h:p>
+                    This URI may include custom Endpoint specific query strings
+                    to implement features like hit highlighting.
+                </h:p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:anyURI"/>
+    </xs:simpleType>
+</xs:schema>
Index: /FederatedSearch/mpi-endpoint/src/main/schemas/edInstanceOk.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/schemas/edInstanceOk.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/schemas/edInstanceOk.xml	(revision 6059)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ed:EndpointDescription xmlns:ed="http://clarin.eu/fcs/endpoint-description" xmlns:hits="http://clarin.eu/fcs/dataview/hits" xmlns:fcs="http://clarin.eu/fcs/resource" version="1"><ed:Capabilities><ed:Capability>http://clarin.eu/fcs/capability/basic-search</ed:Capability></ed:Capabilities><ed:SupportedDataViews><ed:SupportedDataView id="hits" delivery-policy="send-by-default">application/x-clarin-fcs-kwic+xml</ed:SupportedDataView></ed:SupportedDataViews><ed:Resources><ed:Resource pid="hdl:LUX16/00-0000-0000-0006-FABD-E@format=cmdi"><ed:Title xml:lang="eng">Corpus Spoken Dutch</ed:Title><ed:Title xml:lang="nld">Corpus Gesproken Nederlands</ed:Title><ed:Description xml:lang="nld">een databank voor het hedendaags Nederlands zoals dat door volwassen sprekers in Nederland en Vlaanderen wordt gesproken</ed:Description><ed:Description xml:lang="eng">a corpus of contemporary Dutch as spoken by adults in Flanders and the Netherlands</ed:Description><ed:LandingPageURI>https://lux16.mpi.nl/ds/imdi_browser/?openpath=MPI457405%23</ed:LandingPageURI><ed:Languages><ed:Language>nld</ed:Language></ed:Languages><ed:AvailableDataViews ref="hits"></ed:AvailableDataViews></ed:Resource><ed:Resource pid="hdl:LUX16/00-0000-0000-0006-FABE-B@format=cmdi"><ed:Title xml:lang="eng">The European Science Foundation Second Language Database</ed:Title><ed:Description xml:lang="eng">The European Science Foundation Second Language Acquisition by Adult Immigrants collected spontaneous second language acquisition data of forty adult immigrant workers living in Western Europe. The program ran over 5 Âœ years and was preceded by a one-year pilot study. It had been planned as a longitudinal comparative study in five European countries: France, (Federal Republic of) Germany, Great Britain, The Netherlands, and Sweden. Financial support came from the Max-Planck-Gesellschaft (Germany) and the research councils of France (CNRS), The Netherlands (NWO), Switzerland (FNS), and Norway (NAVS).</ed:Description><ed:LandingPageURI>https://lux16.mpi.nl/ds/imdi_browser/?openpath=MPI457406%23</ed:LandingPageURI><ed:Languages><ed:Language>eng</ed:Language><ed:Language>deu</ed:Language><ed:Language>fra</ed:Language><ed:Language>nld</ed:Language><ed:Language>swe</ed:Language><ed:Language>ara</ed:Language><ed:Language>tur</ed:Language><ed:Language>ita</ed:Language><ed:Language>pan</ed:Language><ed:Language>spa</ed:Language><ed:Language>fin</ed:Language></ed:Languages><ed:AvailableDataViews ref="hits"></ed:AvailableDataViews></ed:Resource></ed:Resources></ed:EndpointDescription>
Index: /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/MANIFEST.MF	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/MANIFEST.MF	(revision 6059)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
Index: /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/context.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/context.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/webapp/META-INF/context.xml	(revision 6059)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/cqlsearch2">
+</Context>
Index: /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/sru-server-config.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/sru-server-config.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/sru-server-config.xml	(revision 6059)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<endpoint-config xmlns="http://www.clarin.eu/sru-server/1.0/">
+    <databaseInfo>
+        <title xml:lang="en" primary="true">MPI CQLServlet</title>
+        <description xml:lang="en" primary="true">MPI CQLServlet</description>
+        <author xml:lang="en">Max Planck for Psycholinguistics</author>
+    </databaseInfo>
+
+    <indexInfo>
+        <set name="fcs" identifier="http://clarin.eu/fcs/resource">
+            <title xml:lang="de">CLARIN Content Search</title>
+            <title xml:lang="en" primary="true">CLARIN Content Search</title>
+        </set>
+        <index search="true" scan="false" sort="false">
+            <title xml:lang="en" primary="true">Full text</title>
+            <map primary="true">
+                <name set="fcs">full text</name>
+            </map>
+        </index>
+    </indexInfo>
+
+    <schemaInfo>
+        <schema identifier="http://clarin.eu/fcs/resource" name="fcs"
+                sort="false" retrieve="true">
+            <title xml:lang="en" primary="true">CLARIN Content Search</title>
+        </schema>
+    </schemaInfo>
+
+</endpoint-config>
Index: /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/web.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/src/main/webapp/WEB-INF/web.xml	(revision 6059)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="COSMAS_SRU_SERVER" version="2.5">
+    <display-name>SRU/CQL Service</display-name>
+
+    <servlet>
+        <display-name>SRU/CQL Service (HTTP Interface)</display-name>
+        <servlet-name>CQLServlet</servlet-name> 
+        <servlet-class>eu.clarin.sru.server.utils.SRUServerServlet</servlet-class>
+        <init-param>
+            <param-name>eu.clarin.sru.server.utils.sruServerSearchEngineClass</param-name>
+            <param-value>nl.mpi.annot.search.cqlsearch2.SRUSearchEngineImpl</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>CQLServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+    
+     
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.imdiNamespaceURL</param-name>
+        <param-value>http://www.mpi.nl/IMDI/Schema/IMDI</param-value>
+    </context-param> 
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.imdiLanguageMapURL</param-name>
+        <param-value>http://www.mpi.nl/IMDI/Schema/LanguageCodeMap.xml</param-value>
+    </context-param> 
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.handleResolverURL</param-name>
+        <param-value>http://hdl.handle.net</param-value>
+    </context-param>
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.schemaLocationEndpointDescription</param-name>
+        <param-value>http://clarin.eu/fcs/endpoint-description https://trac.clarin.eu/browser/FederatedSearch/schema/Endpoint-Description.xsd</param-value>
+    </context-param>
+    
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.schemaLocationResource</param-name>
+        <param-value>http://clarin.eu/fcs/resource https://trac.clarin.eu/browser/FederatedSearch/schema/Resource.xsd</param-value>
+    </context-param>
+ 
+    <filter>
+        <filter-name>charsetFilter</filter-name>
+        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+        <init-param>
+            <param-name>encoding</param-name>
+            <param-value>UTF-8</param-value>
+        </init-param>
+    </filter>
+    
+    <filter-mapping>
+        <filter-name>charsetFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+</web-app>
Index: /FederatedSearch/mpi-endpoint/target/classes/META-INF/sun-jaxb.episode
===================================================================
--- /FederatedSearch/mpi-endpoint/target/classes/META-INF/sun-jaxb.episode	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/classes/META-INF/sun-jaxb.episode	(revision 6059)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
+  <!--
+
+This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+Any modifications to this file will be lost upon recompilation of the source schema. 
+Generated on: 2015.02.25 at 04:46:45 PM CET 
+
+  -->
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/resource">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="~tns:ResourceType">
+      <class ref="de.clarin.fcs.schema.ResourceType"/>
+    </bindings>
+    <bindings scd="~tns:DataViewType">
+      <class ref="de.clarin.fcs.schema.DataViewType"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/endpoint-description">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Resource">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionResource"/>
+    </bindings>
+    <bindings scd="~tns:EndpointDescriptionType">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionType"/>
+    </bindings>
+    <bindings scd="tns:Resources">
+      <class ref="de.clarin.fcs.schema.Resources"/>
+    </bindings>
+    <bindings scd="~tns:i18nString">
+      <class ref="de.clarin.fcs.schema.I18NString"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/dataview/hits">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Result">
+      <class ref="de.clarin.fcs.schema.Result"/>
+    </bindings>
+  </bindings>
+</bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/classes/bindingsed.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/classes/bindingsed.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/classes/bindingsed.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    
+      
+    <jxb:bindings schemaLocation="../schemas/Endpoint-Description.xsd" >
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="ed" />
+        </jxb:bindings>
+        <jxb:bindings node="//xs:element[@name='Resource']">
+            <jxb:class name="EndpointDescriptionResource"/>
+        </jxb:bindings>
+    </jxb:bindings>
+        
+</jxb:bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/classes/bindingsfcs.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/classes/bindingsfcs.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/classes/bindingsfcs.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    <jxb:bindings schemaLocation="../schemas/Resource.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="fcs" />
+        </jxb:bindings>
+    </jxb:bindings>
+      
+   
+    
+</jxb:bindings>
+
+
+ <!-- node ="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element[@name='Hit']"
+ node="/xs:schema/xs:element" -->
Index: /FederatedSearch/mpi-endpoint/target/classes/bindingshits.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/classes/bindingshits.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/classes/bindingshits.xml	(revision 6059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+  
+               
+    <jxb:bindings schemaLocation="../schemas/DataView-Hits.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="hits" />
+        </jxb:bindings>
+        
+    </jxb:bindings>
+        
+   
+    
+</jxb:bindings>
Index: /FederatedSearch/mpi-endpoint/target/classes/log4j.properties
===================================================================
--- /FederatedSearch/mpi-endpoint/target/classes/log4j.properties	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/classes/log4j.properties	(revision 6059)
@@ -0,0 +1,42 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+# Default logging configuration file for logging package
+# log4j
+# File must be present in a root-dir of classpath or its path
+# must be set in System-property log4j.configuration 
+# e.g. 
+# java xxx.class -Dlog4j.configuration=blabla/log4j.properties
+#
+# if this file is missing and no configuration is set within
+# the java source code, no logging will occur
+#
+
+# set level to "info" (all statements are printed), 
+# add appender with name "stdout"
+
+# log4j.rootCategory=INFO, stdout
+# log4j.rootCategory=DEBUG, ROOT
+log4j.rootCategory=info, ROOT
+
+log4j.appender.ROOT.File=${catalina.base}/logs/cqlsearch2.log
+log4j.appender.ROOT=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROOT.layout.ConversionPattern=%d %p [%c#%M:%L] - %m%n
+
+
+# configuration of appender; output sent to console
+# log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+# log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+
+# log4j.appender.stdout.Threshold=INFO
+
+# Pattern to output the caller's file name and line number.
+# e.g.: INFO - (xxx.java:112) - message
+log4j.appender.stdout.layout.ConversionPattern=%5p %t (%F:%L) - %m%n
+
+log4j.logger.nl.mpi.corpusstructure=info
+log4j.logger.nl.mpi.util.DBConnection=info
+# log4j.logger.nl.mpi.annot=debug
+log4j.logger.nl.mpi.annot=info
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsed.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsed.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsed.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    
+      
+    <jxb:bindings schemaLocation="../schemas/Endpoint-Description.xsd" >
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="ed" />
+        </jxb:bindings>
+        <jxb:bindings node="//xs:element[@name='Resource']">
+            <jxb:class name="EndpointDescriptionResource"/>
+        </jxb:bindings>
+    </jxb:bindings>
+        
+</jxb:bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsfcs.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsfcs.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingsfcs.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    <jxb:bindings schemaLocation="../schemas/Resource.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="fcs" />
+        </jxb:bindings>
+    </jxb:bindings>
+      
+   
+    
+</jxb:bindings>
+
+
+ <!-- node ="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element[@name='Hit']"
+ node="/xs:schema/xs:element" -->
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingshits.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingshits.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/bindingshits.xml	(revision 6059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+  
+               
+    <jxb:bindings schemaLocation="../schemas/DataView-Hits.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="hits" />
+        </jxb:bindings>
+        
+    </jxb:bindings>
+        
+   
+    
+</jxb:bindings>
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/log4j.properties
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/log4j.properties	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4.42671/log4j.properties	(revision 6059)
@@ -0,0 +1,42 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+# Default logging configuration file for logging package
+# log4j
+# File must be present in a root-dir of classpath or its path
+# must be set in System-property log4j.configuration 
+# e.g. 
+# java xxx.class -Dlog4j.configuration=blabla/log4j.properties
+#
+# if this file is missing and no configuration is set within
+# the java source code, no logging will occur
+#
+
+# set level to "info" (all statements are printed), 
+# add appender with name "stdout"
+
+# log4j.rootCategory=INFO, stdout
+# log4j.rootCategory=DEBUG, ROOT
+log4j.rootCategory=info, ROOT
+
+log4j.appender.ROOT.File=${catalina.base}/logs/cqlsearch2.log
+log4j.appender.ROOT=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROOT.layout.ConversionPattern=%d %p [%c#%M:%L] - %m%n
+
+
+# configuration of appender; output sent to console
+# log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+# log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+
+# log4j.appender.stdout.Threshold=INFO
+
+# Pattern to output the caller's file name and line number.
+# e.g.: INFO - (xxx.java:112) - message
+log4j.appender.stdout.layout.ConversionPattern=%5p %t (%F:%L) - %m%n
+
+log4j.logger.nl.mpi.corpusstructure=info
+log4j.logger.nl.mpi.util.DBConnection=info
+# log4j.logger.nl.mpi.annot=debug
+log4j.logger.nl.mpi.annot=info
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/MANIFEST.MF
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/MANIFEST.MF	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/MANIFEST.MF	(revision 6059)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/context.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/context.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/META-INF/context.xml	(revision 6059)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/cqlsearch2">
+</Context>
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/Tomcat.dpf
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/Tomcat.dpf	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/Tomcat.dpf	(revision 6059)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context antiJARLocking="true" path="/cqlsearch2">
+</Context>
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/META-INF/sun-jaxb.episode
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/META-INF/sun-jaxb.episode	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/META-INF/sun-jaxb.episode	(revision 6059)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
+  <!--
+
+This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+Any modifications to this file will be lost upon recompilation of the source schema. 
+Generated on: 2015.02.25 at 04:46:45 PM CET 
+
+  -->
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/resource">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="~tns:ResourceType">
+      <class ref="de.clarin.fcs.schema.ResourceType"/>
+    </bindings>
+    <bindings scd="~tns:DataViewType">
+      <class ref="de.clarin.fcs.schema.DataViewType"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/endpoint-description">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Resource">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionResource"/>
+    </bindings>
+    <bindings scd="~tns:EndpointDescriptionType">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionType"/>
+    </bindings>
+    <bindings scd="tns:Resources">
+      <class ref="de.clarin.fcs.schema.Resources"/>
+    </bindings>
+    <bindings scd="~tns:i18nString">
+      <class ref="de.clarin.fcs.schema.I18NString"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/dataview/hits">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Result">
+      <class ref="de.clarin.fcs.schema.Result"/>
+    </bindings>
+  </bindings>
+</bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsed.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsed.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsed.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    
+      
+    <jxb:bindings schemaLocation="../schemas/Endpoint-Description.xsd" >
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="ed" />
+        </jxb:bindings>
+        <jxb:bindings node="//xs:element[@name='Resource']">
+            <jxb:class name="EndpointDescriptionResource"/>
+        </jxb:bindings>
+    </jxb:bindings>
+        
+</jxb:bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsfcs.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsfcs.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingsfcs.xml	(revision 6059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+    <jxb:bindings schemaLocation="../schemas/Resource.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="fcs" />
+        </jxb:bindings>
+    </jxb:bindings>
+      
+   
+    
+</jxb:bindings>
+
+
+ <!-- node ="/xs:schema/xs:element/xs:complexType/xs:sequence/xs:element[@name='Hit']"
+ node="/xs:schema/xs:element" -->
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingshits.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingshits.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/bindingshits.xml	(revision 6059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jxb:bindings version="1.0"
+              xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+              xmlns:xs="http://www.w3.org/2001/XMLSchema"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd">
+
+  
+               
+    <jxb:bindings schemaLocation="../schemas/DataView-Hits.xsd">
+        <jxb:schemaBindings>
+            <jxb:package name="de.clarin.fcs.schema" />
+        </jxb:schemaBindings>
+        <jxb:bindings>
+            <namespace:prefix name="hits" />
+        </jxb:bindings>
+        
+    </jxb:bindings>
+        
+   
+    
+</jxb:bindings>
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/log4j.properties
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/log4j.properties	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/classes/log4j.properties	(revision 6059)
@@ -0,0 +1,42 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+# Default logging configuration file for logging package
+# log4j
+# File must be present in a root-dir of classpath or its path
+# must be set in System-property log4j.configuration 
+# e.g. 
+# java xxx.class -Dlog4j.configuration=blabla/log4j.properties
+#
+# if this file is missing and no configuration is set within
+# the java source code, no logging will occur
+#
+
+# set level to "info" (all statements are printed), 
+# add appender with name "stdout"
+
+# log4j.rootCategory=INFO, stdout
+# log4j.rootCategory=DEBUG, ROOT
+log4j.rootCategory=info, ROOT
+
+log4j.appender.ROOT.File=${catalina.base}/logs/cqlsearch2.log
+log4j.appender.ROOT=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout
+log4j.appender.ROOT.layout.ConversionPattern=%d %p [%c#%M:%L] - %m%n
+
+
+# configuration of appender; output sent to console
+# log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+# log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+
+# log4j.appender.stdout.Threshold=INFO
+
+# Pattern to output the caller's file name and line number.
+# e.g.: INFO - (xxx.java:112) - message
+log4j.appender.stdout.layout.ConversionPattern=%5p %t (%F:%L) - %m%n
+
+log4j.logger.nl.mpi.corpusstructure=info
+log4j.logger.nl.mpi.util.DBConnection=info
+# log4j.logger.nl.mpi.annot=debug
+log4j.logger.nl.mpi.annot=info
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/sru-server-config.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/sru-server-config.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/sru-server-config.xml	(revision 6059)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<endpoint-config xmlns="http://www.clarin.eu/sru-server/1.0/">
+    <databaseInfo>
+        <title xml:lang="en" primary="true">MPI CQLServlet</title>
+        <description xml:lang="en" primary="true">MPI CQLServlet</description>
+        <author xml:lang="en">Max Planck for Psycholinguistics</author>
+    </databaseInfo>
+
+    <indexInfo>
+        <set name="fcs" identifier="http://clarin.eu/fcs/resource">
+            <title xml:lang="de">CLARIN Content Search</title>
+            <title xml:lang="en" primary="true">CLARIN Content Search</title>
+        </set>
+        <index search="true" scan="false" sort="false">
+            <title xml:lang="en" primary="true">Full text</title>
+            <map primary="true">
+                <name set="fcs">full text</name>
+            </map>
+        </index>
+    </indexInfo>
+
+    <schemaInfo>
+        <schema identifier="http://clarin.eu/fcs/resource" name="fcs"
+                sort="false" retrieve="true">
+            <title xml:lang="en" primary="true">CLARIN Content Search</title>
+        </schema>
+    </schemaInfo>
+
+</endpoint-config>
Index: /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/web.xml
===================================================================
--- /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/web.xml	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/cqlsearch2-4.4/WEB-INF/web.xml	(revision 6059)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="COSMAS_SRU_SERVER" version="2.5">
+    <display-name>SRU/CQL Service</display-name>
+
+    <servlet>
+        <display-name>SRU/CQL Service (HTTP Interface)</display-name>
+        <servlet-name>CQLServlet</servlet-name> 
+        <servlet-class>eu.clarin.sru.server.utils.SRUServerServlet</servlet-class>
+        <init-param>
+            <param-name>eu.clarin.sru.server.utils.sruServerSearchEngineClass</param-name>
+            <param-value>nl.mpi.annot.search.cqlsearch2.SRUSearchEngineImpl</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>CQLServlet</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+    
+     
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.imdiNamespaceURL</param-name>
+        <param-value>http://www.mpi.nl/IMDI/Schema/IMDI</param-value>
+    </context-param> 
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.imdiLanguageMapURL</param-name>
+        <param-value>http://www.mpi.nl/IMDI/Schema/LanguageCodeMap.xml</param-value>
+    </context-param> 
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.handleResolverURL</param-name>
+        <param-value>http://hdl.handle.net</param-value>
+    </context-param>
+  
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.schemaLocationEndpointDescription</param-name>
+        <param-value>http://clarin.eu/fcs/endpoint-description https://trac.clarin.eu/browser/FederatedSearch/schema/Endpoint-Description.xsd</param-value>
+    </context-param>
+    
+    <context-param> 
+        <param-name>nl.mpi.cqlsearch2.schemaLocationResource</param-name>
+        <param-value>http://clarin.eu/fcs/resource https://trac.clarin.eu/browser/FederatedSearch/schema/Resource.xsd</param-value>
+    </context-param>
+ 
+    <filter>
+        <filter-name>charsetFilter</filter-name>
+        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
+        <init-param>
+            <param-name>encoding</param-name>
+            <param-value>UTF-8</param-value>
+        </init-param>
+    </filter>
+    
+    <filter-mapping>
+        <filter-name>charsetFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+</web-app>
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/META-INF/sun-jaxb.episode
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/META-INF/sun-jaxb.episode	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/META-INF/sun-jaxb.episode	(revision 6059)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
+  <!--
+
+This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+Any modifications to this file will be lost upon recompilation of the source schema. 
+Generated on: 2015.02.25 at 04:46:45 PM CET 
+
+  -->
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/resource">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="~tns:ResourceType">
+      <class ref="de.clarin.fcs.schema.ResourceType"/>
+    </bindings>
+    <bindings scd="~tns:DataViewType">
+      <class ref="de.clarin.fcs.schema.DataViewType"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/endpoint-description">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Resource">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionResource"/>
+    </bindings>
+    <bindings scd="~tns:EndpointDescriptionType">
+      <class ref="de.clarin.fcs.schema.EndpointDescriptionType"/>
+    </bindings>
+    <bindings scd="tns:Resources">
+      <class ref="de.clarin.fcs.schema.Resources"/>
+    </bindings>
+    <bindings scd="~tns:i18nString">
+      <class ref="de.clarin.fcs.schema.I18NString"/>
+    </bindings>
+  </bindings>
+  <bindings scd="x-schema::tns" xmlns:tns="http://clarin.eu/fcs/dataview/hits">
+    <schemaBindings map="false">
+      <package name="de.clarin.fcs.schema"/>
+    </schemaBindings>
+    <bindings scd="tns:Result">
+      <class ref="de.clarin.fcs.schema.Result"/>
+    </bindings>
+  </bindings>
+</bindings>
+
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/DataViewType.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/DataViewType.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/DataViewType.java	(revision 6059)
@@ -0,0 +1,172 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ * <pre>
+ * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;h:p xmlns:h="http://www.w3.org/1999/xhtml" xmlns:fcs="http://clarin.eu/fcs/resource" xmlns:p528773_="http://java.sun.com/xml/ns/jaxb" xmlns:p590412_="http://jaxb2-commons.dev.java.net/namespace-prefix" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
+ *                     A representation of a hit, e.g. a HITS, a Geolocation,
+ *                     an image, etc.
+ *                 &lt;/h:p&gt;
+ * </pre>
+ * 
+ * <pre>
+ * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;h:p xmlns:h="http://www.w3.org/1999/xhtml" xmlns:fcs="http://clarin.eu/fcs/resource" xmlns:p528773_="http://java.sun.com/xml/ns/jaxb" xmlns:p590412_="http://jaxb2-commons.dev.java.net/namespace-prefix" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
+ *                     A HITS Data View is mandatory for every hit in the result set.
+ *                 &lt;/h:p&gt;
+ * </pre>
+ * 
+ * 
+ * <p>Java class for DataViewType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="DataViewType"&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;any namespace='##other'/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name="type" use="required"&gt;
+ *         &lt;simpleType&gt;
+ *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+ *             &lt;pattern value="\w+/\w([\.\-]{0,1}\w)*(\+\w+){0,1}"/&gt;
+ *           &lt;/restriction&gt;
+ *         &lt;/simpleType&gt;
+ *       &lt;/attribute&gt;
+ *       &lt;attribute name="pid" type="{http://clarin.eu/fcs/resource}PidType" /&gt;
+ *       &lt;attribute name="ref" type="{http://clarin.eu/fcs/resource}ReferenceType" /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataViewType", namespace = "http://clarin.eu/fcs/resource", propOrder = {
+    "any"
+})
+public class DataViewType {
+
+    @XmlAnyElement(lax = true)
+    protected Object any;
+    @XmlAttribute(name = "type", required = true)
+    protected String type;
+    @XmlAttribute(name = "pid")
+    protected String pid;
+    @XmlAttribute(name = "ref")
+    protected String ref;
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getAny() {
+        return any;
+    }
+
+    /**
+     * Sets the value of the any property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setAny(Object value) {
+        this.any = value;
+    }
+
+    /**
+     * Gets the value of the type property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets the value of the type property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setType(String value) {
+        this.type = value;
+    }
+
+    /**
+     * Gets the value of the pid property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * Sets the value of the pid property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPid(String value) {
+        this.pid = value;
+    }
+
+    /**
+     * Gets the value of the ref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRef() {
+        return ref;
+    }
+
+    /**
+     * Sets the value of the ref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRef(String value) {
+        this.ref = value;
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionResource.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionResource.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionResource.java	(revision 6059)
@@ -0,0 +1,459 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlIDREF;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * 
+ * <pre>
+ * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;h:p xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ed="http://clarin.eu/fcs/endpoint-description" xmlns:p430405_="http://jaxb2-commons.dev.java.net/namespace-prefix" xmlns:p680092_="http://java.sun.com/xml/ns/jaxb" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
+ *                     Detailed description of a resource that is available at an
+ *                     Endpoint. A resource is a searchable
+ *                     entity at an Endpoint, e.g. a single corpus.
+ *                 &lt;/h:p&gt;
+ * </pre>
+ * 
+ * 
+ * <p>Java class for Resource element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="Resource"&gt;
+ *   &lt;complexType&gt;
+ *     &lt;complexContent&gt;
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *         &lt;sequence&gt;
+ *           &lt;element name="Title" type="{http://clarin.eu/fcs/endpoint-description}i18nString" maxOccurs="unbounded"/&gt;
+ *           &lt;element name="Description" type="{http://clarin.eu/fcs/endpoint-description}i18nString" maxOccurs="unbounded" minOccurs="0"/&gt;
+ *           &lt;element name="LandingPageURI" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/&gt;
+ *           &lt;element name="Languages"&gt;
+ *             &lt;complexType&gt;
+ *               &lt;complexContent&gt;
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *                   &lt;sequence&gt;
+ *                     &lt;element name="Language" maxOccurs="unbounded"&gt;
+ *                       &lt;simpleType&gt;
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+ *                           &lt;pattern value="[a-zA-Z]{3}"/&gt;
+ *                         &lt;/restriction&gt;
+ *                       &lt;/simpleType&gt;
+ *                     &lt;/element&gt;
+ *                   &lt;/sequence&gt;
+ *                 &lt;/restriction&gt;
+ *               &lt;/complexContent&gt;
+ *             &lt;/complexType&gt;
+ *           &lt;/element&gt;
+ *           &lt;element name="AvailableDataViews"&gt;
+ *             &lt;complexType&gt;
+ *               &lt;complexContent&gt;
+ *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *                   &lt;attribute name="ref" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREFS" /&gt;
+ *                 &lt;/restriction&gt;
+ *               &lt;/complexContent&gt;
+ *             &lt;/complexType&gt;
+ *           &lt;/element&gt;
+ *           &lt;element ref="{http://clarin.eu/fcs/endpoint-description}Resources" minOccurs="0"/&gt;
+ *           &lt;any processContents='skip' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
+ *         &lt;/sequence&gt;
+ *         &lt;attribute name="pid" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" /&gt;
+ *       &lt;/restriction&gt;
+ *     &lt;/complexContent&gt;
+ *   &lt;/complexType&gt;
+ * &lt;/element&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "title",
+    "description",
+    "landingPageURI",
+    "languages",
+    "availableDataViews",
+    "resources",
+    "any"
+})
+@XmlRootElement(name = "Resource")
+public class EndpointDescriptionResource {
+
+    @XmlElement(name = "Title", required = true)
+    protected List<I18NString> title;
+    @XmlElement(name = "Description")
+    protected List<I18NString> description;
+    @XmlElement(name = "LandingPageURI")
+    @XmlSchemaType(name = "anyURI")
+    protected String landingPageURI;
+    @XmlElement(name = "Languages", required = true)
+    protected EndpointDescriptionResource.Languages languages;
+    @XmlElement(name = "AvailableDataViews", required = true)
+    protected EndpointDescriptionResource.AvailableDataViews availableDataViews;
+    @XmlElement(name = "Resources")
+    protected Resources resources;
+    @XmlAnyElement
+    protected List<Element> any;
+    @XmlAttribute(name = "pid", required = true)
+    @XmlSchemaType(name = "anyURI")
+    protected String pid;
+
+    /**
+     * Gets the value of the title property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the title property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTitle().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link I18NString }
+     * 
+     * 
+     */
+    public List<I18NString> getTitle() {
+        if (title == null) {
+            title = new ArrayList<I18NString>();
+        }
+        return this.title;
+    }
+
+    /**
+     * Gets the value of the description property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the description property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDescription().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link I18NString }
+     * 
+     * 
+     */
+    public List<I18NString> getDescription() {
+        if (description == null) {
+            description = new ArrayList<I18NString>();
+        }
+        return this.description;
+    }
+
+    /**
+     * Gets the value of the landingPageURI property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLandingPageURI() {
+        return landingPageURI;
+    }
+
+    /**
+     * Sets the value of the landingPageURI property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLandingPageURI(String value) {
+        this.landingPageURI = value;
+    }
+
+    /**
+     * Gets the value of the languages property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EndpointDescriptionResource.Languages }
+     *     
+     */
+    public EndpointDescriptionResource.Languages getLanguages() {
+        return languages;
+    }
+
+    /**
+     * Sets the value of the languages property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EndpointDescriptionResource.Languages }
+     *     
+     */
+    public void setLanguages(EndpointDescriptionResource.Languages value) {
+        this.languages = value;
+    }
+
+    /**
+     * Gets the value of the availableDataViews property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EndpointDescriptionResource.AvailableDataViews }
+     *     
+     */
+    public EndpointDescriptionResource.AvailableDataViews getAvailableDataViews() {
+        return availableDataViews;
+    }
+
+    /**
+     * Sets the value of the availableDataViews property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EndpointDescriptionResource.AvailableDataViews }
+     *     
+     */
+    public void setAvailableDataViews(EndpointDescriptionResource.AvailableDataViews value) {
+        this.availableDataViews = value;
+    }
+
+    /**
+     * 
+     * <pre>
+     * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;h:p xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ed="http://clarin.eu/fcs/endpoint-description" xmlns:p430405_="http://jaxb2-commons.dev.java.net/namespace-prefix" xmlns:p680092_="http://java.sun.com/xml/ns/jaxb" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
+     *                                 If a resource has searchable sub-resources
+     *                                 the Endpoint MUST supply additional finer grained
+     *                                 &amp;lt;Resource&amp;gt; elements. A sub-resource is a
+     *                                 searchable entity within a resource, e.g. a sub-corpus.
+     *                             &lt;/h:p&gt;
+     * </pre>
+     * 
+     * 
+     * @return
+     *     possible object is
+     *     {@link Resources }
+     *     
+     */
+    public Resources getResources() {
+        return resources;
+    }
+
+    /**
+     * Sets the value of the resources property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Resources }
+     *     
+     */
+    public void setResources(Resources value) {
+        this.resources = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Element> getAny() {
+        if (any == null) {
+            any = new ArrayList<Element>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets the value of the pid property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * Sets the value of the pid property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPid(String value) {
+        this.pid = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType&gt;
+     *   &lt;complexContent&gt;
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+     *       &lt;attribute name="ref" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREFS" /&gt;
+     *     &lt;/restriction&gt;
+     *   &lt;/complexContent&gt;
+     * &lt;/complexType&gt;
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "")
+    public static class AvailableDataViews {
+
+        @XmlAttribute(name = "ref", required = true)
+        @XmlIDREF
+        @XmlSchemaType(name = "IDREFS")
+        protected List<Object> ref;
+
+        /**
+         * Gets the value of the ref property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the ref property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getRef().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link Object }
+         * 
+         * 
+         */
+        public List<Object> getRef() {
+            if (ref == null) {
+                ref = new ArrayList<Object>();
+            }
+            return this.ref;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType&gt;
+     *   &lt;complexContent&gt;
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+     *       &lt;sequence&gt;
+     *         &lt;element name="Language" maxOccurs="unbounded"&gt;
+     *           &lt;simpleType&gt;
+     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+     *               &lt;pattern value="[a-zA-Z]{3}"/&gt;
+     *             &lt;/restriction&gt;
+     *           &lt;/simpleType&gt;
+     *         &lt;/element&gt;
+     *       &lt;/sequence&gt;
+     *     &lt;/restriction&gt;
+     *   &lt;/complexContent&gt;
+     * &lt;/complexType&gt;
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "language"
+    })
+    public static class Languages {
+
+        @XmlElement(name = "Language", required = true)
+        protected List<String> language;
+
+        /**
+         * Gets the value of the language property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the language property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getLanguage().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getLanguage() {
+            if (language == null) {
+                language = new ArrayList<String>();
+            }
+            return this.language;
+        }
+
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionType.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionType.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionType.java	(revision 6059)
@@ -0,0 +1,505 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlID;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for EndpointDescriptionType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="EndpointDescriptionType"&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name="Capabilities"&gt;
+ *           &lt;complexType&gt;
+ *             &lt;complexContent&gt;
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *                 &lt;sequence&gt;
+ *                   &lt;element name="Capability" maxOccurs="unbounded"&gt;
+ *                     &lt;simpleType&gt;
+ *                       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyURI"&gt;
+ *                         &lt;pattern value="http://clarin.eu/fcs/capability/\w([\.\-]{0,1}\w)*"/&gt;
+ *                       &lt;/restriction&gt;
+ *                     &lt;/simpleType&gt;
+ *                   &lt;/element&gt;
+ *                 &lt;/sequence&gt;
+ *               &lt;/restriction&gt;
+ *             &lt;/complexContent&gt;
+ *           &lt;/complexType&gt;
+ *         &lt;/element&gt;
+ *         &lt;element name="SupportedDataViews"&gt;
+ *           &lt;complexType&gt;
+ *             &lt;complexContent&gt;
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *                 &lt;sequence&gt;
+ *                   &lt;element name="SupportedDataView" maxOccurs="unbounded"&gt;
+ *                     &lt;complexType&gt;
+ *                       &lt;simpleContent&gt;
+ *                         &lt;extension base="&lt;http://clarin.eu/fcs/endpoint-description&gt;mimetypeString"&gt;
+ *                           &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
+ *                           &lt;attribute name="delivery-policy" use="required"&gt;
+ *                             &lt;simpleType&gt;
+ *                               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+ *                                 &lt;enumeration value="send-by-default"/&gt;
+ *                                 &lt;enumeration value="need-to-request"/&gt;
+ *                               &lt;/restriction&gt;
+ *                             &lt;/simpleType&gt;
+ *                           &lt;/attribute&gt;
+ *                         &lt;/extension&gt;
+ *                       &lt;/simpleContent&gt;
+ *                     &lt;/complexType&gt;
+ *                   &lt;/element&gt;
+ *                 &lt;/sequence&gt;
+ *               &lt;/restriction&gt;
+ *             &lt;/complexContent&gt;
+ *           &lt;/complexType&gt;
+ *         &lt;/element&gt;
+ *         &lt;element ref="{http://clarin.eu/fcs/endpoint-description}Resources"/&gt;
+ *         &lt;any processContents='skip' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EndpointDescriptionType", propOrder = {
+    "capabilities",
+    "supportedDataViews",
+    "resources",
+    "any"
+})
+public class EndpointDescriptionType {
+
+    @XmlElement(name = "Capabilities", required = true)
+    protected EndpointDescriptionType.Capabilities capabilities;
+    @XmlElement(name = "SupportedDataViews", required = true)
+    protected EndpointDescriptionType.SupportedDataViews supportedDataViews;
+    @XmlElement(name = "Resources", required = true)
+    protected Resources resources;
+    @XmlAnyElement
+    protected List<Element> any;
+    @XmlAttribute(name = "version", required = true)
+    @XmlSchemaType(name = "nonNegativeInteger")
+    protected BigInteger version;
+
+    /**
+     * Gets the value of the capabilities property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EndpointDescriptionType.Capabilities }
+     *     
+     */
+    public EndpointDescriptionType.Capabilities getCapabilities() {
+        return capabilities;
+    }
+
+    /**
+     * Sets the value of the capabilities property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EndpointDescriptionType.Capabilities }
+     *     
+     */
+    public void setCapabilities(EndpointDescriptionType.Capabilities value) {
+        this.capabilities = value;
+    }
+
+    /**
+     * Gets the value of the supportedDataViews property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link EndpointDescriptionType.SupportedDataViews }
+     *     
+     */
+    public EndpointDescriptionType.SupportedDataViews getSupportedDataViews() {
+        return supportedDataViews;
+    }
+
+    /**
+     * Sets the value of the supportedDataViews property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link EndpointDescriptionType.SupportedDataViews }
+     *     
+     */
+    public void setSupportedDataViews(EndpointDescriptionType.SupportedDataViews value) {
+        this.supportedDataViews = value;
+    }
+
+    /**
+     * 
+     * <pre>
+     * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;h:p xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ed="http://clarin.eu/fcs/endpoint-description" xmlns:p430405_="http://jaxb2-commons.dev.java.net/namespace-prefix" xmlns:p680092_="http://java.sun.com/xml/ns/jaxb" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
+     *                             A list of top-level resources, that are available
+     *                             at an Endpoint. An Endpoint MUST
+     *                             declare at least one top-level resource.
+     *                         &lt;/h:p&gt;
+     * </pre>
+     * 
+     * 
+     * @return
+     *     possible object is
+     *     {@link Resources }
+     *     
+     */
+    public Resources getResources() {
+        return resources;
+    }
+
+    /**
+     * Sets the value of the resources property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Resources }
+     *     
+     */
+    public void setResources(Resources value) {
+        this.resources = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Element> getAny() {
+        if (any == null) {
+            any = new ArrayList<Element>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets the value of the version property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the value of the version property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setVersion(BigInteger value) {
+        this.version = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType&gt;
+     *   &lt;complexContent&gt;
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+     *       &lt;sequence&gt;
+     *         &lt;element name="Capability" maxOccurs="unbounded"&gt;
+     *           &lt;simpleType&gt;
+     *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyURI"&gt;
+     *               &lt;pattern value="http://clarin.eu/fcs/capability/\w([\.\-]{0,1}\w)*"/&gt;
+     *             &lt;/restriction&gt;
+     *           &lt;/simpleType&gt;
+     *         &lt;/element&gt;
+     *       &lt;/sequence&gt;
+     *     &lt;/restriction&gt;
+     *   &lt;/complexContent&gt;
+     * &lt;/complexType&gt;
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "capability"
+    })
+    public static class Capabilities {
+
+        @XmlElement(name = "Capability", required = true)
+        protected List<String> capability;
+
+        /**
+         * Gets the value of the capability property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the capability property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getCapability().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link String }
+         * 
+         * 
+         */
+        public List<String> getCapability() {
+            if (capability == null) {
+                capability = new ArrayList<String>();
+            }
+            return this.capability;
+        }
+
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType&gt;
+     *   &lt;complexContent&gt;
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+     *       &lt;sequence&gt;
+     *         &lt;element name="SupportedDataView" maxOccurs="unbounded"&gt;
+     *           &lt;complexType&gt;
+     *             &lt;simpleContent&gt;
+     *               &lt;extension base="&lt;http://clarin.eu/fcs/endpoint-description&gt;mimetypeString"&gt;
+     *                 &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
+     *                 &lt;attribute name="delivery-policy" use="required"&gt;
+     *                   &lt;simpleType&gt;
+     *                     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+     *                       &lt;enumeration value="send-by-default"/&gt;
+     *                       &lt;enumeration value="need-to-request"/&gt;
+     *                     &lt;/restriction&gt;
+     *                   &lt;/simpleType&gt;
+     *                 &lt;/attribute&gt;
+     *               &lt;/extension&gt;
+     *             &lt;/simpleContent&gt;
+     *           &lt;/complexType&gt;
+     *         &lt;/element&gt;
+     *       &lt;/sequence&gt;
+     *     &lt;/restriction&gt;
+     *   &lt;/complexContent&gt;
+     * &lt;/complexType&gt;
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "supportedDataView"
+    })
+    public static class SupportedDataViews {
+
+        @XmlElement(name = "SupportedDataView", required = true)
+        protected List<EndpointDescriptionType.SupportedDataViews.SupportedDataView> supportedDataView;
+
+        /**
+         * Gets the value of the supportedDataView property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the supportedDataView property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getSupportedDataView().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link EndpointDescriptionType.SupportedDataViews.SupportedDataView }
+         * 
+         * 
+         */
+        public List<EndpointDescriptionType.SupportedDataViews.SupportedDataView> getSupportedDataView() {
+            if (supportedDataView == null) {
+                supportedDataView = new ArrayList<EndpointDescriptionType.SupportedDataViews.SupportedDataView>();
+            }
+            return this.supportedDataView;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType&gt;
+         *   &lt;simpleContent&gt;
+         *     &lt;extension base="&lt;http://clarin.eu/fcs/endpoint-description&gt;mimetypeString"&gt;
+         *       &lt;attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}ID" /&gt;
+         *       &lt;attribute name="delivery-policy" use="required"&gt;
+         *         &lt;simpleType&gt;
+         *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
+         *             &lt;enumeration value="send-by-default"/&gt;
+         *             &lt;enumeration value="need-to-request"/&gt;
+         *           &lt;/restriction&gt;
+         *         &lt;/simpleType&gt;
+         *       &lt;/attribute&gt;
+         *     &lt;/extension&gt;
+         *   &lt;/simpleContent&gt;
+         * &lt;/complexType&gt;
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "value"
+        })
+        public static class SupportedDataView {
+
+            @XmlValue
+            protected String value;
+            @XmlAttribute(name = "id", required = true)
+            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+            @XmlID
+            @XmlSchemaType(name = "ID")
+            protected String id;
+            @XmlAttribute(name = "delivery-policy", required = true)
+            protected String deliveryPolicy;
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+
+            /**
+             * Gets the value of the id property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getId() {
+                return id;
+            }
+
+            /**
+             * Sets the value of the id property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setId(String value) {
+                this.id = value;
+            }
+
+            /**
+             * Gets the value of the deliveryPolicy property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getDeliveryPolicy() {
+                return deliveryPolicy;
+            }
+
+            /**
+             * Sets the value of the deliveryPolicy property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setDeliveryPolicy(String value) {
+                this.deliveryPolicy = value;
+            }
+
+        }
+
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/I18NString.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/I18NString.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/I18NString.java	(revision 6059)
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+
+/**
+ * <p>Java class for i18nString complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="i18nString"&gt;
+ *   &lt;simpleContent&gt;
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
+ *       &lt;attribute ref="{http://www.w3.org/XML/1998/namespace}lang use="required""/&gt;
+ *     &lt;/extension&gt;
+ *   &lt;/simpleContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "i18nString", propOrder = {
+    "value"
+})
+public class I18NString {
+
+    @XmlValue
+    protected String value;
+    @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace", required = true)
+    protected String lang;
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the lang property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLang() {
+        return lang;
+    }
+
+    /**
+     * Sets the value of the lang property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLang(String value) {
+        this.lang = value;
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ObjectFactory.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ObjectFactory.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ObjectFactory.java	(revision 6059)
@@ -0,0 +1,176 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the de.clarin.fcs.schema package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _EndpointDescription_QNAME = new QName("http://clarin.eu/fcs/endpoint-description", "EndpointDescription");
+    private final static QName _Resource_QNAME = new QName("http://clarin.eu/fcs/resource", "Resource");
+    private final static QName _ResultHit_QNAME = new QName("http://clarin.eu/fcs/dataview/hits", "Hit");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: de.clarin.fcs.schema
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link ResourceType }
+     * 
+     */
+    public ResourceType createResourceType() {
+        return new ResourceType();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionResource }
+     * 
+     */
+    public EndpointDescriptionResource createEndpointDescriptionResource() {
+        return new EndpointDescriptionResource();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionType }
+     * 
+     */
+    public EndpointDescriptionType createEndpointDescriptionType() {
+        return new EndpointDescriptionType();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionType.SupportedDataViews }
+     * 
+     */
+    public EndpointDescriptionType.SupportedDataViews createEndpointDescriptionTypeSupportedDataViews() {
+        return new EndpointDescriptionType.SupportedDataViews();
+    }
+
+    /**
+     * Create an instance of {@link Result }
+     * 
+     */
+    public Result createResult() {
+        return new Result();
+    }
+
+    /**
+     * Create an instance of {@link Resources }
+     * 
+     */
+    public Resources createResources() {
+        return new Resources();
+    }
+
+    /**
+     * Create an instance of {@link I18NString }
+     * 
+     */
+    public I18NString createI18NString() {
+        return new I18NString();
+    }
+
+    /**
+     * Create an instance of {@link DataViewType }
+     * 
+     */
+    public DataViewType createDataViewType() {
+        return new DataViewType();
+    }
+
+    /**
+     * Create an instance of {@link ResourceType.ResourceFragment }
+     * 
+     */
+    public ResourceType.ResourceFragment createResourceTypeResourceFragment() {
+        return new ResourceType.ResourceFragment();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionResource.Languages }
+     * 
+     */
+    public EndpointDescriptionResource.Languages createEndpointDescriptionResourceLanguages() {
+        return new EndpointDescriptionResource.Languages();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionResource.AvailableDataViews }
+     * 
+     */
+    public EndpointDescriptionResource.AvailableDataViews createEndpointDescriptionResourceAvailableDataViews() {
+        return new EndpointDescriptionResource.AvailableDataViews();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionType.Capabilities }
+     * 
+     */
+    public EndpointDescriptionType.Capabilities createEndpointDescriptionTypeCapabilities() {
+        return new EndpointDescriptionType.Capabilities();
+    }
+
+    /**
+     * Create an instance of {@link EndpointDescriptionType.SupportedDataViews.SupportedDataView }
+     * 
+     */
+    public EndpointDescriptionType.SupportedDataViews.SupportedDataView createEndpointDescriptionTypeSupportedDataViewsSupportedDataView() {
+        return new EndpointDescriptionType.SupportedDataViews.SupportedDataView();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link EndpointDescriptionType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://clarin.eu/fcs/endpoint-description", name = "EndpointDescription")
+    public JAXBElement<EndpointDescriptionType> createEndpointDescription(EndpointDescriptionType value) {
+        return new JAXBElement<EndpointDescriptionType>(_EndpointDescription_QNAME, EndpointDescriptionType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link ResourceType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://clarin.eu/fcs/resource", name = "Resource")
+    public JAXBElement<ResourceType> createResource(ResourceType value) {
+        return new JAXBElement<ResourceType>(_Resource_QNAME, ResourceType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://clarin.eu/fcs/dataview/hits", name = "Hit", scope = Result.class)
+    public JAXBElement<String> createResultHit(String value) {
+        return new JAXBElement<String>(_ResultHit_QNAME, String.class, Result.class, value);
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ResourceType.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ResourceType.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/ResourceType.java	(revision 6059)
@@ -0,0 +1,326 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for ResourceType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="ResourceType"&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name="DataView" type="{http://clarin.eu/fcs/resource}DataViewType" maxOccurs="unbounded" minOccurs="0"/&gt;
+ *         &lt;element name="ResourceFragment" maxOccurs="unbounded" minOccurs="0"&gt;
+ *           &lt;complexType&gt;
+ *             &lt;complexContent&gt;
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *                 &lt;sequence&gt;
+ *                   &lt;element name="DataView" type="{http://clarin.eu/fcs/resource}DataViewType" maxOccurs="unbounded" minOccurs="0"/&gt;
+ *                 &lt;/sequence&gt;
+ *                 &lt;attribute name="pid" type="{http://clarin.eu/fcs/resource}PidType" /&gt;
+ *                 &lt;attribute name="ref" type="{http://clarin.eu/fcs/resource}ReferenceType" /&gt;
+ *               &lt;/restriction&gt;
+ *             &lt;/complexContent&gt;
+ *           &lt;/complexType&gt;
+ *         &lt;/element&gt;
+ *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
+ *       &lt;/sequence&gt;
+ *       &lt;attribute name="pid" type="{http://clarin.eu/fcs/resource}PidType" /&gt;
+ *       &lt;attribute name="ref" type="{http://clarin.eu/fcs/resource}ReferenceType" /&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ResourceType", namespace = "http://clarin.eu/fcs/resource", propOrder = {
+    "dataView",
+    "resourceFragment",
+    "any"
+})
+public class ResourceType {
+
+    @XmlElement(name = "DataView")
+    protected List<DataViewType> dataView;
+    @XmlElement(name = "ResourceFragment")
+    protected List<ResourceType.ResourceFragment> resourceFragment;
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAttribute(name = "pid")
+    protected String pid;
+    @XmlAttribute(name = "ref")
+    protected String ref;
+
+    /**
+     * Gets the value of the dataView property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the dataView property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getDataView().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link DataViewType }
+     * 
+     * 
+     */
+    public List<DataViewType> getDataView() {
+        if (dataView == null) {
+            dataView = new ArrayList<DataViewType>();
+        }
+        return this.dataView;
+    }
+
+    /**
+     * Gets the value of the resourceFragment property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the resourceFragment property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getResourceFragment().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ResourceType.ResourceFragment }
+     * 
+     * 
+     */
+    public List<ResourceType.ResourceFragment> getResourceFragment() {
+        if (resourceFragment == null) {
+            resourceFragment = new ArrayList<ResourceType.ResourceFragment>();
+        }
+        return this.resourceFragment;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets the value of the pid property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * Sets the value of the pid property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPid(String value) {
+        this.pid = value;
+    }
+
+    /**
+     * Gets the value of the ref property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRef() {
+        return ref;
+    }
+
+    /**
+     * Sets the value of the ref property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRef(String value) {
+        this.ref = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType&gt;
+     *   &lt;complexContent&gt;
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+     *       &lt;sequence&gt;
+     *         &lt;element name="DataView" type="{http://clarin.eu/fcs/resource}DataViewType" maxOccurs="unbounded" minOccurs="0"/&gt;
+     *       &lt;/sequence&gt;
+     *       &lt;attribute name="pid" type="{http://clarin.eu/fcs/resource}PidType" /&gt;
+     *       &lt;attribute name="ref" type="{http://clarin.eu/fcs/resource}ReferenceType" /&gt;
+     *     &lt;/restriction&gt;
+     *   &lt;/complexContent&gt;
+     * &lt;/complexType&gt;
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "dataView"
+    })
+    public static class ResourceFragment {
+
+        @XmlElement(name = "DataView", namespace = "http://clarin.eu/fcs/resource")
+        protected List<DataViewType> dataView;
+        @XmlAttribute(name = "pid")
+        protected String pid;
+        @XmlAttribute(name = "ref")
+        protected String ref;
+
+        /**
+         * Gets the value of the dataView property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the dataView property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getDataView().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link DataViewType }
+         * 
+         * 
+         */
+        public List<DataViewType> getDataView() {
+            if (dataView == null) {
+                dataView = new ArrayList<DataViewType>();
+            }
+            return this.dataView;
+        }
+
+        /**
+         * Gets the value of the pid property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getPid() {
+            return pid;
+        }
+
+        /**
+         * Sets the value of the pid property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setPid(String value) {
+            this.pid = value;
+        }
+
+        /**
+         * Gets the value of the ref property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getRef() {
+            return ref;
+        }
+
+        /**
+         * Sets the value of the ref property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setRef(String value) {
+            this.ref = value;
+        }
+
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Resources.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Resources.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Resources.java	(revision 6059)
@@ -0,0 +1,78 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element ref="{http://clarin.eu/fcs/endpoint-description}Resource" maxOccurs="unbounded"/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "resource"
+})
+@XmlRootElement(name = "Resources")
+public class Resources {
+
+    @XmlElement(name = "Resource", required = true)
+    protected List<EndpointDescriptionResource> resource;
+
+    /**
+     * Gets the value of the resource property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the resource property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getResource().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link EndpointDescriptionResource }
+     * 
+     * 
+     */
+    public List<EndpointDescriptionResource> getResource() {
+        if (resource == null) {
+            resource = new ArrayList<EndpointDescriptionResource>();
+        }
+        return this.resource;
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Result.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Result.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/Result.java	(revision 6059)
@@ -0,0 +1,83 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+
+package de.clarin.fcs.schema;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlMixed;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name="Hit" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "content"
+})
+@XmlRootElement(name = "Result", namespace = "http://clarin.eu/fcs/dataview/hits")
+public class Result {
+
+    @XmlElementRef(name = "Hit", namespace = "http://clarin.eu/fcs/dataview/hits", type = JAXBElement.class)
+    @XmlMixed
+    protected List<Serializable> content;
+
+    /**
+     * Gets the value of the content property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the content property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getContent().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * {@link JAXBElement }{@code <}{@link String }{@code >}
+     * 
+     * 
+     */
+    public List<Serializable> getContent() {
+        if (content == null) {
+            content = new ArrayList<Serializable>();
+        }
+        return this.content;
+    }
+
+}
Index: /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/package-info.java
===================================================================
--- /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/package-info.java	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/generated-sources/xjc/de/clarin/fcs/schema/package-info.java	(revision 6059)
@@ -0,0 +1,13 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2015.02.25 at 04:46:45 PM CET 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://clarin.eu/fcs/endpoint-description", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED, xmlns = {
+    @javax.xml.bind.annotation.XmlNs(namespaceURI = "http://clarin.eu/fcs/dataview/hits", prefix = "hits"),
+    @javax.xml.bind.annotation.XmlNs(namespaceURI = "http://clarin.eu/fcs/endpoint-description", prefix = "ed"),
+    @javax.xml.bind.annotation.XmlNs(namespaceURI = "http://clarin.eu/fcs/resource", prefix = "fcs")
+})
+package de.clarin.fcs.schema;
Index: /FederatedSearch/mpi-endpoint/target/maven-archiver/pom.properties
===================================================================
--- /FederatedSearch/mpi-endpoint/target/maven-archiver/pom.properties	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/maven-archiver/pom.properties	(revision 6059)
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Wed Feb 25 16:46:57 CET 2015
+version=4.4
+groupId=nl.mpi.annot.search
+artifactId=cqlsearch2
Index: /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
===================================================================
--- /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst	(revision 6059)
@@ -0,0 +1,28 @@
+nl/mpi/annot/search/cqlsearch2/LanguageHarvester.class
+nl/mpi/annot/search/cqlsearch2/CQLConstants.class
+de/clarin/fcs/schema/EndpointDescriptionType$Capabilities.class
+de/clarin/fcs/schema/EndpointDescriptionResource$Languages.class
+nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread.class
+nl/mpi/annot/search/cqlsearch2/CatalogData.class
+de/clarin/fcs/schema/EndpointDescriptionType$SupportedDataViews.class
+nl/mpi/annot/search/cqlsearch2/NonSupportedQueryException.class
+nl/mpi/annot/search/cqlsearch2/DefaultDataView.class
+de/clarin/fcs/schema/Result.class
+nl/mpi/annot/search/cqlsearch2/LanguageCodeToISO3.class
+de/clarin/fcs/schema/package-info.class
+de/clarin/fcs/schema/DataViewType.class
+de/clarin/fcs/schema/ResourceType$ResourceFragment.class
+nl/mpi/annot/search/cqlsearch2/CQLHelpers.class
+de/clarin/fcs/schema/ResourceType.class
+de/clarin/fcs/schema/I18NString.class
+de/clarin/fcs/schema/EndpointDescriptionType$SupportedDataViews$SupportedDataView.class
+de/clarin/fcs/schema/EndpointDescriptionType.class
+nl/mpi/annot/search/cqlsearch2/JaxbMarshallerFactory.class
+nl/mpi/annot/search/cqlsearch2/SRUExplainResultImpl.class
+nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread$1.class
+de/clarin/fcs/schema/EndpointDescriptionResource.class
+de/clarin/fcs/schema/Resources.class
+de/clarin/fcs/schema/EndpointDescriptionResource$AvailableDataViews.class
+nl/mpi/annot/search/cqlsearch2/SRUSearchResultSetImpl.class
+nl/mpi/annot/search/cqlsearch2/SRUSearchEngineImpl.class
+de/clarin/fcs/schema/ObjectFactory.class
Index: /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
===================================================================
--- /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst	(revision 6059)
+++ /FederatedSearch/mpi-endpoint/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst	(revision 6059)
@@ -0,0 +1,21 @@
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvester.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/package-info.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/ObjectFactory.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchResultSetImpl.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/DataViewType.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/DefaultDataView.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLHelpers.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionResource.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/I18NString.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageHarvestingThread.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/Result.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/LanguageCodeToISO3.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUExplainResultImpl.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/JaxbMarshallerFactory.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/SRUSearchEngineImpl.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/CQLConstants.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/EndpointDescriptionType.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/ResourceType.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/NonSupportedQueryException.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/target/generated-sources/xjc/de/clarin/fcs/schema/Resources.java
+/Users/olhsha/repositories/cqlsearch/cqlsearch/trunk/src/main/java/nl/mpi/annot/search/cqlsearch2/CatalogData.java
