Index: /vlo/branches/vlo-2.13-param/vlo_webapp/nbactions.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/nbactions.xml	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/nbactions.xml	(revision 2627)
@@ -1,6 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <actions>
-        
-        
-        
-    </actions>
+            
+</actions>
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/pom.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/pom.xml	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/pom.xml	(revision 2627)
@@ -215,14 +215,4 @@
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-            <version>2.5.6</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>2.5.6</version>
-        </dependency>
-        <dependency>
             <groupId>com.ximpleware</groupId>
             <artifactId>vtd-xml</artifactId>
@@ -245,6 +235,11 @@
             <version>2.4.1</version>
         </dependency>
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>1.2</version>
+            <type>jar</type>
+        </dependency>
     </dependencies>
 
-
 </project>
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java	(revision 2627)
@@ -7,5 +7,4 @@
 import java.util.Map;
 import java.util.Set;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -15,5 +14,4 @@
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/Configuration.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/Configuration.java	(revision 2626)
+++ 	(revision )
@@ -1,163 +1,0 @@
-package eu.clarin.cmdi.vlo;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-/**
- * see applicationContext.xml resource for proper values.
- *
- **/
-public final class Configuration {
-
-    private final static Configuration INSTANCE = new Configuration();
-
-    public static final String CONFIG_FILE = "applicationContext.xml";
-    private final static String PROFILE_ID_PLACEHOLDER = "{PROFILE_ID}";
-    private String solrUrl;
-
-    public String getImporterConfigFile() {
-        return importerConfigFile;
-    }
-
-    public void setImporterConfigFile(String importerConfigFile) {
-        this.importerConfigFile = importerConfigFile;
-    }
-
-    private String importerConfigFile;
-
-    private String nationalProjectMapping = "nationalProjectsMapping.xml";
-
-    public String getNationalProjectMapping() {
-        return nationalProjectMapping;
-    }
-
-    public void setNationalProjectMapping(String nationalProjectMapping) {
-        this.nationalProjectMapping = nationalProjectMapping;
-    }
-
-    private String componentRegistryRESTURL = "NOT_OVERRIDDEN!";
-    public String getComponentRegistryRESTURL() {
-        return componentRegistryRESTURL;
-    }
-
-    public void setComponentRegistryRESTURL(String componentRegistryRESTURL) {
-        this.componentRegistryRESTURL = componentRegistryRESTURL;
-    }
-
-
-    private String imdiBrowserUrl;// = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=";
-
-    private String[] facetFields;// = new String[] { "collection", "organisation", "continent", "genre", "country", "subject", "language" };
-
-    private String handleServerUrl; //"http://hdl.handle.net/"
-
-    /**
-     * Default values you can overwrite in applicationContext.xml: e.g. <property name="countryComponentUrl" value="" />
-     */
-    private String countryComponentUrl = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml";
-    private String language2LetterCodeComponentUrl = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml";
-    private String language3LetterCodeComponentUrl = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml";
-    private String silToISO639CodesUrl = "http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml";
-    private String profileSchemaUrl = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/" + PROFILE_ID_PLACEHOLDER
-            + "/xsd";
-    private final String federatedContentSearchUrl ="http://weblicht.sfs.uni-tuebingen.de/Aggregator/";
-
-    private String vloHomeLink = "http://www.clarin.eu/vlo";//default can be overridden in xml
-
-    private Configuration() {
-    }
-
-    public static Configuration getInstance() {
-        return INSTANCE;
-    }
-
-    public void setSolrUrl(String solrUrl) {
-        this.solrUrl = solrUrl;
-    }
-
-    public String getSolrUrl() {
-        return solrUrl;
-    }
-
-    public void setIMDIBrowserUrl(String imdiBrowserUrl) {
-        this.imdiBrowserUrl = imdiBrowserUrl;
-    }
-
-    public String getIMDIBrowserUrl(String handle) {
-        String result;
-        try {
-            result = imdiBrowserUrl + URLEncoder.encode(handle, "UTF-8");
-        } catch (UnsupportedEncodingException e) {
-            result = imdiBrowserUrl + handle;
-        }
-        return result;
-    }
-
-    public String[] getFacetFields() {
-        return facetFields;
-    }
-
-    public void setFacetFields(String[] facetFields) {
-        this.facetFields = facetFields;
-    }
-
-    public String getHandleServerUrl() {
-        return handleServerUrl;
-    }
-
-    public void setHandleServerUrl(String handleServerUrl) {
-        this.handleServerUrl = handleServerUrl;
-    }
-
-    public String getCountryComponentUrl() {
-        return countryComponentUrl;
-    }
-
-    public void setCountryComponentUrl(String countryComponentUrl) {
-        this.countryComponentUrl = countryComponentUrl;
-    }
-
-    public String getLanguage2LetterCodeComponentUrl() {
-        return language2LetterCodeComponentUrl;
-    }
-
-    public void setLanguage2LetterCodeComponentUrl(String language2LetterCodeComponentUrl) {
-        this.language2LetterCodeComponentUrl = language2LetterCodeComponentUrl;
-    }
-
-    public String getLanguage3LetterCodeComponentUrl() {
-        return language3LetterCodeComponentUrl;
-    }
-
-    public void setLanguage3LetterCodeComponentUrl(String language3LetterCodeComponentUrl) {
-        this.language3LetterCodeComponentUrl = language3LetterCodeComponentUrl;
-    }
-
-    public String getSilToISO639CodesUrl() {
-        return silToISO639CodesUrl;
-    }
-
-    public void setSilToISO639CodesUrl(String silToISO639CodesUrl) {
-        this.silToISO639CodesUrl = silToISO639CodesUrl;
-    }
-
-    public String getVloHomeLink() {
-        return vloHomeLink;
-    }
-
-    public void setVloHomeLink(String vloHomeLink) {
-        this.vloHomeLink = vloHomeLink;
-    }
-
-    public String getComponentRegistryProfileSchema(String profileId) {
-        return profileSchemaUrl.replace(PROFILE_ID_PLACEHOLDER, profileId);
-    }
-
-    public void setProfileSchemaUrl(String profileSchemaUrl) {
-        this.profileSchemaUrl = profileSchemaUrl;
-    }
-    
-    public String getFederatedContentSearchUrl() {
-    	return federatedContentSearchUrl;
-    }
-}
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/VloApplication.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/VloApplication.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/VloApplication.java	(revision 2627)
@@ -18,5 +18,5 @@
 public class VloApplication extends WebApplication {
 
-    private final SearchResultsDao searchResults;
+    private SearchResultsDao searchResults;
 
     // application configuration
@@ -27,5 +27,6 @@
 
     /**
-     * Method that will be invoked when the application starts
+     * Method that will be invoked when the application starts<br><br>
+     *
      */
     @Override
@@ -47,4 +48,8 @@
             config = VloConfig.switchToExternalConfig(servletContext);
         }
+
+        // start the application
+
+        searchResults = new SearchResultsDao();
     }
 
@@ -69,9 +74,5 @@
         // let the {@literal init()} method know that there will be a context
 
-        inContext = true;
-
-        // start the application
-
-        searchResults = new SearchResultsDao();
+        inContext = true;  
     }
 
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java	(revision 2627)
@@ -13,17 +13,8 @@
 /**
  * Web application configuration<br><br>
- *
- * A parameter that is part of the configuration of the VLO web application can
- * be of two types: it is either a parameter that is defined from within the
- * application, an application parameter, or it is a parameter that is defined
- * in the context in which the application will live as a {@literal servlet}.
- * Application parameters reside in the {@literal WebAppConfig.xml} file, while
- * {@literal servlet} context parameters are part of the Tomcat server
- * configuration. <br><br>
- *
- * An application parameter is defined an XML file in the resources directory of
- * the application package. For every application parameter, the WebApplication
- * class contains a member that is annotated according to the Simple framework
- * specification. So<br><br>
+ * 
+ * Map the elements in the packaged {@literal WebAppConfig.xml} file to the
+ * members in this class, the configuration of the VLO web application and
+ * importer according to the Simple framework specification. So<br><br>
  *
  * {@literal <parameterMember>}"the value of the
@@ -36,27 +27,27 @@
  * @element}<br> {@literal parameterMember}<br><br>
  *
- * in the WebAppConfig class. When the application invokes Simple by<br><br>
- *
- * WebAppConfig.get();<br><br>
- *
- * the parameter itself is accessed by<br><br>
- *
- * WebAppConfig.get().getParameterMember();<br><br>
- *
- * If you want to add a type of member that is not included in the class yet,
- * refer to the Simple framework's specification.<br><br>
- *
- * A context parameter also resides in an XML file. For more information on the
- * location and the format of this file, please refer to the Apache Tomcat
- * configuration reference.<br><br>
+ * in the VloConfig class. If you want to add a type of member that is not
+ * included in the class yet, refer to the Simple framework's
+ * specification.<br><br> 
  * 
- * Because the application is indifferent to the origin of a parameter, the
- * WebAppConfig class is the place to switch from one type of parameter to the
- * other. In other words: you do not have to change the application if you
- * replace an application parameter by a context parameter. The change is
- * reflected here, and not in the application. In a sense, this relieves the
- * need to use get and read methods. Such methods still have an advantage
- * though, because you can change a parameter without changing the rest of the
- * application.<br><br>
+ * The parameters are stored statically. This means that a parameter can be
+ * referenced from the application without first creating a configuration
+ * object. So get() in
+ *
+ * WebAppConfig.get().getSomeParameter();<br><br>
+ *
+ * will return the static configuration, and getSomeParameter() will return a
+ * specific parameter in this configuration. 
+ * 
+ * Through the get and set methods, the application is indifferent to the origin
+ * of a parameter: you can get and set the value of a parameter without having
+ * to worry about how the parameter was defined originally. By invoking the read
+ * method, and by querying the context, the web application, on initialization,
+ * determines which definition to use. 
+ * 
+ * Also, the get and set methods allow for a modification of the original value
+ * of the parameter. For example, if the format of a parameter changes, this 
+ * change can be handled in the get and set method once, instead of having to 
+ * modify every reference to the parameter in the application. 
  *
  * Please note on the explanation of the meaning of the parameters. Because the
@@ -97,35 +88,17 @@
     
     /**
-     * Make the configuration statically accessible<br><br>
-     *
-     * Both the Simple framework and the methods in the web application need to
-     * access the configuration. Access is granted by defining a member holding
-     * the configuration, that is, by defining a member of type WebAppConfig.
+     * Make the configuration statically accessible
      */
     private static VloConfig config = null;
 
     /**
-     * kj: change the annotation. Instead of opening a context, it is now a 
-     * matter of initializing it. Make a new method for referencing.
-     * 
-     * Open a static context of WebAppConfig members, and assign values to
-     * them.<br><br>
-     * 
-     * The web application can access a parameter by invoking one of the get or
-     * set methods defined below. Because these methods return a non-static
-     * value, while WebAppConfig on the other hand denotes a static
-     * context,<br><br>
-     *
-     * WebAppConfig.getParameterMember()<br><br>
-     *
-     * for example, would not be valid. On encountering get() however, a new
-     * static context is opened, and from that, getParameterMember() can be
-     * invoked:<br><br>
-     *
-     * WebAppConfig.get().getParameterMember()<br><br>
-     * 
+     * Read the configuration from an XML file. 
+     *
+     * Please invoke this method from the web application or from the importer;
+     * the readTestConfig method is intended for testing purposes.
+     *
      * @param fileName
      *
-     * @return the web application configuration in a new static context
+     * @return the web application configuration 
      */
     public static VloConfig readConfig(String fileName) {
@@ -143,13 +116,14 @@
 
     /**
-     * kj: add comment, much in the same way as the annotation of the WepApp
-     * method.
-     * 
-     * In this method, exceptions to the normal web application context can 
-     * be made.
+     * Read the configuration from an XML file. 
+     * 
+     * Please invoke this method from the package tests. If the tests invoke a
+     * method different from the one used by the web application and the
+     * important, you can make some test specific changes to the parameters
+     * here. 
      * 
      * @param fileName
-     * 
-     * @return 
+     *
+     * @return the web application configuration in a new static context
      */
     public static VloConfig readTestConfig(String fileName) {
@@ -167,5 +141,5 @@
     
     /**
-     * kj: this is the new get context method
+     * Return the configuration
      * 
      * @return 
@@ -186,22 +160,10 @@
      */
     
-    /**
-     * Flag to signal the records in the data to be deleted before the ingestion
-     * starts.
-     */
     @Element // directive for Simple
     private boolean deleteAllFirst = false;
     
-    /**
-     * Flag that leads to the printing of XPATH mappings encountered. Note: need
-     * to be more specific on this.
-     */
     @Element
     private boolean printMapping = false;
     
-    /**
-     * A list of data roots, that is: directories from which the importer
-     * collects meta data. Note: need to elaborate on this.
-     */
     @ElementList // directive for Simple
     private List<DataRoot> dataRoots;
@@ -216,5 +178,4 @@
     @Element
     private String solrUrl = "";
-    // In the XML file, the value of the parameter is expanded by Maven.
     
     @Element
@@ -279,9 +240,9 @@
 
     /**
-     * Get and read methods for web application parameter members<br><br>
-     *
-     * By using a get or read method, you can apply an operation to a parameter
-     * here, in the WebAppConfig class, without the need to make changes in
-     * different parts of the application.
+     * Get and set methods for web application parameter members<br><br>
+     *
+     * By using a get or set method, you can apply an operation to a parameter
+     * here without the need to make changes in different parts of the
+     * application.
      */
     
@@ -376,8 +337,20 @@
      * documentation.
      *
-     * @param solrUrl the value
+     * @return the value
      */
     public String getSolrUrl() {
         return solrUrl;
+    }
+
+    /**
+     * Set the value of the SolrUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param the parameter
+     */
+    public void setSolrUrl(String url) {
+        this.solrUrl = url;
     }
 
@@ -652,15 +625,26 @@
             
     /**
-     *
-     * kj: repair annotation
-     * 
-     * Contrary to Simple, the web application's context parameters are not
-     * retrieved by annotation. Get them by invoking a local method.
-     *
-     * Add properties of the {@literal servlet's} context<br><br>
-     *  
-     * Keep the properties in the static context of the WebAppConfig class, next
-     * to the members representing the values in WebAppConfig.xml file.<br><br>
-     *
+     * Switch to external configuration.<br><br>
+     * 
+     * In addition to the definition of the configuration by the packaged in the
+     * {@literal VloConfig.xml} file, you can configure the web application by
+     * means of an XML file that resides outside the package. By letting a
+     * parameter named<br><br>
+     *
+     * externalConfig<br><br>
+     * 
+     * in the context reference an XML file similar to the packaged one, the
+     * parameters defined in this file will override the packaged parameters.
+     * Please note that the use of an external XML file is not
+     * compulsory.<br><br>
+     *
+     * Another way to externally configure the web application is to define
+     * parameters by including them in the context fragment not via an XML file,
+     * but directly. At the moment, only the packaged <br><br>
+     * 
+     * solrUrl<br><br>
+     * 
+     * parameter can be overridden in this way.
+     * 
      * @param config static configuration 
      *
@@ -668,24 +652,39 @@
      */
     public static VloConfig switchToExternalConfig(ServletContext context) {
-
-        // retrieve parameter valies from the servlet context
+              
+        // assume that there is no file outside the package defining parameters
+
+        boolean externalConfig = false;
+        
+        // check for a reference to of such a file
 
         String fileName;
         fileName = context.getInitParameter("externalConfig");
-        
+                
         if (fileName == null) {
-            // no external config
+            // no external configuration file
         } else {
             config = (VloConfig) read(fileName, config);
         }
+        
+        /**
+         * In addition to modifications via an external configuration file,
+         * check if the current configuration needs to be modified because of a
+         * parameter defined in the context directly.
+         */        
+        String url = context.getInitParameter("solrUrl");
+        
+        if (url == null){
+            // no overruling parameter in the context 
+        } else
+        {
+            // overrule the current value of solrUrl
+
+            VloConfig.get().setSolrUrl(url);
+        }
+        
+        // return the current configuration, modified or not
 
         return config;
-    }
-    
-    /**
-     * {@literal Servlet} context members<br><br>
-     *
-     * The following defines the members corresponding to {@servlet} context
-     * parameters.
-     */    
+    }   
 }
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java	(revision 2627)
@@ -1,8 +1,3 @@
 package eu.clarin.cmdi.vlo.importer;
-
-import java.util.HashMap;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.ximpleware.AutoPilot;
@@ -10,6 +5,8 @@
 import com.ximpleware.VTDNav;
 import com.ximpleware.XPathParseException;
-
-import eu.clarin.cmdi.vlo.Configuration;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.util.HashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
@@ -72,5 +69,5 @@
         }
         vg = new VTDGen();
-        BASE_URL = Configuration.getInstance().getComponentRegistryRESTURL();
+        BASE_URL = VloConfig.get().getComponentRegistryRESTURL();
     }
 }
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java	(revision 2627)
@@ -1,13 +1,3 @@
 package eu.clarin.cmdi.vlo.importer;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.io.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import com.ximpleware.AutoPilot;
@@ -18,6 +8,13 @@
 import com.ximpleware.XPathEvalException;
 import com.ximpleware.XPathParseException;
-
-import eu.clarin.cmdi.vlo.Configuration;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CMDIParserVTDXML implements CMDIDataProcessor {
@@ -82,5 +79,5 @@
         if (index != -1) {
             String profileId = nav.toString(index).trim();
-            result = Configuration.getInstance().getComponentRegistryProfileSchema(profileId);
+            result = VloConfig.get().getComponentRegistryProfileSchema(profileId);
         }
         return result;
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java	(revision 2627)
@@ -1,11 +1,9 @@
 package eu.clarin.cmdi.vlo.importer;
 
+import eu.clarin.cmdi.vlo.CommonUtils;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import java.util.Map;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
-import eu.clarin.cmdi.vlo.CommonUtils;
-import eu.clarin.cmdi.vlo.Configuration;
 
 public class CountryNamePostProcessor implements PostProcessor {
@@ -43,5 +41,5 @@
         LOG.debug("Creating country code map.");
         try {
-            Map<String, String> result = CommonUtils.createCMDIComponentItemMap(Configuration.getInstance().getCountryComponentUrl());
+            Map<String, String> result = CommonUtils.createCMDIComponentItemMap(VloConfig.get().getCountryComponentUrl());
             return result;
         } catch (Exception e) {
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java	(revision 2627)
@@ -18,5 +18,5 @@
 
 import eu.clarin.cmdi.vlo.CommonUtils;
-import eu.clarin.cmdi.vlo.Configuration;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 
 public class LanguageCodePostProcessor implements PostProcessor{
@@ -98,5 +98,5 @@
     private Map<String, String> getTwoLetterCountryCodeMap() {
         if (twoLetterCodesMap == null) {
-            twoLetterCodesMap = createCodeMap(Configuration.getInstance().getLanguage2LetterCodeComponentUrl());
+            twoLetterCodesMap = createCodeMap(VloConfig.get().getLanguage2LetterCodeComponentUrl());
         }
         return twoLetterCodesMap;
@@ -105,5 +105,5 @@
     private Map<String, String> getThreeLetterCountryCodeMap() {
         if (threeLetterCodesMap == null) {
-            threeLetterCodesMap = createCodeMap(Configuration.getInstance().getLanguage3LetterCodeComponentUrl());
+            threeLetterCodesMap = createCodeMap(VloConfig.get().getLanguage3LetterCodeComponentUrl());
         }
         return threeLetterCodesMap;
@@ -112,5 +112,5 @@
     protected Map<String, String> getLanguageNameToIso639Map() {
     	if (languageNameToIso639Map == null) {
-    			languageNameToIso639Map = createReverseCodeMap(Configuration.getInstance().getLanguage3LetterCodeComponentUrl());
+    			languageNameToIso639Map = createReverseCodeMap(VloConfig.get().getLanguage3LetterCodeComponentUrl());
     	}
     	return languageNameToIso639Map;
@@ -119,5 +119,5 @@
     private Map<String, String> getIso639ToLanguageNameMap() {
     	if (iso639ToLanguageNameMap == null) {
-    		iso639ToLanguageNameMap = createCodeMap(Configuration.getInstance().getLanguage3LetterCodeComponentUrl());
+    		iso639ToLanguageNameMap = createCodeMap(VloConfig.get().getLanguage3LetterCodeComponentUrl());
     	}
 
@@ -151,5 +151,5 @@
             DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
             domFactory.setNamespaceAware(true);
-            URL url = new URL(Configuration.getInstance().getSilToISO639CodesUrl());
+            URL url = new URL(VloConfig.get().getSilToISO639CodesUrl());
             DocumentBuilder builder = domFactory.newDocumentBuilder();
             Document doc = builder.parse(url.openStream());
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java	(revision 2627)
@@ -2,5 +2,4 @@
 
 import eu.clarin.cmdi.vlo.CommonUtils;
-import eu.clarin.cmdi.vlo.Configuration;
 import eu.clarin.cmdi.vlo.FacetConstants;
 import eu.clarin.cmdi.vlo.config.DataRoot;
@@ -16,4 +15,8 @@
 import java.util.Map;
 import java.util.Set;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.PosixParser;
 import org.apache.commons.io.FileUtils;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -207,5 +210,5 @@
      */
     protected void initSolrServer() throws MalformedURLException {
-        String solrUrl = Configuration.getInstance().getSolrUrl();
+        String solrUrl = VloConfig.get().getSolrUrl();
         LOG.info("Initializing Solr Server on " + solrUrl);
         solrServer = new StreamingUpdateSolrServer(solrUrl, 1000, 2) {
@@ -375,30 +378,49 @@
      * @throws IOException
      */
-    public static void main(String[] args) throws IOException {
-
-        String fileName;
+    public static void main(String[] args) throws MalformedURLException, IOException {
 
         VloConfig config;
-        
-        if (args.length > 0) {
-
-            // get the file name from the command line
-            fileName = VloConfig.class.getResource(args[0]).getFile();
-            
-            // test for file existence 
-
-            // optionally, modify the configuration before starting the importer
-
-            config = VloConfig.readConfig(fileName);
-            
-            MetadataImporter importer = new MetadataImporter(config);
-            
-            importer.startImport();
-            
-            if (config.isPrintMapping()) {
-                File file = new File("xsdMapping.txt");
-                FacetMappingFactory.printMapping(file);
-                LOG.info("Printed facetMapping in " + file);
-            }
+
+        Options options = new Options();
+
+        // add t option
+        options.addOption("f", true, "use parameters specified in -f <file>");
+
+        CommandLineParser parser = new PosixParser();
+
+        try {
+            // parse the command line arguments
+            CommandLine cmd = parser.parse(options, args);
+            if (cmd.hasOption("f")) {
+                // get the value of the f option
+
+                String fileName;
+                fileName = cmd.getOptionValue("f");
+                
+                // include the full path in the name
+
+                fileName = VloConfig.class.getResource(fileName).getFile();
+
+                // optionally, check for file existence here
+                
+                // read the configuration defined in the file
+                
+                config = VloConfig.readConfig(fileName);
+
+                // optionally, modify the configuration here
+
+                MetadataImporter importer = new MetadataImporter(config);
+                importer.startImport();
+                if (config.isPrintMapping()) {
+                    File file = new File("xsdMapping.txt");
+                    FacetMappingFactory.printMapping(file);
+                    LOG.info("Printed facetMapping in " + file);
+                }
+            }
+
+        } catch (org.apache.commons.cli.ParseException ex) {
+            LOG.error("Command line parsing failed.");
+
+            // System.err.println("Command line parsing failed. " + ex.getMessage());
         }
     }
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java	(revision 2627)
@@ -1,9 +1,9 @@
 package eu.clarin.cmdi.vlo.importer;
 
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import java.io.File;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -11,6 +11,4 @@
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathFactory;
-
-import eu.clarin.cmdi.vlo.Configuration;
 import org.apache.commons.io.FileUtils;
 import org.slf4j.Logger;
@@ -53,5 +51,5 @@
 
 	private Map<String, String> getNationalProjectMapping() {
-        String mappingFileName = Configuration.getInstance().getNationalProjectMapping();
+        String mappingFileName = VloConfig.get().getNationalProjectMapping();
         if(mappingFileName == null){
             throw new RuntimeException("Configuration Error, NationalProjectMapping is null");
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 2627)
@@ -1,4 +1,9 @@
 package eu.clarin.cmdi.vlo.pages;
 
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.Resources;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import eu.clarin.cmdi.vlo.dao.AutoCompleteDao;
+import fiftyfive.wicket.basic.TruncatedLabel;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
@@ -6,5 +11,4 @@
 import java.util.Iterator;
 import java.util.List;
-
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.FacetField;
@@ -26,11 +30,4 @@
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
-
-import eu.clarin.cmdi.vlo.Configuration;
-import eu.clarin.cmdi.vlo.FacetConstants;
-import eu.clarin.cmdi.vlo.Resources;
-import eu.clarin.cmdi.vlo.config.VloConfig;
-import eu.clarin.cmdi.vlo.dao.AutoCompleteDao;
-import fiftyfive.wicket.basic.TruncatedLabel;
 
 public class FacetedSearchPage extends BasePage {
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java	(revision 2627)
@@ -1,13 +1,11 @@
 package eu.clarin.cmdi.vlo.pages;
 
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import java.io.UnsupportedEncodingException;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
-import eu.clarin.cmdi.vlo.Configuration;
-import eu.clarin.cmdi.vlo.config.VloConfig;
 
 /**
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java	(revision 2627)
@@ -1,4 +1,7 @@
 package eu.clarin.cmdi.vlo.pages;
 
+import eu.clarin.cmdi.vlo.CommonUtils;
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import java.io.IOException;
 import java.net.HttpURLConnection;
@@ -7,12 +10,5 @@
 import java.net.URLConnection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-
-import net.handle.hdllib.HandleException;
-import net.handle.hdllib.HandleResolver;
-import net.handle.hdllib.HandleValue;
-
-import org.apache.commons.httpclient.HttpMethod;
 import org.apache.wicket.behavior.SimpleAttributeModifier;
 import org.apache.wicket.markup.html.basic.Label;
@@ -23,11 +19,4 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
-import eu.clarin.cmdi.vlo.CommonUtils;
-import eu.clarin.cmdi.vlo.Configuration;
-import eu.clarin.cmdi.vlo.FacetConstants;
-import eu.clarin.cmdi.vlo.config.VloConfig;
-
-import javax.net.ssl.HttpsURLConnection;
 
 public class ResourceLinkPanel extends Panel {
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java	(revision 2627)
@@ -1,7 +1,8 @@
 package eu.clarin.cmdi.vlo.pages;
 
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.response.FacetField;
@@ -11,8 +12,4 @@
 import org.apache.wicket.IClusterable;
 import org.apache.wicket.PageParameters;
-
-import eu.clarin.cmdi.vlo.Configuration;
-import eu.clarin.cmdi.vlo.FacetConstants;
-import eu.clarin.cmdi.vlo.config.VloConfig;
 
 public class SearchPageQuery implements IClusterable {
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 2627)
@@ -55,5 +55,4 @@
 import org.slf4j.LoggerFactory;
 
-import eu.clarin.cmdi.vlo.Configuration;
 import eu.clarin.cmdi.vlo.FacetConstants;
 import eu.clarin.cmdi.vlo.Resources;
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/VloConfig.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/VloConfig.xml	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/VloConfig.xml	(revision 2627)
@@ -46,11 +46,15 @@
     <nationalProjectMapping>nationalProjectsMapping.xml</nationalProjectMapping>
     
-    <facetFields length="6">
+    <facetFields length="10">
         <facetField>collection</facetField>
+        <facetField>language</facetField>
         <facetField>continent</facetField>
-        <facetField>organisation</facetField>
         <facetField>genre</facetField>
         <facetField>country</facetField>
-        <facetField>language</facetField>
+        <facetField>subject</facetField>
+        <facetField>organisation</facetField>
+        <facetField>resourceType</facetField>
+        <facetField>dataProvider</facetField>
+        <facetField>nationalProject</facetField>
     </facetFields>
     
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/application.properties
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/application.properties	(revision 2626)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#Application properties; specifically the solrUrl to use!
-eu.clarin.cmdi.vlo.solrUrl=http://localhost:8084/vlo_solr/
-eu.clarin.cmdi.vlo.importerConfigFile=importerConfig.xml
-eu.clarin.cmdi.vlo.nationalProjectMapping=nationalProjectsMapping.xml
-eu.clarin.cmdi.vlo.componentRegistryRESTURL=http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/applicationContext.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/applicationContext.xml	(revision 2626)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-        <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	        xmlns:context="http://www.springframework.org/schema/context"
-	        xsi:schemaLocation="http://www.springframework.org/schema/beans classpath:/org/springframework/beans/factory/xml/spring-beans-2.5.xsd
-	                           http://www.springframework.org/schema/context classpath:/org/springframework/context/config/spring-context-2.5.xsd">
-    <!--
- 		        Property placeholder that allows init parameters defined in servlet context to be used as property values
- 	        (in this case admin users list)
- 		    -->
-    <!--<bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"/>
-     Nice Idea, but in practise getting some un-explained errors on the catalog server. We should try again when there is a new stack on the catalog (tomcat and so on).
-    -->
-
-    <bean id="configuration" class="eu.clarin.cmdi.vlo.Configuration" factory-method="getInstance">
-        <property name="solrUrl" value="[[SOLRURL]]" />
-
-        <!-- ImporterConfigFile and nationalProjectMapping are only used by the importer, not by the webapp! -->
-        <property name="importerConfigFile" value="XXX" />
-
-        <property name="nationalProjectMapping" value="XXX" />
-
-        <property name="componentRegistryRESTURL" value="XXX" />
-
-        <property name="IMDIBrowserUrl" value="http://corpus1.mpi.nl/ds/imdi_browser?openpath=" />
-        <property name="handleServerUrl" value="http://hdl.handle.net/" />
-        <property name="facetFields">
-            <!-- The possible values of facets are defined in the schema.xml of the solr_server installation.
-            If you want to add a facet you need to adjust this schema.xml and reindex the data.
-            -->
-            <list> <!-- List of facets to be shown as columns, the order specified is kept in the application -->
-                <value>collection</value>
-                <value>language</value>
-                <value>continent</value>
-                <value>genre</value>
-                <value>country</value>
-                <value>subject</value>
-                <value>organisation</value>
-                <value>resourceType</value>
-                <value>dataProvider</value>
-                <value>nationalProject</value>
-                <!--        <value>year</value>-->
-            </list>
-        </property>
-    </bean>
-
-</beans>
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/contextfragment.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/contextfragment.xml	(revision 2626)
+++ 	(revision )
@@ -1,9 +1,0 @@
-<Context path="[[VLOPATH]]" docBase="[[PACKAGEDIR]]/war/vlo" debug="0" privileged="true">
-<!--
-        MOMENTARILY Not used, as spring context thingy seems to have a problem with our software stack on the catalog.
-
-   <Parameter name="eu.clarin.cmdi.vlo.solrUrl" value="http://localhost/ds/vlosolr" override="false"/>
-    <Parameter name="eu.clarin.cmdi.vlo.importerConfigFile" value="/PATH/TO/IMPORTERCONFIG!"/>
-    <Parameter name="eu.clarin.cmdi.vlo.nationalProjectMapping" value="/PATH/TO/DOESN'T MATTER!"/> -->
-</Context>
-
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig.xml	(revision 2626)
+++ 	(revision )
@@ -1,39 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
- <bean id="importerConfig" class="eu.clarin.cmdi.vlo.importer.ImporterConfig">
-<property name="deleteAllFirst" value="true"/> <!-- You can delete everything first -->
-<!--    <property name="printMapping" value="true"/> Can print the mapping of facets to xpath patterns for every xsd, so it can be checked manually. -->
-   <property name="dataRoots">
-     <list>
-       <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="MPI IMDI Archive"/>
-         <property name="rootFile"
-           value="/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-
-       </bean>
-       <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="CMDI Providers"/>
-         <property name="rootFile"
-           value="/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-
-       </bean>
-        <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="OLAC Metadata Providers"/>
-         <property name="rootFile"
-           value="/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"/>
-            <property name="prefix" value="http://catalog.clarin.eu/"/>
-            <property name="tostrip" value="/lat/apache/htdocs/"/>
-       </bean>
-
-     </list>
-   </property>
- </bean>
-
-
-</beans>
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig_LOCAL.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig_LOCAL.xml	(revision 2626)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
- <bean id="importerConfig" class="eu.clarin.cmdi.vlo.importer.ImporterConfig">
-    <property name="deleteAllFirst" value="true"/>
-<!--    <property name="printMapping" value="true"/> Can print the mapping of facets to xpath patterns for every xsd, so it can be checked manually. -->
-   <property name="dataRoots">
-     <list>
-       <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="MPI IMDI Archive"/>
-         <property name="rootFile"
-           value="/Users/herste/Desktop/webapps/test-cmdi/mpi-self/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-       </bean>
-
-                <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="MPI IMDI Archive"/>
-         <property name="rootFile"
-           value="/Users/herste/Desktop/webapps/test-cmdi/lrt/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-       </bean>
-
-                <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="MPI IMDI Archive"/>
-         <property name="rootFile"
-           value="/Users/herste/Desktop/webapps/test-cmdi/providers/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-       </bean>
-
-                <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-         <property name="originName" value="MPI IMDI Archive"/>
-         <property name="rootFile"
-           value="/Users/herste/Desktop/webapps/test-cmdi/cmdi-providers/"/>
-           <property name="prefix" value="http://catalog.clarin.eu/"/>
-           <property name="tostrip" value="/lat/apache/htdocs/"/>
-       </bean>
-     </list>
-   </property>
- </bean>
-
-
-</beans>
Index: o/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig_catalog_clarin_eu.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/resources/importerConfig_catalog_clarin_eu.xml	(revision 2626)
+++ 	(revision )
@@ -1,39 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
-  <bean id="importerConfig" class="eu.clarin.cmdi.vlo.importer.ImporterConfig">
-    <property name="deleteAllFirst" value="true"/> <!-- You can delete everything first -->
-<!--    <property name="printMapping" value="true"/> Can print the mapping of facets to xpath patterns for every xsd, so it can be checked manually. -->
-    <property name="dataRoots">
-      <list>
-        <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-          <property name="originName" value="MPI IMDI Archive"/>
-          <property name="rootFile"
-            value="/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"/>
-            <property name="prefix" value="http://catalog.clarin.eu/"/>
-            <property name="tostrip" value="/lat/apache/htdocs/"/>
-
-        </bean>
-        <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-          <property name="originName" value="CMDI Providers"/>
-          <property name="rootFile"
-            value="/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"/>
-            <property name="prefix" value="http://catalog.clarin.eu/"/>
-            <property name="tostrip" value="/lat/apache/htdocs/"/>
-
-        </bean>
-         <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
-          <property name="originName" value="OLAC Metadata Providers"/>
-          <property name="rootFile"
-            value="/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"/>
-             <property name="prefix" value="http://catalog.clarin.eu/"/>
-             <property name="tostrip" value="/lat/apache/htdocs/"/>
-        </bean>
-      </list>
-    </property>
-  </bean>
-
-
-</beans>
-
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/webapp/META-INF/context.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/webapp/META-INF/context.xml	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/main/webapp/META-INF/context.xml	(revision 2627)
@@ -7,3 +7,4 @@
 <Context antiJARLocking="true" path="/vlo">
   <Parameter name="externalConfig" value="/Users/keeloo/VloConfig.xml"/>
+  <!--Parameter name="solrUrl" value="http://localhost:8084/vlo_solr/"/-->
 </Context>
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java	(revision 2627)
@@ -1,14 +1,12 @@
 package eu.clarin.cmdi.vlo;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
+import eu.clarin.cmdi.vlo.pages.SearchPageQuery;
 import org.apache.solr.client.solrj.response.FacetField;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.wicket.PageParameters;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import org.junit.Before;
 import org.junit.Test;
-
-import eu.clarin.cmdi.vlo.pages.SearchPageQuery;
 
 public class SearchPageQueryTest {
@@ -26,5 +24,5 @@
         assertEquals("*:*", q.getSolrQuery().getQuery());
         assertEquals("name,id,description", q.getSolrQuery().getFields());
-        assertEquals(6, q.getSolrQuery().getFacetFields().length);
+        assertEquals(10, q.getSolrQuery().getFacetFields().length);
         assertEquals("collection", q.getSolrQuery().getFacetFields()[0]);
         assertEquals("continent", q.getSolrQuery().getFacetFields()[1]);
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java	(revision 2627)
@@ -1,4 +1,5 @@
 package eu.clarin.cmdi.vlo;
 
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import org.apache.wicket.util.tester.WicketTester;
 import org.junit.Before;
@@ -9,10 +10,19 @@
  */
 public class TestFacetedSearchPage {
-    private WicketTester tester;
+    
+    static VloConfig testConfig;
 
     @Before
     public void setUp() {
-        // Configuration.getInstance().setSolrUrl("http://localhost:8080/vlo_solr");
-        tester = new WicketTester(new VloApplication());
+
+        WicketTester wicketTester;
+
+        String fileName = VloConfig.class.getResource("/VloConfig.xml").getFile();
+
+        testConfig = VloConfig.readTestConfig(fileName);
+
+        // optionally, modify the test configuration here
+
+        wicketTester = new WicketTester(new VloApplication(testConfig));
     }
 
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java	(revision 2627)
@@ -4,5 +4,5 @@
 import java.io.IOException;
 
-import eu.clarin.cmdi.vlo.Configuration;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import org.apache.commons.io.FileUtils;
 import org.junit.AfterClass;
@@ -29,5 +29,5 @@
         testDir.mkdir();
         testDir.deleteOnExit();
-        Configuration.getInstance().setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/");
+        VloConfig.get().setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/");
     }
 
Index: /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java	(revision 2626)
+++ /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java	(revision 2627)
@@ -3,4 +3,5 @@
 import eu.clarin.cmdi.vlo.FacetConstants;
 import eu.clarin.cmdi.vlo.VloApplication;
+import eu.clarin.cmdi.vlo.config.VloConfig;
 import org.apache.wicket.util.tester.WicketTester;
 import org.junit.Before;
@@ -10,4 +11,6 @@
 
 public class ResourceLinkPanelTest {
+    
+    static VloConfig testConfig;
 
     public static final String _SAME_STRING = "http://blabla";
@@ -16,5 +19,14 @@
     @Before
     public void setUp() {
-        new WicketTester(new VloApplication());
+        
+        WicketTester wicketTester;
+
+        String fileName = VloConfig.class.getResource("/VloConfig.xml").getFile();
+
+        testConfig = VloConfig.readTestConfig(fileName);
+
+        // optionally, modify the test configuration here
+
+        wicketTester = new WicketTester(new VloApplication(testConfig));
     }
 
Index: o/branches/vlo-2.13-param/vlo_webapp/src/test/resources/application.properties
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/resources/application.properties	(revision 2626)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#Application properties; specifically the solrUrl to use!
-eu.clarin.cmdi.vlo.solrUrl=http://localhost:8080/vlo_solr
-eu.clarin.cmdi.vlo.importerConfigFile=importerConfig.xml
-eu.clarin.cmdi.vlo.nationalProjectMapping=nationalProjectsMapping.xml
-#NOTE: FOR TESTING THESE ARE NOT SET WITH THE BEANS! THESE ARE SET IN ImporterTestcase.java
-eu.clarin.cmdi.vlo.componentRegistryRESTURL=http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/
Index: o/branches/vlo-2.13-param/vlo_webapp/src/test/resources/applicationContext.xml
===================================================================
--- /vlo/branches/vlo-2.13-param/vlo_webapp/src/test/resources/applicationContext.xml	(revision 2626)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-        <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	        xmlns:context="http://www.springframework.org/schema/context"
-	        xsi:schemaLocation="http://www.springframework.org/schema/beans classpath:/org/springframework/beans/factory/xml/spring-beans-2.5.xsd
-	                           http://www.springframework.org/schema/context classpath:/org/springframework/context/config/spring-context-2.5.xsd">
-    <!--
- 		        Property placeholder that allows init parameters defined in servlet context to be used as property values
- 	        (in this case admin users list)
- 		    -->
-    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="location" value="classpath:application.properties" />
-    </bean>
-
-    <bean id="configuration" class="eu.clarin.cmdi.vlo.Configuration" factory-method="getInstance">
-        <property name="solrUrl" value="${eu.clarin.cmdi.vlo.solrUrl}" />
-        <!--<property name="solrUrl" value="http://localhost:8080/vlo_solr" />-->
-        <!--    <property name="solrUrl" value="http://lux16.mpi.nl:8080/vlo_solr" />-->
-        <!--    <property name="solrUrl" value="http://catalog.clarin.eu:8080/vlo_solr" />-->
-        <property name="importerConfigFile" value="${eu.clarin.cmdi.vlo.importerConfigFile}" />
-        <property name="nationalProjectMapping" value="${eu.clarin.cmdi.vlo.nationalProjectMapping}" />
-        <property name="componentRegistryRESTURL" value="${eu.clarin.cmdi.vlo.componentRegistryRESTURL}" />
-
-
-        <property name="IMDIBrowserUrl" value="http://corpus1.mpi.nl/ds/imdi_browser?openpath=" />
-        <property name="handleServerUrl" value="http://hdl.handle.net/" />
-        <property name="facetFields">
-            <!-- The possible values of facets are defined in the schema.xml of the solr_server installation.
-            If you want to add a facet you need to adjust this schema.xml and reindex the data.
-            -->
-            <list> <!-- List of facets to be shown as columns, the order specified is kept in the application -->
-                <value>collection</value>
-                <value>language</value>
-                <value>continent</value>
-                <value>genre</value>
-                <value>country</value>
-                <value>subject</value>
-                <value>organisation</value>
-                <value>resourceType</value>
-                <value>dataProvider</value>
-                <value>nationalProject</value>
-                <!--        <value>year</value>-->
-            </list>
-        </property>
-    </bean>
-
-</beans>
