Index: /vlo/tags/2.13.beta.extra/CHANGES
===================================================================
--- /vlo/tags/2.13.beta.extra/CHANGES	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/CHANGES	(revision 2882)
@@ -0,0 +1,82 @@
+Bug Fixes and Features
+
+Beta release 2.13 (May 2013)
+
+A new package, eu.clarin.cmdi.vlo.config was added taking care of the web 
+application and importer's configuration. Spring is no longer used for 
+configuration; it was replaced by the Simple framework.
+
+Both the importer and the web application use the same base file for 
+configuration. This file refers to external resources like for example
+the nationalProjectsMapping.xml file. 
+
+The base VloConfig.xml file that is included in the /src/main/resources 
+directory of the package, can be replaced by an external instance. Additionally,
+the web application's context file can be used to overrule the solrUrl parameter
+defined in the packaged or external configuration file.
+
+Added the nationalProjectsMapping file to the default configuration. This means
+that it is no longer necessary to instance of the file external to the package. 
+By the default the importer and web application will look at the packaged instance.
+
+Landing page support on the result page was added; ticket 257.
+
+Heap memory consumption of the importer was limited. A parameter was added to
+to be able to tune the size of the buffer of documents waiting to be deposited 
+in the database.
+
+Repackaging was carried out. From version 2.13 the web application resides
+outside the importer package. Next to these packages the solr package is still
+there, and apart from the addition of a hidden facet supporting the landing 
+page, it has not been modified. In a future release the VLO base functions will
+be split off from the importer package.
+
+
+Release VLO 2.8 (23 may 2012):
+Many small fixes.
+Streamlined the deployment procedure.
+Added facet for the component profile (hidden facet, not shown in interface) for future use.
+Added feedback option.
+Removed the dependency on external xml stylesheets (caused a large-scale outage for spring-users around the 21st of may).
+
+Release VLO 2.5 (22 march 2012):
+Lot's of bugfixes and small enhancements.
+
+Release VLO-2.3.1 (28 June 2011):
+Disabled handleResolving to get the resource name on showResult panel, see made ticket to fix it: http://trac.clarin.eu/ticket/136. Did not work on clarin server.
+
+Release VLO-2.3 (10 June 2011):
+Most notable change is the importing now is based on conceptlink mapping, allowing the importer to automatically parse new flavours of cmdi.
+http://trac.clarin.eu/ticket/105 Create import based on conceptlinks
+http://trac.clarin.eu/ticket/129 Rename origin to collection
+http://trac.clarin.eu/ticket/131 ShowResultPage should give proper error when result can not be loaded
+http://trac.clarin.eu/ticket/98	Record with duplicate id does not show
+http://trac.clarin.eu/ticket/84	Some links are changed from orginal in the result page
+http://trac.clarin.eu/ticket/27	Show list of resources (Written or Media etc...) in Show result page
+
+Release VLO-2.2 (28 Januari 2011):
+http://trac.clarin.eu/ticket/93 Scaling of images fixed (and typo in image resolved)
+http://trac.clarin.eu/ticket/92 Breadcrumb to original vlo page added
+http://trac.clarin.eu/ticket/63 Frontpage layout changed
+http://trac.clarin.eu/ticket/55 Preprocess of imdi files in place
+Created correct links from original vlo page to new faceted browser.
+
+Release VLO-2.1 (13 Januari 2011):
+http://trac.clarin.eu/ticket/54 	Change columnheaders of results
+http://trac.clarin.eu/ticket/26 	add prev/next links to show result page
+http://trac.clarin.eu/ticket/42 	capitalization
+http://trac.clarin.eu/ticket/62 	10 facet values instead of 5
+http://trac.clarin.eu/ticket/43 	origin for LRT should be CLARIN LRT inventory
+http://trac.clarin.eu/ticket/37 	extract proper country names from country code facets
+http://trac.clarin.eu/ticket/38 	extract proper language names from language code facets
+http://trac.clarin.eu/ticket/60 	remove Unspecified and Unknown from initial facet list
+http://trac.clarin.eu/ticket/46 	open in original context for the LRT inventory
+http://trac.clarin.eu/ticket/29 	Link to correct archives based on the metadata
+http://trac.clarin.eu/ticket/45 	make all links clickable
+http://trac.clarin.eu/ticket/34 	make partner images clickable
+- Added resourceType facet (still todo for OLAC data)
+- Added resource list and links to download resources (still todo show names for handles)
+
+Release VLO-2.0 (2 December 2010):
+New implementation of the original vlo facetted browser using SOLR as a backend and the Wicket framework for the java frontend. We now support CMDI metadata only.
+- Initial version working and performing very nicely.
Index: /vlo/tags/2.13.beta.extra/DEPLOY-README
===================================================================
--- /vlo/tags/2.13.beta.extra/DEPLOY-README	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/DEPLOY-README	(revision 2882)
@@ -0,0 +1,188 @@
+
+0. What the VLO is about 
+
+   The VLO application allows faceted browsing of meta data. Before
+   being able to browse the data by using the VLO web application, it 
+   needs to be deployed and the VLO importer should be used to add
+   the meta data to the database.
+
+1. The archive
+
+   The VLO importer and web application are contained in an
+   archive. In the case of version 2.13, the archive is named
+
+   vlo_parent-2.13-Distribution.tar.gz 
+
+   Deploying the VLO application means:
+   - unpacking the archive in a suitable location
+   - unpacking the war files contained in the archive
+   - adapt the application's context files
+   and 
+   - adapt the VloConfig.xml main configuration file.
+
+2. Archive unpacking
+
+   Unpack the archive, for example 
+
+   vlo_parent-2.13-Distribution.tar.gz
+
+   in a temporary directory temp. Copy the contents of the vlo_parent-2.13 
+   directory just created to a permanent directory, vlo, for example. In the
+   tree starting in vlo, the VLO configuration is stored. Also, from the 
+
+   vlo/bin
+   
+   directory, you can run the importer application.
+
+3. Solr server installation
+
+   The VLO importer and web application use Solr as their database
+   server. To install this server, first stop the Tomcat server:
+
+   /etc/init.d/tomcat6 stop 
+
+   Next, copy the Solr server web application archive to the Tomcat 
+   server web application directory. This could for example be
+
+   /var/lib/tomcat6/webapps
+
+   Step into this directory, apps,
+
+   cd apps
+ 
+   cp temp/vlo_parent-2.13/war/solr.war .
+
+   If it does not exist, create the vlo_solr directory, and unpack the web 
+   application archive in it: 
+
+   cd vlo_solr
+   unzip ../solr.war  
+
+   In apps/META-INF/context.xml file you modify the solr/home parameter to the
+   path where the solr server finds its configuration and stores its data:
+
+   vlo/config/solr 
+
+   Copy the new context.xml file to the Tomcat configuration:
+
+   cp apps/META-INF/context.xml \ 
+   /var/lib/tomcat6/conf/Catalina/localhost/vlo_solr.xml
+
+   If you would like logging to be configured different from the type of 
+   logging packaged, please modify 
+
+   apps/WEB-INF/classes/log4j.properties
+
+   If necessary, change the ownership of the files in the tree starting in 
+
+   vlo/config/solr
+
+   to the Tomcat user, so that the solr server can store data in it.
+
+   Finally, start the Tomcat server:
+
+   /etc/init.d/tomcat6 start
+
+   To be sure the Solr server is working as it should, please inspect the Tomcat
+   log file directory, and inspect the solr.log file.
+
+4. Web application installation
+
+   Similar to the Solr archive, stop the Tomcat server, and unpack 
+
+   temp/vlo_parent-2.13/war/vlo.war in 
+   
+   the  
+
+   apps/vlo 
+
+   directory.
+
+   Because the packaged configuration is suitable to very specific (development)
+   circumstances only, in most cases it does fit the production environment. You
+   can specify an alternative, external configuration file, preferably the same 
+   file as the one used by the importer (see 5). Please modify 
+
+   apps/META-INF/context.xml
+
+   by adding a reference to an external configuration file. By modifying this
+   file, you can adapt the VLO configuration to your needs. You might, for
+   example, need to assign another value to the solrUrl parameter also. This 
+   parameter is used to let the VLO web application know where it can reach the
+   Solr server.
+
+   Instead of changing the value of the solrUrl parameter in the external 
+   configuration file, you could also supply an alternative value by adding 
+   the parameter to 
+
+   apps/META-INF/context.xml
+
+   directly. The comments in this file will tell you how to add the parameter.
+
+   Like in the case of the Solr server, copy the apps/META-INF/context.xml 
+   context file to:
+
+   /var/lib/tomcat6/conf/Catalina/localhost/vlo.xml
+
+   or to another, comparable path. 
+
+   If you like, you can change the web application's way of logging. This time, 
+   modifications should be applied to:
+
+   apps/WEB-INF/classes/log4j.properties
+
+   Finally, start the Tomcat server, and inspect the Tomcat log file directory, 
+   especially the vlo.log file.
+
+5. Importer configuration
+
+   As mentioned in the description of the web application installation, a 
+   typical setup needs an external configuration file. For consistency reasons
+   both the web application and application that imports data into the Solr
+   data base should use one and the same configuration file. So if, for example, 
+   the web application's configuration is in 
+
+   path/VloConfig.xml, add 
+
+   -c path/VloConfig.xml
+
+   to the command in the importer script in the vlo/bin directory.
+
+   Most likely, in the configuration file, the dataRoot values need to be 
+   changed. This is what a dataRoot definition could look like:
+
+
+   <originName>MPI self harvest</originName>
+     <rootFile>/var/www/vlomd/self/</rootFile>            
+     <prefix>http://m12404423/vlomd/</prefix>
+     <tostrip>/var/www/vlomd/</tostrip>
+     <deleteFirst>false</deleteFirst>
+   </DataRoot>
+
+   A dataRoot element describes the meta data files. The toStrip part of the
+   description is left out of the rootFile part to create a http link to the
+   meta data; the links starts with the prefix.
+
+   Apart from the dataRoot values, the solrUrl parameter might need to be
+   changed. Please note that the context path value defined in
+
+   /var/lib/tomcat6/conf/Catalina/localhost/vlo_solr.xml 
+
+   or in a file equivalent to this one, should be reflected in the value of 
+   this parameter.
+
+   Whenever the definition of the database changes, it is recommended to clear
+   the database before starting an importer run. To do this, make sure that the
+   'deletaAllFirst' parameter equals true before the run. After that, the 
+   original value of the parameter could be restored.
+
+6. Importing data
+
+   You can run the importer by starting the 
+
+   ./vlo_solr_importer.sh
+
+   script in the vlo/bin directory. Messages are logged to the console. Because 
+   meta data is not static, it is recommended to run the importer a couple of 
+   times a week. Please note that, given the current (04.2013) set of data, a  
+   run typically takes between four and file hours.
Index: /vlo/tags/2.13.beta.extra/LICENCE
===================================================================
--- /vlo/tags/2.13.beta.extra/LICENCE	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/LICENCE	(revision 2882)
@@ -0,0 +1,1 @@
+GLP3
Index: /vlo/tags/2.13.beta.extra/pom.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/pom.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/pom.xml	(revision 2882)
@@ -0,0 +1,54 @@
+<?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>
+    <groupId>eu.clarin.cmdi</groupId>
+    <artifactId>vlo_parent</artifactId>
+    <name>Virtual Language Observatory</name>
+    <packaging>pom</packaging>
+    
+    <!-- When updating the version number here, also update the version number
+         in each module's pom.xml
+    -->
+    <version>2.13</version>
+    
+    <description>Virtual Language Observatory (VLO) parent project</description>
+
+    <modules>
+        <module>vlo_solr</module>
+        <module>vlo_web_app</module>
+        <module>vlo_importer</module>
+    </modules>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/installPackageBuilder.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
+                        <phase>package</phase> <!-- bind to the packaging phase -->
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
Index: /vlo/tags/2.13.beta.extra/src/main/assembly/installPackageBuilder.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/src/main/assembly/installPackageBuilder.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/src/main/assembly/installPackageBuilder.xml	(revision 2882)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Provides a pretty Assembly output.
+    According to the official MPI packaging scheme (as mandated by the application managers).
+    It aims at the following structure:
+    /vlo-${VERSION}
+        /doc
+        /bin/importer (importer-stuff here)
+        /config (all config stuff here)
+            /solr (the solr config directory
+            /vlo (the vlo context fragment with which parameters to use)
+        /war
+            /solr (the solr war)
+            /vlo (the vlo war)
+-->
+<assembly>
+    <id>Distribution</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <fileSets>
+
+<!-- DOCS -->
+        <fileSet>
+            <directory>docs</directory>
+            <includes>
+                <include>*.*</include>
+            </includes>
+            <outputDirectory>doc</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>vlo_web_app</directory>
+            <includes>
+                <include>CHANGES</include>
+                <include>DEPLOY-README</include>
+            </includes>
+            <outputDirectory>doc</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>.</directory>
+            <includes>
+                <include>DEPLOY-README</include>
+            </includes>
+            <outputDirectory>doc</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>vlo_solr</directory>
+            <includes>
+                <include>README.TXT</include>
+            </includes>
+            <outputDirectory>doc/vlosolr</outputDirectory>
+        </fileSet>
+<!-- IMPORTER -->
+        <!-- Jar File -->
+        <fileSet>
+            <directory>vlo_importer/target</directory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+            <outputDirectory>bin</outputDirectory>
+        </fileSet>
+        <!-- run script -->
+        <fileSet>
+            <directory>vlo_importer/src/main/bin</directory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+            <fileMode>0755</fileMode>
+            <outputDirectory>bin</outputDirectory>
+        </fileSet>
+        <!-- config files -->
+        <fileSet>
+            <directory>vlo_importer/src/main/bin</directory>
+            <includes>
+                <include>*.properties</include>
+            </includes>
+            <outputDirectory>bin</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>vlo_importer/src/main/resources</directory>
+            <includes>
+                <include>cmdi2xhtml.xsl</include>
+                <include>facetConcepts.xml</include>
+                <include>nationalProjectsMapping.xml</include>
+                <include>VloConfig.xml</include>
+            </includes>
+            <outputDirectory>bin</outputDirectory>
+        </fileSet>
+<!-- WEB APPLICATION -->
+        <!-- WAR FILE -->
+        <fileSet>
+            <directory>vlo_web_app/target</directory>
+            <includes>
+                <include>*.war</include>
+            </includes>
+            <outputDirectory>war</outputDirectory>
+        </fileSet>
+        <!-- config -->
+        <fileSet>
+            <directory>vlo_web_app/src/main/resources</directory>
+            <includes>
+                <include>VloConfig.xml</include>
+            </includes>
+            <outputDirectory>config</outputDirectory>
+        </fileSet> 
+
+<!-- SOLR SERVER -->
+        <!-- SOLR WAR FILE -->
+        <fileSet>
+            <directory>vlo_solr/target</directory>
+            <includes>
+                <include>*.war</include>
+            </includes>
+            <outputDirectory>war</outputDirectory>
+        </fileSet>
+
+        <!-- SOLR CONFIG -->
+        <fileSet>
+            <directory>vlo_solr/target/vlo_solr-3.6.0-vlo_solr_conf</directory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+            <outputDirectory>config/</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>vlo_solr/target/vlo_solr-3.6.0-vlo_solr_conf</directory>
+            <includes>
+                <include>vlo_solr.xml</include>
+            </includes>
+            <outputDirectory>config</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/dependencies/README
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/dependencies/README	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/dependencies/README	(revision 2882)
@@ -0,0 +1,7 @@
+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 handle-client and vtd-xml:
+
+mvn install:install-file -Dfile=vtd-xml.jar -DgroupId=com.ximpleware -DartifactId=vtd-xml -Dversion=2.10 -Dpackaging=jar
+mvn install:install-file -Dfile=handle-client.jar -DgroupId=net.handle -DartifactId=handle-client -Dversion=7.0 -Dpackaging=jar
Index: /vlo/tags/2.13.beta.extra/vlo_importer/nbactions.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/nbactions.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/nbactions.xml	(revision 2882)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+        <action>
+            <actionName>run</actionName>
+            <goals>
+                <goal>process-classes</goal>
+                <goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal>
+            </goals>
+            <properties>
+                <exec.args>-DconfigFile=/Users/keeloo/VloConfig.xml -classpath %classpath eu.clarin.cmdi.vlo.importer.MetadataImporter</exec.args>
+                <exec.executable>java</exec.executable>
+                <exec.classpathScope>runtime</exec.classpathScope>
+            </properties>
+        </action>
+        <action>
+            <actionName>debug</actionName>
+            <goals>
+                <goal>process-classes</goal>
+                <goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal>
+            </goals>
+            <properties>
+                <exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -DconfigFile=/Users/keeloo/VloConfig.xml -classpath %classpath eu.clarin.cmdi.vlo.importer.MetadataImporter</exec.args>
+                <exec.executable>java</exec.executable>
+                <exec.classpathScope>runtime</exec.classpathScope>
+                <jpda.listen>true</jpda.listen>
+            </properties>
+        </action>
+        <action>
+            <actionName>profile</actionName>
+            <goals>
+                <goal>process-classes</goal>
+                <goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal>
+            </goals>
+            <properties>
+                <exec.args>${profiler.args} -DconfigFile=/Users/keeloo/VloConfig.xml -classpath %classpath eu.clarin.cmdi.vlo.importer.MetadataImporter</exec.args>
+                <exec.executable>${profiler.java}</exec.executable>
+            </properties>
+        </action>
+            
+</actions>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/pom.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/pom.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/pom.xml	(revision 2882)
@@ -0,0 +1,272 @@
+<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/maven-v4_0_0.xsd"
+
+>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>eu.clarin.cmdi</groupId>
+
+    <artifactId>vlo</artifactId> <!-- kj: change this to vlo_importer on 
+
+    splitoff from base, the base could have vlo as its identity -->
+
+    <packaging>jar</packaging>
+
+    <version>2.13</version>
+    <name>vlo_importer</name>
+    <description></description>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <packaging>jar</packaging>
+        <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <filtering>true</filtering>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <filtering>false</filtering>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.html</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+        </resources>
+        
+        <plugins>
+            <!-- add the remote resources plugin to make the cmdi2xhtml.xml
+                 file available to the web application. For more information
+                 on this plugin, please refer the Apache Maven Project website
+            -->
+            <plugin>
+                <artifactId>maven-remote-resources-plugin</artifactId>
+                <version>1.4</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <includes>
+                        <include>**/*.xsl</include>
+                    </includes>
+                </configuration>
+            </plugin>
+  
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+            <!--<plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>make-a-jar</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <classesDirectory>target/classes</classesDirectory>
+                    <includes>
+                        <include>**/*</include>
+                    </includes>
+                    <archive>
+                        <index>false</index>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <classpathPrefix>. lib/</classpathPrefix>
+                            <mainClass>eu.clarin.cmdi.vlo.importer.MetadataImporter</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>-->
+            <!--<plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>-->
+            <!--<plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/buildwar.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assemblyW</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>-->
+            <!-- NOTE: Run importer from jar file with -cp .:$filename.jar eu.clarin.cmdi.vlo.importer.MetadataImporter -->
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/buildjar.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assemblyJ</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>55Minutes_wicket</id>
+            <name>55Minutes opensource wicket extensions</name>
+            <url>http://opensource.55minutes.com/maven/</url>
+        </repository>
+    </repositories>
+
+    <dependencies>
+            <dependency>
+            <groupId>net.handle</groupId>
+            <artifactId>handle-client</artifactId>
+            <version>7.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.solr</groupId>
+            <artifactId>solr-solrj</artifactId>
+            <version>3.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.wicket</groupId>
+            <artifactId>wicket</artifactId>
+            <version>1.4.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.wicket</groupId>
+            <artifactId>wicket-extensions</artifactId>
+            <version>1.4.8</version>
+        </dependency>
+        <dependency>
+            <groupId>com.55minutes</groupId>
+            <artifactId>fiftyfive-wicket</artifactId>
+            <version>2.0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.14</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <version>6.1.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty-util</artifactId>
+            <version>6.1.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty-management</artifactId>
+            <version>6.1.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.ximpleware</groupId>
+            <artifactId>vtd-xml</artifactId>
+            <version>2.10</version>
+        </dependency>		
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <version>2.4</version>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>Saxon-HE</artifactId>
+            <version>9.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.simpleframework</groupId>
+            <artifactId>simple-xml</artifactId>
+            <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/tags/2.13.beta.extra/vlo_importer/src/main/assembly/buildjar.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/assembly/buildjar.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/assembly/buildjar.xml	(revision 2882)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+    <id>importer</id> <!-- name of the jar that needs to be assembled -->
+    <formats>
+        <format>jar</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <!-- classes: end up in packages -->
+        <fileSet>
+            <directory>target/classes</directory>
+            <includes>
+                <include>**/*.*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+
+        <!-- resources: end up in the default package -->
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <includes>
+                <include>**/*.*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+
+    </fileSets>
+
+    <dependencySets>
+        <dependencySet>
+            <includes>
+                <include>*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+            <unpack>true</unpack>
+        </dependencySet>
+    </dependencySets>
+
+</assembly>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/log4j.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/log4j.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/log4j.properties	(revision 2882)
@@ -0,0 +1,12 @@
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%d %p [%c{1}#%M:%L] - %m%n
+log4j.appender.Stdout.encoding=UTF-8
+
+log4j.rootLogger=INFO,Stdout
+
+log4j.logger.org.springframework=ERROR
+log4j.logger.org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer=ERROR
+
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/vlo_solr_importer.sh
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/vlo_solr_importer.sh	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/bin/vlo_solr_importer.sh	(revision 2882)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# This means it the script only works started from the bin directory, adjust the
+# workdir if you installed this somewhere and want to run it from anywhere.
+
+# Filter of the Error stream from which to prevent the admins from getting daily
+#  "can't find java" emails
+JAVA=`which java 2>/dev/null`
+if [  -z $JAVA ]; then
+#set java for mpi servers
+JAVA=/lat/java/bin/java
+fi
+
+# Please specify the configuration to the importer via a system property or via
+# the command line. In case of a property add 
+#
+# -DconfigFile=<pathToConfigFile>
+#
+# and in case of the command line, add
+#
+# -c <pathToConfigFile>
+#
+# to the JAVA command. Please note the a specification on the command line will
+# take preference over a specification as a property.
+
+$JAVA -Xmx1024M -cp .:vlo-2.13-importer.jar eu.clarin.cmdi.vlo.importer.MetadataImporter 
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/CommonUtils.java	(revision 2882)
@@ -0,0 +1,134 @@
+package eu.clarin.cmdi.vlo;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+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 org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public final class CommonUtils {
+
+    private final static Set<String> ANNOTATION_MIMETYPES = new HashSet<String>();
+    static {
+        ANNOTATION_MIMETYPES.add("text/x-eaf+xml");
+        ANNOTATION_MIMETYPES.add("text/x-shoebox-text");
+        ANNOTATION_MIMETYPES.add("text/x-toolbox-text");
+        ANNOTATION_MIMETYPES.add("text/x-chat");
+        ANNOTATION_MIMETYPES.add("text/x-chat");
+        ANNOTATION_MIMETYPES.add("application/mediatagger");
+        ANNOTATION_MIMETYPES.add("mt");
+        ANNOTATION_MIMETYPES.add("application/smil+xml");
+    }
+    private final static Set<String> TEXT_MIMETYPES = new HashSet<String>();
+    static {
+        TEXT_MIMETYPES.add("application/pdf");
+        TEXT_MIMETYPES.add("txt");
+    }
+    private final static Set<String> VIDEO_MIMETYPES = new HashSet<String>();
+    static {
+        VIDEO_MIMETYPES.add("application/mxf");
+    }
+    private final static Set<String> AUDIO_MIMETYPES = new HashSet<String>();
+    static {
+        AUDIO_MIMETYPES.add("application/ogg");
+        AUDIO_MIMETYPES.add("wav");
+    }
+
+    private CommonUtils() {
+    }
+
+    public static String normalizeMimeType(String mimeType) {
+        String type = mimeType;
+        if (type != null) {
+            type = type.toLowerCase();
+        } else {
+            type = "";
+        }
+        String result = "unknown type";
+        if (ANNOTATION_MIMETYPES.contains(type)) {
+            result = FacetConstants.RESOURCE_TYPE_ANNOTATION;
+        } else if (type.startsWith("audio") || AUDIO_MIMETYPES.contains(type)) {
+            result = FacetConstants.RESOURCE_TYPE_AUDIO;
+        } else if (type.startsWith("video") || VIDEO_MIMETYPES.contains(type)) {
+            result = FacetConstants.RESOURCE_TYPE_VIDEO;
+        } else if (type.startsWith("image")) {
+            result = FacetConstants.RESOURCE_TYPE_IMAGE;
+        } else if (type.startsWith("audio")) {
+            result = FacetConstants.RESOURCE_TYPE_AUDIO;
+        } else if (type.startsWith("text") || TEXT_MIMETYPES.contains(type)) {
+            result = FacetConstants.RESOURCE_TYPE_TEXT;
+        }
+        return result;
+    }
+
+    /**
+     * Create a mapping out of simple CMDI components for instance: lists of items: <item AppInfo="Tigrinya (ti)">ti</item> Will become key (after removal of trailing 2 or 3 letter codes),
+     * values: ti, Tigrinya
+     * @param urlToComponent
+     * @return Map with item_value, AppInfo_value pairs
+     * @throws XPathExpressionException
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Map<String, String> createCMDIComponentItemMap(String urlToComponent) throws XPathExpressionException, SAXException,
+            IOException, ParserConfigurationException {
+        Map<String, String> result = new HashMap<String, String>();
+        DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+        domFactory.setNamespaceAware(true);
+        URL url = new URL(urlToComponent);
+        DocumentBuilder builder = domFactory.newDocumentBuilder();
+        Document doc = builder.parse(url.openStream());
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        NodeList nodeList = (NodeList) xpath.evaluate("//item", doc, XPathConstants.NODESET);
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            String shortName = node.getTextContent();
+            String longName = node.getAttributes().getNamedItem("AppInfo").getNodeValue().replaceAll(" \\([a-zA-Z]+\\)$", "");
+            result.put(shortName.toUpperCase(), longName);
+        }
+        return result;
+    }
+    
+    /**
+     * Create a mapping out of simple CMDI components for instance: lists of items: <item AppInfo="Tigrinya">ti</item> Will become key (after removal of trailing 2 or 3 letter codes),
+     * values: Tigrinya, ti
+     * @param urlToComponent
+     * @return Map with item_value, AppInfo_value pairs
+     * @throws XPathExpressionException
+     * @throws IOException
+     * @throws SAXException
+     * @throws ParserConfigurationException
+     */
+    public static Map<String, String> createReverseCMDIComponentItemMap(String urlToComponent) throws XPathExpressionException, SAXException,
+            IOException, ParserConfigurationException {
+        Map<String, String> result = new HashMap<String, String>();
+        DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+        domFactory.setNamespaceAware(true);
+        URL url = new URL(urlToComponent);
+        DocumentBuilder builder = domFactory.newDocumentBuilder();
+        Document doc = builder.parse(url.openStream());
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        NodeList nodeList = (NodeList) xpath.evaluate("//item", doc, XPathConstants.NODESET);
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            String shortName = node.getTextContent();
+            String longName = node.getAttributes().getNamedItem("AppInfo").getNodeValue().replaceAll(" \\([a-zA-Z]+\\)$", "");
+            result.put(longName, shortName.toUpperCase());
+        }
+        return result;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java	(revision 2882)
@@ -0,0 +1,55 @@
+package eu.clarin.cmdi.vlo;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+
+/**
+ * Definition of facet, resource type and URL constants.
+ */
+public class FacetConstants {
+
+    public static final String FIELD_NAME = "name";
+    public static final String FIELD_ID = "id";
+    public static final String FIELD_DATA_PROVIDER = "dataProvider";
+    public static final String FIELD_DESCRIPTION = "description";
+    public static final String FIELD_COLLECTION = "collection";
+    public static final String FIELD_COUNTRY = "country";
+    public static final String FIELD_CONTINENT = "continent";
+    public static final String FIELD_LANGUAGE = "language";
+    public static final String FIELD_LANGUAGES = "languages";
+    public static final String FIELD_YEAR = "year";
+    public static final String FIELD_GENRE = "genre";
+    public static final String FIELD_SUBJECT = "subject";
+    public static final String FIELD_ORGANISATION = "organisation";
+    public static final String FIELD_RESOURCE_TYPE = "resourceType";
+    public static final String FIELD_PROJECT_NAME = "projectName";
+    public static final String FIELD_COMPLETE_METADATA = "metadataSource";
+    public static final String FIELD_NATIONAL_PROJECT = "nationalProject";
+    public static final String FIELD_TAG = "tag";
+    
+    //The _ facets are not meant to be shown to users.
+    public static final String FIELD_FILENAME = "_fileName";
+    public static final String FIELD_RESOURCE = "_resourceRef";
+    public static final String FIELD_CLARIN_PROFILE = "_componentProfile";
+    public static final String FIELD_SEARCH_SERVICE = "_contentSearchRef";
+    
+    /** Facet constant associated with the landing page type. */
+    public static final String FIELD_LANDINGPAGE = "_landingPageRef";
+    /** Facet constant associated with the search page type. */
+    public static final String FIELD_SEARCHPAGE = "_searchPageRef";
+    
+    // PREFIX URL for the language-link    
+    public static final String LANGUAGE_LINK_PREFIX = VloConfig.getLanguageLinkPrefix();
+
+    //Normalized mimeTypes
+    public static final String RESOURCE_TYPE_AUDIO = "audio";
+    public static final String RESOURCE_TYPE_VIDEO = "video";
+    public static final String RESOURCE_TYPE_TEXT = "text";
+    public static final String RESOURCE_TYPE_IMAGE = "image";
+    public static final String RESOURCE_TYPE_ANNOTATION = "annotation";
+
+    public static final String HANDLE_MPI_PREFIX = "hdl:1839";
+    public static final String HANDLE_PREFIX = "hdl:";
+    public static final String TEST_HANDLE_MPI_PREFIX = "test-hdl:1839";
+    public static final String FIELD_RESOURCE_SPLIT_CHAR = "|";
+    public static final String URN_NBN_PREFIX = "urn:nbn";
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/Resources.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/Resources.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/Resources.java	(revision 2882)
@@ -0,0 +1,40 @@
+
+package eu.clarin.cmdi.vlo;
+
+/**
+ * Definition of keys to message texts.
+ * 
+ * Please note that value of a key defined in this class is defined in the
+ * VloWebApplication.properties file. The key value pairs can be used in HTML
+ * pages that are subject to Wicket, for example:<br><br>
+ *
+ * {@literal <div class="resourceList"><span>}<br>
+ * .<br>
+ * .<br>
+ * {@literal <wicket:message key="resources">}<br>
+ * {@literal [Resources]}<br>
+ * {@literal </wicket:message>:</span>}<br>
+ * .<br>
+ * .<br>
+ * {@literal </div>}
+ */
+public interface Resources {
+    
+    public static final String FIELD = "field";
+    public static final String NO_RESOURCE_FOUND = "noResourceFound";
+    public static final String VALUE = "value";
+    public static final String RESULTS = "results";
+    public static final String NAME = "name";
+    public static final String DESCRIPTION = "description";
+    public static final String OPEN_IN_ORIGINAL_CONTEXT = "openInOriginalContext";
+    public static final String ORIGINAL_CONTEXT_NOT_AVAILABLE = "originalContextNotAvailable";  
+    
+    /** Key to a text on the result page labeling a single landing page. */
+    public static final String LANDING_PAGE = "landingPage";    
+    /** Key to a text on the result page labeling s list of landing pages. */
+    public static final String LANDING_PAGES = "landingPages";    
+    /** Key to a text on the result page labeling a single search page. */
+    public static final String SEARCH_PAGE = "searchPage";    
+    /** Key to a text on the result page labeling a list of search pages.*/
+    public static final String SEARCH_PAGES = "searchPages";    
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/StringUtils.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/StringUtils.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/StringUtils.java	(revision 2882)
@@ -0,0 +1,46 @@
+package eu.clarin.cmdi.vlo;
+
+public final class StringUtils {
+
+    /**
+     * Converts a newlines in to html (&lt;br/&gt;), not using &lt;p&gt; because it renders differently on firefox/safari/chrome/ie etc...
+     * Heavily inspired on: 
+     * {@link org.apache.wicket.markup.html.basic.MultiLineLabel} 
+     * {@link org.apache.wicket.util.string.Strings#toMultilineMarkup(CharSequence)} 
+     * 
+     * @param s
+     */
+    public static CharSequence toMultiLineHtml(CharSequence s) {
+        StringBuilder result = new StringBuilder();
+        if (s == null) {
+            return result;
+        }
+        int newlineCount = 0;
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            switch (c) {
+            case '\n':
+                newlineCount++;
+                break;
+            case '\r':
+                break;
+            default:
+                if (newlineCount == 1) {
+                    result.append("<br/>");
+                } else if (newlineCount > 1) {
+                    result.append("<br/><br/>");
+                }
+                result.append(c);
+                newlineCount = 0;
+                break;
+            }
+        }
+        if (newlineCount == 1) {
+            result.append("<br/>");
+        } else if (newlineCount > 1) {
+            result.append("<br/><br/>");
+        }
+        return result;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFilePersister.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFilePersister.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFilePersister.java	(revision 2882)
@@ -0,0 +1,186 @@
+
+package eu.clarin.cmdi.vlo.config;
+
+import java.io.File;
+import java.io.InputStream;
+import org.simpleframework.xml.core.Persister;
+
+/**
+ * Mapping of XML definitions to class members<br><br>
+ *
+ * A ConfigFilePersister class object can, by means of the Simple framework,
+ * interpret definitions in an XML file and assign the values defined to members
+ * in a class that have been annotated according to the Simple framework
+ * specifications. Next to reading, a persister object can also turn annotated
+ * members and their values into an XML definition and write it to a
+ * file.<br><br>
+ *
+ * Annotating a class amounts to prepending annotations to members in it. When
+ * the framework applies an XML file containing the element<br><br>
+ *
+ * {@literal <text>this is an example</text>}<br><br>
+ *
+ * to a class containing<br><br>
+ *
+ * {@literal @Element}<br> 
+ * {@literal String text;}<br><br>
+ *
+ * the value of this member will be equal to<br><br>
+ *
+ * {@literal 'this is an example'}<br><br>
+ *
+ * Apart from elements, the Simple framework can also generate attributes and
+ * lists. For more examples, please refer to the Simple web site.<br><br>
+ * 
+ * Checklist<br><br>
+ * 
+ * A ConfigFilePersister object can successfully process a message sent
+ * to it successfully, only if it's logger member has been initialized. In other 
+ * words: before using a persister object, the interface defined here should
+ * be implemented and passed to the object.
+ * 
+ * @author keeloo
+ */
+public class ConfigFilePersister {
+
+    /**
+     * Interface to a logger object<br><br>
+     *
+     * Definition of what the ConfigFilePersister class expects from a method
+     * that takes care of logging. All messages that will be send to a logger
+     * object are rated as severe.
+     */
+    public interface Logger {
+
+        /**
+         * @param object message to be logged
+         */
+        public void log(Object object);
+    }
+    
+    /**
+     * The type of the annotated object
+     */
+    private Class configClass;
+    
+    /**
+     * The annotated object
+     */
+    private Object configObject;
+    
+    /**
+     * The absolute name of the XML file defining the members of the annotated 
+     * class.
+     */
+    private String fileName;
+    
+    /**
+     * Interface object taking care of logging<br><br>
+     *
+     * Before sending a ConfigFromFile or ConfigToFile message to a
+     * ConfigFilePersister object, initialize the logger member by sending the
+     * object a setLogger message first.
+     */
+    private static Logger logger;
+    
+    /**
+     * Interface object initialization
+     * 
+     * @param someLogger 
+     */
+    public static void setLogger (Logger someLogger){
+        logger = someLogger;
+    }
+    
+    private Persister persister;
+
+    /**
+     * Constructor method
+     *
+     * @param object an object whose annotated members will be initialized from
+     * or written to definitions in the XML file. On reading, an object may be
+     * equal to null.<br>
+     *
+     * @param name the name of the XML file which an annotated object is read
+     * from or written to.<br>
+     *
+     */
+    public ConfigFilePersister(Object object, String name) {
+        // associate the name of the file and the object with the persister
+        fileName = name;
+        configObject = object;
+        
+        // create the Simple framework object that ensures persistance
+        persister = new Persister();
+
+        // remember the class to which the object belongs 
+        configClass = object.getClass();
+    }
+
+    /**
+     * Read definitions from an XML file<br><br>
+     *
+     * Assign the values defined in the elements of the XML file to the
+     * annotated members of the object.<br><br>
+     *
+     * If the file cannot be opened or the annotation of the class does not
+     * conform to the specifications of the Simple framework, an exception will
+     * be raised, and an error will be logged.<br><br>
+     *
+     * @return the object if the file conforms to the specification, null
+     * otherwise
+     */
+    public Object ConfigFromFile() {
+        
+        Object object = null;
+
+        // try to resolve the absolute name of the configuration file to a stream
+        InputStream sourceAsStream;
+        sourceAsStream = ConfigFilePersister.class.getResourceAsStream(fileName);
+
+        if (sourceAsStream == null) {
+            
+            // the resource cannot be found inside the package, try outside
+            File sourceAsFile; 
+            
+            sourceAsFile = new File(fileName);
+            try {
+                object = persister.read(configClass, sourceAsFile, true);
+            } catch (Exception e) {
+                logger.log(e);
+            }
+            
+        } else {
+            // the resource can be found in eu.clarin.cmdi.vlo.config
+            try {
+                object = persister.read(configClass, sourceAsStream, true);
+            } catch (Exception e) {
+                logger.log(e);
+            }
+        }
+
+        return object;
+    }
+
+    /**
+     * Write definitions to an XML file<br><br>
+     *
+     * Write the values of the annotated members of the object passed to the
+     * constructor to an XML file.<br><br>
+     *
+     * If the file cannot be created or the annotation of the class does not
+     * conform to the specifications of the Simple framework, an exception will
+     * be raised, and an error will be logged.
+     */
+    public void ConfigToFile() {
+
+        File configTarget;
+        configTarget = new File(fileName);
+
+        try {
+            persister.write(configObject, configTarget);
+        } catch (Exception e) {
+            logger.log(e);
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFromFile.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFromFile.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/ConfigFromFile.java	(revision 2882)
@@ -0,0 +1,75 @@
+
+package eu.clarin.cmdi.vlo.config;
+
+/**
+ * Parameter configuration<br><br>
+ *
+ * Add parameters to an application by extending this class. The read method
+ * assigns values to the new members by reading an XML definition from a file.
+ *
+ * Configuration is the process of reading the definitions and assigning values.
+ * A configuration, the set of members extending this class, is the result of
+ * this process.<br><br>
+ *
+ * Next to reading parameter values from a file, by means of the write method,
+ * a ConfigFileParam class object can also reflect the assigned values back to
+ * an XML file.<br><br>
+ *
+ * Note: {@literal maven} can also control parameters. This type of control
+ * applies to the source level, and in that sense not visible to the parameter
+ * mechanism defined here.<br><br>
+ *
+ * Checklist.<br><br>
+ *
+ * An extending class needs to implement the getFileName method.
+ *
+ * @author keeloo
+ */
+public class ConfigFromFile {
+
+    /**
+     * Empty constructor
+     */
+    public ConfigFromFile() {
+    }
+
+    /**
+     * Configure by reading from an XML file
+     * 
+     * @param fileName the absolute name of the file to read the configuration
+     * from, for example the packaged configuration file /VloConfig.xml
+     *
+     * @param config the object whose annotated members will be assigned a value
+     * in accordance with the definition read from the XML file.
+     *
+     * @return the object with values assigned to annotated members
+     */
+    public static synchronized ConfigFromFile read(String fileName, ConfigFromFile config) {
+
+        ConfigFilePersister persister;
+        // config itself might not reference a file name
+        persister = new ConfigFilePersister(config, fileName);
+
+        // assign the members their values
+        config = (ConfigFromFile) persister.ConfigFromFile();
+        return config;
+    }
+            
+    /**
+     * Write annotated member values to an XML file.
+     *
+     * @param config the object whose annotated members and values will be
+     * written to a file in the form of an XML definition.
+     * 
+     * @param 
+     */
+     public static void write(ConfigFromFile config, String fileName) {
+        
+        ConfigFilePersister persister;
+        // config itself might not reference a file name
+        persister = new ConfigFilePersister(config, fileName);
+
+        // create the definition
+        persister.ConfigToFile();
+     }     
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/DataRoot.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/DataRoot.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/DataRoot.java	(revision 2882)
@@ -0,0 +1,254 @@
+
+package eu.clarin.cmdi.vlo.config;
+
+import java.io.File;
+import org.simpleframework.xml.Element;
+import org.simpleframework.xml.Root;
+
+/**
+ * A dataRoot describes the meta data sources.
+ * 
+ * In an XML file, a dataRoot is reflected like this:<br><br>
+ * 
+ * {@literal <DataRoot>} 
+ *      {@literal<originName>}name{@literal</originName>}
+ *      {@literal<rootFile>}topLevelMetadataDirectory/{@literal</rootFile>}
+ *      {@literal<prefix>}startOfUrl{@literal</prefix>}
+ *      {@literal<tostrip>}leftPartOfRootFile{@literal</tostrip>}
+ *      {@literal<deleteFirst>}falseOrTrue{@literal</deleteFirst>}
+ * {@literal</DataRoot>}
+ *  
+ * @author keeloo
+ */
+@Root // Simple directive 
+public class DataRoot extends Object {
+    
+    /**
+     * Constructor method
+     */
+    public DataRoot (){
+    }
+    
+    /**
+     * Constructor method
+     * 
+     * @param originName name describing the meta data
+     * @param rootFile top level directory in which the meta data is stored
+     * @param prefix left part of the rootFile
+     * @param toStrip if you want to create the URL to the meta data, this is 
+     * the part to be removed from the rootFile
+     * @param deleteFirst 
+     */
+    public DataRoot(String originName, File rootFile, String prefix, String toStrip, Boolean deleteFirst) {
+        this.originName = originName;
+        this.rootFile = rootFile;
+        this.prefix = prefix;
+        this.tostrip = toStrip;
+        this.deleteFirst = deleteFirst;
+    }
+    
+    /**
+     * Test for equality of the object itself and the object passed to it
+     * 
+     * @param dataRoot
+     * @return true if the object equals this, false otherwise
+     */
+    @Override
+    public boolean equals (Object object){
+        boolean equal = false;
+        
+        if (object == null) {
+            // define this object to be different from nothing
+        } else {
+            if (! (object instanceof DataRoot)) {
+                // the object is not a DataRoot, define it not to be equal 
+            } else {
+                equal = this.originName.equals(((DataRoot) object).originName);
+                equal = this.rootFile.equals(((DataRoot) object).rootFile) && equal;
+                equal = this.prefix.equals(((DataRoot) object).prefix) && equal;
+                equal = this.tostrip.equals(((DataRoot) object).tostrip) && equal;
+
+                equal = this.deleteFirst == ((DataRoot) object).deleteFirst && equal;
+            }
+        }
+        
+        return equal;
+    }
+
+    /**
+     * Generate by the ide
+     * 
+     * @return hash code
+     */
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 29 * hash + (this.originName != null ? this.originName.hashCode() : 0);
+        hash = 29 * hash + (this.rootFile != null ? this.rootFile.hashCode() : 0);
+        hash = 29 * hash + (this.prefix != null ? this.prefix.hashCode() : 0);
+        hash = 29 * hash + (this.tostrip != null ? this.tostrip.hashCode() : 0);
+        hash = 29 * hash + (this.deleteFirst ? 1 : 0);
+        return hash;
+    }
+
+    /**
+     * name describing the meta data
+     */
+    @Element // Simple directive
+    private String originName;
+ 
+    /**
+     * top level directory in which the meta data is stored
+     */
+    @Element
+    private File rootFile;
+    
+    /**
+     * Web equivalent of the toStrip. For example: 
+     * 
+     * /lat/apache/htdocs/
+     */
+    @Element  
+    private String prefix;
+
+    /**
+     * Left part of the rootFile 
+     *
+     * By first removing {@literal tostrip} from {@literal rootFile} and then
+     * append the result of that operation to the {@literal prefix} you obtain
+     * the URL to the meta data.
+     */
+    @Element
+    private String tostrip;
+    
+    /**
+     * Flag to signal the removal of records from the Solr server
+     * 
+     * The value of this flag overrides the value defined in the {@lieteral 
+     * VloConfig.xml} file. With the deleteFirst flag you can control the 
+     * removal of the records originating from originName.
+     */
+    @Element
+    private boolean deleteFirst = false;
+
+    /**
+     * Get the value of the prefix element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public String getPrefix() {
+        return prefix;
+    }
+
+    /**
+     * Set the value of the prefix element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @param prefix the value
+     */
+    public void setPrefix(String prefix) {
+        this.prefix = prefix;
+    }
+
+    /**
+     * Get the value of the {@literal tostrip} element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public String getToStrip() {
+        return tostrip;
+    }
+
+    /**
+     * Set the value of the {@literal tostrip} element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @param tostrip the value
+     */
+    public void setTostrip(String tostrip) {
+        this.tostrip = tostrip;
+    }
+
+    /**
+     * Get the value of the originName element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */    
+    public String getOriginName() {
+        return originName;
+    }
+
+    /**
+     * Set the value of the originName element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @param originName the value
+     */    
+    public void setOriginName(String originName) {
+        this.originName = originName;
+    }
+
+    /**
+     * Get the value of the rootFile element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */    
+    public File getRootFile() {
+        return rootFile;
+    }
+
+    /**
+     * Set the value of the rootFile element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @param rootFile the value
+     */    
+    public void setRootFile(File rootFile) {
+        this.rootFile = rootFile;
+    }
+
+    /**
+     * Set the value of the deleteFirst element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @param deleteFirst the value
+     */    
+    public void setDeleteFirst(boolean deleteFirst) {
+        this.deleteFirst = deleteFirst;
+    }
+
+    /**
+     * Get the value of the deleteFirst element<br><br>
+     *
+     * For a description of the element, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */    
+    public boolean deleteFirst() {
+        return deleteFirst;
+    }
+}
+
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java	(revision 2882)
@@ -0,0 +1,795 @@
+package eu.clarin.cmdi.vlo.config;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.List;
+import org.simpleframework.xml.Element;
+import org.simpleframework.xml.ElementArray;
+import org.simpleframework.xml.ElementList;
+import org.simpleframework.xml.Root;
+import org.slf4j.LoggerFactory;
+
+/**
+ * VLO configuration<br><br>
+ * 
+ * The annotated members in this class are the parameters by means of which
+ * you can configure a VLO application.
+ * 
+ * A member is annotated by prepending {@literal @element} to it. When the 
+ * VloConfig class is reflected into the Simple framework, the framework will
+ * assign the values it finds in the {@literal VloConfig.xml} file to the 
+ * members in the VloConfig class.
+ * 
+ * Whenever you need to add a parameter the VLO configuration, add a member 
+ * with the appropriate name and type, and prepend an at sign to the 
+ * declaration, like this:
+ * 
+ * {@literal @element}<br><br> 
+ * {@literal parameterMember}<br><br>
+ * 
+ * The XML should in this case contain a definition like
+ * 
+ * {@literal<parameterMember>} "the value of the
+ * parameter"{@literal </parameterMember>}<br><br>
+ *
+ * If you want to add a type of member that is not included in VloConfig class 
+ * yet, or if you are looking for more information on the framework, please 
+ * refer to VLO documentation.<br><br> 
+ * 
+ * In the VloConfig class, the parameters are stored statically. This means that
+ * after 
+ * 
+ * {@literal VloConfig.readPackagedConfig();}<br><br>
+ * 
+ * has been issued from a certain context, you can reference a parameter by
+ * 
+ * {@literal WebAppConfig.getSomeParameter();}<br><br>
+ *
+ * in any scope, also a scope different from the one in which the read message
+ * was send. 
+ *
+ * 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. 
+ *
+ * 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 methods, instead of having to 
+ * modify every reference to the parameter in the application. 
+ *
+ * Note on the explanation of the meaning of the parameters. Because the
+ * meaning of a parameter is not local to this class, or even not local to the
+ * configuration package, they are described in the general VLO
+ * documentation.<br><br>
+ *
+ * @author keeloo
+ */
+@Root
+public class VloConfig extends ConfigFromFile {
+
+    /** 
+     * Create a reference through which a VloConfig class object can send
+     * messages to the logging framework that has been associated with the 
+     * application.
+     */
+    private final static org.slf4j.Logger LOG =
+            LoggerFactory.getLogger(VloConfig.class);
+
+    /**
+     * Because the VloConfig class uses the Simple framework via the
+     * ConfigFilePersister class, implement the logging interface in 
+     * that class.
+     */
+    private class VloConfigLogger implements ConfigFilePersister.Logger {
+
+        @Override
+        public void log(Object data) {
+            
+            /**
+             * Send a message to the logging framework by using the 
+             * LOG reference.
+             */
+            LOG.error(data.toString());
+        }
+    }
+  
+    // create a reference to the ConfigFilePersister's logging interface
+    private static VloConfigLogger logger;
+
+    /**
+     * Constructor method
+     */
+    public VloConfig() {
+        // create the ConfigFilePersister's logging interface
+        logger = new VloConfigLogger();
+
+        /**
+         * Initialize the ConfigFilePersister's reference to the interface 
+         */
+        ConfigFilePersister.setLogger(VloConfig.logger);
+    }
+    
+    /**
+     * Read the configuration from the packaged XML configuration file.  
+     * 
+     * @param fileName the name of the file to read the configuration from 
+     */
+    public static void readPackagedConfig() {
+        
+        // set the name of the packaged configuration file
+        String fileName = "/VloConfig.xml";
+        
+        VloConfig.readConfig (fileName);
+    }
+    
+    // VLO application configuration
+    static VloConfig config = null;
+
+    /**
+     * Read the configuration from a file. 
+     *
+     * Please invoke this method instead of readPackagedConfig if you want to 
+     * read the configuration from a file external to the VloConfig package.
+     * 
+     * @param fileName the name of the file to read the configuration from
+     */
+    public static void readConfig(String fileName) {
+
+        if (config == null) {
+            // the configuration is not there yet; create it now
+            config = new VloConfig();
+        }
+        
+        // set lists to null because otherwise Simple will not overwrite it
+        dataRoots = null;
+
+        // get the XML file configuration from the file
+        read(fileName, config);
+    }
+
+    /**
+     * VLO application parameter members<br><br>
+     *
+     * Initialize the annotated members in a proper way. This will allow them to
+     * be linearized to corresponding elements in an XML file.
+     * 
+     * Please refer to the general VLO documentation for a description of the
+     * member parameters.
+     */
+    
+    @Element // directive for Simple
+    private static boolean deleteAllFirst = false;
+    
+    @Element 
+    private static int maxOnHeap = 0;
+    
+    @Element 
+    private static boolean useMaxFileSize = false;
+    
+    @Element 
+    private static int maxFileSize = 0;
+    
+    @Element
+    private static boolean useHandleResolver = false;
+    
+    @Element
+    private static boolean printMapping = false;
+    
+    @ElementList // directive for Simple
+    private static List<DataRoot> dataRoots;
+    
+    @Element
+    private static String vloHomeLink = "";
+    
+    @Element
+    private static String solrUrl = "";
+    
+    @Element
+    private static String profileSchemaUrl = "";
+
+    @Element
+    private static String componentRegistryRESTURL = "";
+    
+    @Element
+    private static String handleServerUrl = "";
+    
+    @Element
+    private static String imdiBrowserUrl = "";
+    
+    @Element
+    private static String languageLinkPrefix = "";
+    
+    @Element
+    private static String feedbackFromUrl = "";
+    
+    /**
+     * Note: the national project mapping itself is not part of the web
+     * application configuration.
+     */
+    @Element
+    private static String nationalProjectMapping = "";
+    
+    /**
+     * An array of facetFields<br><br>
+     *
+     * In case of an array of elements, the number of elements in the array
+     * needs to be communicated to the Simple framework. The following would be
+     * a correct description of an array of three facet fields<br><br>
+     *
+     * {@literal <facetFields length="3">}<br> 
+     * {@literal    <facetField>}<br>
+     * {@literal       fieldOne}<br> 
+     * {@literal    </facetField>}<br>
+     * {@literal    <facetField>}<br> 
+     * {@literal       fieldTwo}<br>
+     * {@literal    </facetField>}<br> 
+     * {@literal    <facetField>}<br>
+     * {@literal       fieldThree}<br> 
+     * {@literal    </facetField>}<br>
+     * {@literal </facetFields>}<br><br>
+     *
+     * To let Simple now it has to interpret the facetFields element as an
+     * array, use the ElementArray directive. Use the directive to let Simple
+     * know that the elements inside 'facetFields' are named 'facetField'.
+     */
+    @ElementArray(entry = "facetField")
+    private static String[] facetFields = {"", "", ""};
+    
+    @Element
+    private static String countryComponentUrl = "";
+    
+    @Element
+    private static String language2LetterCodeComponentUrl = "";
+    
+    @Element
+    private static String language3LetterCodeComponentUrl = "";
+    
+    @Element
+    private static String silToISO639CodesUrl = "";
+    
+    @Element
+    private static String FederatedContentSearchUrl = " ";
+
+    /**
+     * 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.
+     */
+    
+    /**
+     * Get the value of the maxOnHeap parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static int getMaxOnHeap (){
+        return maxOnHeap;
+    }
+    
+    /**
+     * Set the value of the maxOnHeap parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setMaxOnHeap (int param){
+        maxOnHeap = param;
+    }
+    
+    /**
+     * Get the value of the useMaxFileSize parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static boolean getUseMaxFileSize (){
+        return useMaxFileSize;
+    }
+    
+    /**
+     * Set the value of the useMaxFileSize parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setUseMaxFileSize (boolean param){
+        useMaxFileSize = param;
+    }
+    
+    /**
+     * Get the value of the maxFileSize parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static int getMaxFileSize (){
+        return maxFileSize;
+    }
+    
+    /**
+     * Set the value of the maxFileSize parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setMaxFileSize (int param){
+        maxFileSize = param;
+    }
+    
+    /**
+     * Get the value of the useHandleResolver parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static boolean getUseHandleResolver (){
+        return useHandleResolver;
+    }
+    
+    /**
+     * Set the value of the useHandleResolver parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setUseHandleResolver (boolean param){
+        useHandleResolver = param;
+    }
+    
+    /**
+     * Get the list of dataRoots parameters<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static List<DataRoot> getDataRoots() {
+        return dataRoots;
+    }
+    
+    /**
+     * Set the value of a list of dataRoots parameters<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setDataRoots(List<DataRoot> param) {
+        dataRoots = param;
+    }
+
+    /**
+     * Get the value of the deleteAllFirst parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static boolean deleteAllFirst() {
+        return deleteAllFirst;
+    }
+
+    /**
+     * Set the value of the deleteAllFirst parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setDeleteAllFirst(boolean param) {
+        deleteAllFirst = param;
+    }
+
+    /**
+     * Get the value of the printMapping parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static boolean printMapping() {
+        return printMapping;
+    }
+    
+    /**
+     * Set the value of the printMapping parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setPrintMapping(boolean param) {
+        printMapping = param;
+    }
+
+    /**
+     * Get the value of the VloHomeLink parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getVloHomeLink() {
+        return vloHomeLink;
+    }
+
+    /**
+     * Set the value of the VloHomeLink parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setVloHomeLink(String param) {
+        vloHomeLink = param;
+    }
+
+    /**
+     * Get the value of the SolrUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    static 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 param the value
+     */
+    public static void setSolrUrl(String param) {
+        solrUrl = param;
+    }
+
+    /**
+     * Get the value of the ProfileSchemaUrl by profileId parameter<br><br>
+     *
+     * For a description of the schema, refer to the general VLO documentation.
+     * Note: the profileId needs to be expanded.
+     *
+     * @return the value
+     */
+    public static String getComponentRegistryProfileSchema(String id) {
+        return profileSchemaUrl.replace("{PROFILE_ID}", id);
+    }
+
+    /**
+     * Set the value of the ProfileSchemaUrl parameter<br><br>
+     *
+     * For a description of the schema, refer to the general VLO documentation.
+     * Note: the profileId needs to be expanded.
+     *
+     * @param param the value
+     */
+    public static void setProfileSchemaUrl(String param) {
+        profileSchemaUrl = param;
+    }
+
+    /**
+     * Get the value of the ComponentRegisteryRESTURL parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getComponentRegistryRESTURL() {
+        return componentRegistryRESTURL;
+    }
+
+    /**
+     * Set the value of the ComponentRegisteryRESTURL parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setComponentRegistryRESTURL(String param) {
+        componentRegistryRESTURL = param;
+    }
+
+    /**
+     * Get the value of the HandleServerUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getHandleServerUrl() {
+        return handleServerUrl;
+    }
+
+    /**
+     * Set the value of the HandleServerUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setHandleServerUrl(String param) {
+        handleServerUrl = param;
+    }
+
+    /**
+     * Get the value of the ProfileSchemaUrl parameter combined with a handle<br><br>
+     *
+     * For a description of the schema, refer to the general VLO documentation.
+     *
+     * @param handle the handle the URL is based on
+     * @return the value 
+     */
+    public static String getIMDIBrowserUrl(String handle) {
+        String result;
+        try {
+            result = imdiBrowserUrl + URLEncoder.encode(handle, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            result = imdiBrowserUrl + handle;
+        }
+        return result;
+    }
+
+    /**
+     * Set the value of the IMDIBrowserUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setIMDIBrowserUrl(String param) {
+        imdiBrowserUrl = param;
+    }
+
+    /**
+     * Get the value of the languageLinkPrefix parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getLanguageLinkPrefix() {
+        return languageLinkPrefix;
+    }
+    
+    /**
+     * Set the value of the languageLinkPrefix parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setLanguageLinkPrefix(String param) {
+        languageLinkPrefix = param;
+    }
+    
+    /**
+     * Get the value of the feedbackFromUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getFeedbackFromUrl() {
+        return feedbackFromUrl;
+    }
+    
+    /**
+     * Set the value of the feedbackFromUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setFeedbackFromUrl(String param) {
+        feedbackFromUrl = param;
+    }
+    
+    /**
+     * Get the value of the FederatedContentSearchUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getFederatedContentSearchUrl() {
+        return FederatedContentSearchUrl;
+    }
+
+    /**
+     * Set the value of the FederatedContentSearchUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setFederatedContentSearchUrl(String param) {
+        FederatedContentSearchUrl = param;
+    }
+
+    /**
+     * Get the value of the NationalProjectMapping parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getNationalProjectMapping() {
+        return nationalProjectMapping;
+    }
+
+    /**
+     * Set the value of the NationalProjectMapping parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param nationalProjectMapping the value
+     */
+    public static void setNationalProjectMapping(String param) {
+        nationalProjectMapping = param;
+    }
+   
+
+    /**
+     * Get the value of the FacetFields parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String[] getFacetFields() {
+        return facetFields;
+    }
+
+    /**
+     * Set the value of the FacetFields parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value, a list of facet fields
+     */
+    public static void setFacetFields(String[] param) {
+        facetFields = param;
+    }
+
+    /**
+     * Get the value of the CountryComponentUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getCountryComponentUrl() {
+        return countryComponentUrl;
+    }
+
+    /**
+     * Set the value of the CountryComponentUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setCountryComponentUrl(String param) {
+        countryComponentUrl = param;
+    }
+
+    /**
+     * Get the value of the Language2LetterCodeComponentUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getLanguage2LetterCodeComponentUrl() {
+        return language2LetterCodeComponentUrl;
+    }
+
+    /**
+     * Set the value of the Language2LetterCodeComponentUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setLanguage2LetterCodeComponentUrl(String param) {
+        language2LetterCodeComponentUrl = param;
+    }
+
+    /**
+     * Get the value of the Language3LetterCodeComponentUrl parameter<br><br> 
+     * 
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getLanguage3LetterCodeComponentUrl() {
+        return language3LetterCodeComponentUrl;
+    }
+
+    /**
+     * Set the value of the Language3LetterCodeComponentUrl parameter<br><br> 
+     * 
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setLanguage3LetterCodeComponentUrl(String param) {
+        language3LetterCodeComponentUrl = param;
+    }
+
+    /**
+     * Get the value of the SilToISO639CodesUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @return the value
+     */
+    public static String getSilToISO639CodesUrl() {
+        return silToISO639CodesUrl;
+    }
+
+    /**
+     * Set the value of the SilToISO639CodesUrl parameter<br><br>
+     *
+     * For a description of the parameter, refer to the general VLO
+     * documentation.
+     *
+     * @param param the value
+     */
+    public static void setSilToISO639CodesUrl(String param) {
+        silToISO639CodesUrl = param;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloContextConfig.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloContextConfig.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloContextConfig.java	(revision 2882)
@@ -0,0 +1,74 @@
+package eu.clarin.cmdi.vlo.config;
+
+import javax.servlet.ServletContext;
+
+/**
+ * VLO configuration, taking context into account<be><br>
+ * 
+ * In addition to letting the packaged {@literal VloConfig.xml} determine
+ * the value of the parameters in the VLO configuration, you can configure
+ * a 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 of the container in which the web application resides 
+ * reference an XML file similar to the packaged one, the values of the
+ * parameters defined in this file will override those of the packaged
+ * parameters. Please note that the use of an external XML file is not
+ * compulsory.<br><br>
+ * 
+ * Yet 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.
+ * 
+ * @author keeloo
+ */
+public class VloContextConfig extends VloConfig {
+    
+    /**
+     * Switch to external configuration.<br><br>
+     * 
+     * @param config static configuration 
+     *
+     * @return the configuration
+     */
+    public static void switchToExternalConfig(ServletContext context) {
+        
+        if (config == null) {
+            // the configuration is not there yet; create it now
+            config = new VloConfig();
+        }
+       
+        String fileName;
+
+        // check for a reference to an external configuration file
+        fileName = context.getInitParameter("externalConfig");
+                
+        if (fileName == null) {
+            // 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.setSolrUrl(url);
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIComponentProfileNamePostProcessor.java	(revision 2882)
@@ -0,0 +1,73 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import com.ximpleware.AutoPilot;
+import com.ximpleware.VTDGen;
+import com.ximpleware.VTDNav;
+import com.ximpleware.XPathParseException;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.util.HashMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Takes the value of the componentprofileid and uses the componentregistry REST service to transform this to the name of the componentprofile.
+ */
+public class CMDIComponentProfileNamePostProcessor implements PostProcessor{
+
+    private static String XPATH = "/CMD_ComponentSpec/Header/Name/text()";
+    private String BASE_URL = null;
+    AutoPilot ap = null;
+    VTDGen vg = null;
+    VTDNav vn = null;
+
+    private static final String _EMPTY_STRING = "";
+    private final static Logger LOG = LoggerFactory.getLogger(CMDIComponentProfileNamePostProcessor.class);
+    private final HashMap<String, String> cache = new HashMap<String, String>();
+
+    @Override
+    public String process(String value) {
+        String result = _EMPTY_STRING;
+        if(value != null){
+            if(cache.containsKey(value)){
+                result = cache.get(value);
+            }
+            else{
+                setup();
+                if(vg.parseHttpUrl(BASE_URL + value, true)){
+                    LOG.info("PARSED: "+BASE_URL+value);
+                    vn = vg.getNav();
+                    ap.bind(vn);
+                    int idx;
+                    try {
+                        idx = ap.evalXPath();
+                        LOG.info("EVALUATED XPATH: "+XPATH+ " found idx: "+idx);
+                        if(idx == -1){ // idx represent the nodeId in the xml file, if -1 the xpath evaluates to nothing.
+                            return result;
+                        }
+                        result = vn.toString(idx);
+                        cache.put(value, result);
+                    } catch (Exception e) {
+                        LOG.error(e.getLocalizedMessage());
+                        return result;
+                    }
+                }
+                else{
+                    LOG.error("CANNOT OPEN AND/OR PARSE: " + BASE_URL + value);
+                }
+            }
+        }
+        return result;
+    }
+
+    private void setup() {
+        ap = new AutoPilot();
+        try {
+            ap.selectXPath(XPATH);
+        } catch (XPathParseException e) {
+            LOG.error(e.getLocalizedMessage());
+            ap = null;
+        }
+        vg = new VTDGen();
+        BASE_URL = VloConfig.getComponentRegistryRESTURL();
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIData.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIData.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIData.java	(revision 2882)
@@ -0,0 +1,149 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.apache.solr.common.SolrInputDocument;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Represents a document of CMDI data.
+ */
+public class CMDIData {
+    private final static Logger LOG = LoggerFactory.getLogger(CMDIData.class);
+    private static final String METADATA_TYPE = "Metadata";
+    private static final String DATA_RESOURCE_TYPE = "Resource";
+    private static final String SEARCH_SERVICE_TYPE = "SearchService";
+    //* Definition of the string denoting the landing page type. */
+    private static final String LANDING_PAGE_TYPE = "LandingPage";
+    //* Definition of the string denoting the search page type. */
+    private static final String SEARCH_PAGE_TYPE = "SearchPage";
+
+    /**
+     * The unique identifier of the cmdi file.
+     */
+    private String id;
+    
+    /**
+     * The associated solr document (not send to the solr server yet)
+     */
+    private SolrInputDocument doc;
+
+    // Lists for different types of resources.
+    private final List<Resource> metaDataResources = new ArrayList<Resource>();
+    private final List<Resource> dataResources = new ArrayList<Resource>();
+    private final List<Resource> searchResources = new ArrayList<Resource>();
+    private final List<Resource> landingPageResources = new ArrayList<Resource>();
+    private final List<Resource> searchPageResources = new ArrayList<Resource>();
+
+    public SolrInputDocument getSolrDocument() {
+        return doc;
+    }
+
+    /**
+     * Sets a field in the doc to a certain value. Well, at least calls another 
+     * (private) method that actually does this.
+     * @param name
+     * @param value
+     * @param caseInsensitive
+     */
+    public void addDocField(String name, String value, boolean caseInsensitive) {
+        if (FacetConstants.FIELD_ID.equals(name)) {
+            setId(value.trim());
+        } else {
+            handleDocField(name, value, caseInsensitive);
+        }
+    }
+
+    /**
+     * Sets a field in the doc to a certain value.
+     * Before adding checks for duplicates.
+     * @param name
+     * @param value
+     * @param caseInsensitive
+     */
+    private void handleDocField(String name, String value, boolean caseInsensitive) {
+        if (doc == null) {
+            doc = new SolrInputDocument();
+        }
+        if (value != null && !value.trim().isEmpty()) {
+            if (caseInsensitive) {
+                value = value.toLowerCase();
+            }
+            Collection<Object> fieldValues = doc.getFieldValues(name);
+            if (fieldValues == null || !fieldValues.contains(value)) {
+                doc.addField(name, value);
+            } //ignore double values don't add them
+        }
+    }
+
+    public List<Resource> getDataResources() {
+        return dataResources;
+    }
+
+    public List<Resource> getMetadataResources() {
+        return metaDataResources;
+    }
+
+    /**
+     * Returns list of all search interfaces (preferably CQL interfaces)
+     */
+    public List<Resource> getSearchResources() {
+        return searchResources;
+    }
+
+    /**
+     * Return the list of landing page resources.
+     * 
+     * @return the list
+     */
+    public List<Resource> getLandingPageResources() {
+        return landingPageResources;
+    }
+    
+    /**
+     * Return the  list of search page resources.
+     * 
+     * @return the list
+     */
+    public List<Resource> getSearchPageResources() {
+        return searchPageResources;
+    }
+
+    /**
+     * Add a meta data resource to the list of resources of that type.
+     * 
+     * Whenever the type is not one of a type supported by the CMDI
+     * specification, a warning is logged.
+     *
+     * @param resource meta data resource
+     * @param type type of the resource
+     * @param mimeType mime type associated with the resource
+     */
+    public void addResource(String resource, String type, String mimeType) {
+        if (METADATA_TYPE.equals(type)) {
+            metaDataResources.add(new Resource(resource,type, mimeType));
+        } else if (DATA_RESOURCE_TYPE.equals(type)) {
+            dataResources.add(new Resource(resource,type, mimeType));
+        } else if (SEARCH_SERVICE_TYPE.equals(type)){
+            searchResources.add(new Resource(resource,type, mimeType));
+        } else if (LANDING_PAGE_TYPE.equals(type)){
+            landingPageResources.add(new Resource(resource,type, mimeType));
+        } else if (SEARCH_PAGE_TYPE.equals(type)){
+            searchPageResources.add(new Resource(resource,type, mimeType));
+        } else {
+            LOG.warn("Ignoring unsupported resource type " + 
+                    type + ", name=" + resource);
+        }
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessor.java	(revision 2882)
@@ -0,0 +1,8 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.io.File;
+
+public interface CMDIDataProcessor {
+
+    public CMDIData process(File file) throws Exception ;
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXML.java	(revision 2882)
@@ -0,0 +1,169 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import com.ximpleware.AutoPilot;
+import com.ximpleware.NavException;
+import com.ximpleware.VTDException;
+import com.ximpleware.VTDGen;
+import com.ximpleware.VTDNav;
+import com.ximpleware.XPathEvalException;
+import com.ximpleware.XPathParseException;
+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 {
+    private final Map<String, PostProcessor> postProcessors;
+    private final static Logger LOG = LoggerFactory.getLogger(CMDIParserVTDXML.class);
+
+    public CMDIParserVTDXML(Map<String, PostProcessor> postProcessors) {
+        this.postProcessors = postProcessors;
+    }
+
+    @Override
+	public CMDIData process(File file) throws VTDException, IOException {
+        CMDIData result = new CMDIData();
+        VTDGen vg = new VTDGen();
+        vg.setDoc(IOUtils.toByteArray(new FileInputStream(file)));
+        vg.parse(true);
+        VTDNav nav = vg.getNav();
+        setNameSpace(nav);//setting namespace once, all other instance of AutoPilot keep the setting (a bit tricky).
+        FacetMapping facetMapping = getFacetMapping(nav.cloneNav(), file.getAbsolutePath());
+        /** New nice error log to find erroneous files */
+        if(facetMapping.getFacets().size() == 0){
+            LOG.error("Problems mapping facets for file: " + file.getAbsolutePath());
+        }
+
+        nav.toElement(VTDNav.ROOT);
+        processResources(result, nav);
+        processFacets(result, nav, facetMapping);
+        return result;
+    }
+
+    static void setNameSpace(VTDNav nav) {
+        AutoPilot ap = new AutoPilot(nav);
+        ap.declareXPathNameSpace("c", "http://www.clarin.eu/cmd/");
+    }
+
+    private FacetMapping getFacetMapping(VTDNav nav, String tolog) throws VTDException {
+        String xsd = extractXsd(nav);
+        if (xsd == null) {
+            throw new RuntimeException("Cannot get xsd schema so cannot get a proper mapping. Parse failed!");
+        }
+        if (xsd.indexOf("http") != xsd.lastIndexOf("http")){
+            LOG.info("FILE WITH WEIRD HTTP THINGY! " + tolog);
+        }
+        return FacetMappingFactory.getFacetMapping(xsd);
+    }
+
+    String extractXsd(VTDNav nav) throws VTDException {
+        String xsd = getXsdFromHeader(nav);
+        if (xsd == null) {
+            xsd = getXsdFromSchemaLocation(nav);
+        }
+        return xsd;
+    }
+
+    private String getXsdFromHeader(VTDNav nav) throws XPathParseException, XPathEvalException, NavException {
+        String result = null;
+        nav.toElement(VTDNav.ROOT);
+        AutoPilot ap = new AutoPilot(nav);
+        ap.selectXPath("/c:CMD/c:Header/c:MdProfile/text()");
+        int index = ap.evalXPath();
+        if (index != -1) {
+            String profileId = nav.toString(index).trim();
+            result = VloConfig.getComponentRegistryProfileSchema(profileId);
+        }
+        return result;
+    }
+
+    private String getXsdFromSchemaLocation(VTDNav nav) throws NavException {
+        String result = null;
+        nav.toElement(VTDNav.ROOT);
+        int index = nav.getAttrValNS("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
+        if (index != -1) {
+            String schemaLocation = nav.toNormalizedString(index);
+            result = schemaLocation.split(" ")[1];
+        } else {
+            index = nav.getAttrValNS("http://www.w3.org/2001/XMLSchema-instance", "noNamespaceSchemaLocation");
+            if (index != -1) {
+                result = nav.toNormalizedString(index);
+            }
+        }
+        return result;
+    }
+    
+    private void processResources(CMDIData result, VTDNav nav) throws VTDException {
+        
+        AutoPilot resourceProxy = new AutoPilot(nav);
+        resourceProxy.selectXPath("/c:CMD/c:Resources/c:ResourceProxyList/c:ResourceProxy");
+        
+        AutoPilot resourceRef = new AutoPilot(nav);
+        resourceRef.selectXPath("c:ResourceRef");
+        AutoPilot resourceType = new AutoPilot(nav);
+        resourceType.selectXPath("c:ResourceType");
+        AutoPilot resourceMimeType = new AutoPilot(nav);
+        resourceMimeType.selectXPath("c:ResourceType/@mimetype");
+        
+        while (resourceProxy.evalXPath() != -1) {
+            String ref = resourceRef.evalXPathToString();
+            String type = resourceType.evalXPathToString();
+            String mimeType = resourceMimeType.evalXPathToString();
+            
+            if (!ref.equals("") && !type.equals("")) {
+                // note that the mime type could be empty
+                result.addResource(ref, type, mimeType);
+            }
+        }
+    }
+
+    private void processFacets(CMDIData result, VTDNav nav, FacetMapping facetMapping) throws VTDException {
+        List<FacetConfiguration> facetList = facetMapping.getFacets();
+        for (FacetConfiguration config : facetList) {
+            List<String> patterns = config.getPatterns();
+            for (String pattern : patterns) {
+                boolean matchedPattern = matchPattern(result, nav, config, pattern, config.getAllowMultipleValues());
+                if (matchedPattern && !config.getAllowMultipleValues()) {
+                    break;
+                }
+            }
+        }
+    }
+
+    private boolean matchPattern(CMDIData result, VTDNav nav, FacetConfiguration config, String pattern, Boolean allowMultipleValues) throws VTDException {
+        boolean matchedPattern = false;
+        AutoPilot ap = new AutoPilot(nav);
+        ap.selectXPath(pattern);
+        int index = ap.evalXPath();
+        while (index != -1) {
+            matchedPattern = true;
+            if (nav.getTokenType(index) == VTDNav.TOKEN_ATTR_NAME) {
+                //if it is an attribute you need to add 1 to the index to get the right value
+                index++;
+            }
+            String value = nav.toString(index);
+            value = postProcess(config.getName(), value);
+            result.addDocField(config.getName(), value, config.isCaseInsensitive());
+            index = ap.evalXPath();
+            
+            if(!allowMultipleValues)
+            	break;
+        }
+        return matchedPattern;
+    }
+
+    private String postProcess(String name, String value) {
+        String result = value;
+        if (postProcessors.containsKey(name)) {
+            PostProcessor processor = postProcessors.get(name);
+            result = processor.process(value);
+        }
+        return result.trim();
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessor.java	(revision 2882)
@@ -0,0 +1,50 @@
+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;
+
+public class CountryNamePostProcessor implements PostProcessor {
+
+    private final static Logger LOG = LoggerFactory.getLogger(CountryNamePostProcessor.class);
+
+    private Map<String, String> countryCodeMap;
+
+    /**
+     * Returns the country name based on the mapping defined in the CMDI component:
+     * http://catalog.clarin.eu/ds/ComponentRegistry/?item=clarin.eu:cr1:c_1271859438104 If no mapping is found the original value is
+     * returned.
+     */
+    @Override
+    public String process(String value) {
+        String result = value;
+        if (result != null) {
+            Map<String, String> countryCodeMap = getCountryCodeMap();
+            String name = countryCodeMap.get(value.toUpperCase());
+            if (name != null) {
+                result = name;
+            }
+        }
+        return result;
+    }
+
+    private Map<String, String> getCountryCodeMap() {
+        if (countryCodeMap == null) {
+            countryCodeMap = createCountryCodeMap();
+        }
+        return countryCodeMap;
+    }
+
+    private Map<String, String> createCountryCodeMap() {
+        LOG.debug("Creating country code map.");
+        try {
+            Map<String, String> result = CommonUtils.createCMDIComponentItemMap(VloConfig.getCountryComponentUrl());
+            return result;
+        } catch (Exception e) {
+            throw new RuntimeException("Cannot instantiate postProcessor:", e);
+        }
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConceptMapping.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConceptMapping.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConceptMapping.java	(revision 2882)
@@ -0,0 +1,109 @@
+package eu.clarin.cmdi.vlo.importer;
+
+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.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+/**
+ * Corresponds to the facetConcepts.xml file.
+ * This class holds the mapping of facet name -> facetConcepts/patterns
+ * A facetConcept is a ISCAT conceptLink e.g.: http://www.isocat.org/datcat/DC-2544
+ * the conceptLink will be analysed and translated into a valid Xpath expression to extract data out of the metadata. 
+ * Valid xpath expression e.g. /c:CMD/c:Header/c:MdSelfLink/text(), the 'c' namespace will be mapped to http://www.clarin.eu/cmd/ in the parser.
+ * A pattern is an xpath expression used directly on the metadata. Use patterns only when you cannot a conceptLink does not suffice. 
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "facetConcepts")
+public class FacetConceptMapping {
+
+    @XmlElement(name = "facetConcept")
+    private List<FacetConcept> facetConcepts;
+
+    public List<FacetConcept> getFacetConcepts() {
+        return facetConcepts;
+    }
+
+    public void setFacetConcepts(List<FacetConcept> facetConcepts) {
+        this.facetConcepts = facetConcepts;
+    }
+
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlRootElement(name = "facetConcept")
+    public static class FacetConcept {
+        @XmlAttribute
+        private String name;
+
+        /**
+         * Values will be stored lowercase by default, set isCaseInsensitive to true if you want to keep the case of the value
+         */
+        @XmlAttribute
+        private boolean isCaseInsensitive = false;
+
+        /**
+         * By default multiple values that are found for a matching pattern will be stored. For some facets this leads to too much values
+         * with little value for instance for "subject". Set allowMultipleValues to false will only store the first found value.
+         */
+        @XmlAttribute
+        private boolean allowMultipleValues = true;
+
+        @XmlElement(name = "concept")
+        private List<String> concepts = new ArrayList<String>();
+
+        @XmlElement(name = "pattern")
+        private List<String> patterns = new ArrayList<String>();
+
+        public void setConcepts(List<String> concepts) {
+            this.concepts = concepts;
+        }
+
+        public List<String> getConcepts() {
+            return concepts;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setCaseInsensitive(boolean isCaseInsensitive) {
+            this.isCaseInsensitive = isCaseInsensitive;
+        }
+
+        public boolean isCaseInsensitive() {
+            return isCaseInsensitive;
+        }
+
+        public void setAllowMultipleValues(boolean allowMultipleValues) {
+            this.allowMultipleValues = allowMultipleValues;
+        }
+
+        public boolean isAllowMultipleValues() {
+            return allowMultipleValues;
+        }
+
+        public void setPatterns(List<String> patterns) {
+            this.patterns = patterns;
+        }
+
+        public List<String> getPatterns() {
+            return patterns;
+        }
+
+        @Override
+        public String toString() {
+            return "name=" + name + ", patterns=" + patterns + ", concepts=" + concepts;
+        }
+
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java	(revision 2882)
@@ -0,0 +1,62 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Once created contains the information about the facets and such.
+ * Just a container for some information, doesn't do processing.
+ */
+
+public class FacetConfiguration {
+
+    private String name;
+    private boolean caseInsensitive= false;
+    private List<String> patterns = new ArrayList<String>();
+    private boolean allowMultipleValues = true;
+
+    public void setCaseInsensitive(boolean caseValue) {
+        this.caseInsensitive = caseValue;
+    }
+
+    public boolean isCaseInsensitive() {
+        return caseInsensitive;
+    }
+
+    public void setPatterns(List<String> patterns) {
+        this.patterns = patterns;
+    }
+
+    public void setPattern(String pattern) {
+        this.patterns = Collections.singletonList(pattern);
+    }
+
+    /**
+     * @return List of Strings which are xpaths expressions.
+     */
+    public List<String> getPatterns() {
+        return patterns;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String toString() {
+        return "name="+name+", pattern="+patterns;
+    }
+
+    public boolean getAllowMultipleValues() {
+        return allowMultipleValues;
+    }
+
+    public void setAllowMultipleValues(boolean allowMultipleValues) {
+        this.allowMultipleValues = allowMultipleValues;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMapping.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMapping.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMapping.java	(revision 2882)
@@ -0,0 +1,22 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A list of facets. One FacetConfiguration for each facet.
+ */
+
+public class FacetMapping {
+
+    private List<FacetConfiguration> facets = new ArrayList<FacetConfiguration>();
+
+    public List<FacetConfiguration> getFacets() {
+        return facets;
+    }
+
+    public void addFacet(FacetConfiguration facetConfiguration) {
+        facets.add(facetConfiguration);
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactory.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactory.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactory.java	(revision 2882)
@@ -0,0 +1,236 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import com.ximpleware.AutoPilot;
+import com.ximpleware.NavException;
+import com.ximpleware.VTDGen;
+import com.ximpleware.VTDNav;
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.importer.FacetConceptMapping.FacetConcept;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.util.*;
+
+/**
+ * Creates facet-mappings (xpaths) from a configuration.
+ * As they say "this is where the magic happens".
+ * Also does some cashing.
+ */
+
+public class FacetMappingFactory {
+
+    private final static Logger LOG = LoggerFactory.getLogger(FacetMappingFactory.class);
+
+    private Map<String, FacetMapping> mapping = new HashMap<String, FacetMapping>();
+
+    /**
+     * Our one instance of the FMF.
+     */
+    private final static FacetMappingFactory INSTANCE = new FacetMappingFactory();
+
+    private FacetMappingFactory() {
+    }
+
+    public static FacetMapping getFacetMapping(String xsd) {
+        return INSTANCE.getOrCreateMapping(xsd);
+    }
+
+    /**
+     * If cashed gives that result, otherwise makes a new one (in the createMapping method below)..
+     * @param xsd
+     * @return
+     */
+    private FacetMapping getOrCreateMapping(String xsd) {
+        FacetMapping result = mapping.get(xsd);
+        if (result == null) {
+            result = createMapping(xsd);
+            mapping.put(xsd, result);
+        }
+        return result;
+    }
+
+    /**
+     * Asks conceptLinkPathMapping to create the actual xpaths.
+     * Does a bunch of bookkeeping in order to get the FacetMapping.
+     * @param xsd
+     * @return
+     */
+    private FacetMapping createMapping(String xsd) {
+        FacetMapping result = new FacetMapping();
+        // Gets the configuration. VLOMarchaller only reads in the facetconceptmapping.xml file and returns the result (though the reading in is implicit).
+        FacetConceptMapping conceptMapping = VLOMarshaller.getFacetConceptMapping();
+        try {
+            //The magic
+            Map<String, List<String>> conceptLinkPathMapping = createConceptLinkPathMapping(xsd);
+            // Below we put the stuff we found into the configuration class.
+            for (FacetConcept facetConcept : conceptMapping.getFacetConcepts()) {
+                FacetConfiguration config = new FacetConfiguration();
+                List<String> xpaths = new ArrayList<String>();
+                handleId(xpaths, facetConcept);
+                for (String concept : facetConcept.getConcepts()) {
+                    List<String> paths = conceptLinkPathMapping.get(concept);
+                    if (paths != null) {
+                        xpaths.addAll(paths);
+                    }
+                }
+                if (xpaths.isEmpty()) {
+                    //add hardcoded patterns only when there is no xpath generated from conceptlink
+                    xpaths.addAll(facetConcept.getPatterns());
+                }
+                config.setCaseInsensitive(facetConcept.isCaseInsensitive());
+                config.setAllowMultipleValues(facetConcept.isAllowMultipleValues());
+                config.setPatterns(xpaths);
+                config.setName(facetConcept.getName());
+                if (!config.getPatterns().isEmpty()) {
+                    result.addFacet(config);
+                }
+            }
+        } catch (NavException e) {
+            LOG.error("Error creating facetMapping from xsd: " + xsd + " ", e);
+        }
+        return result;
+    }
+
+    /**
+     * The id facet is special case and patterns must be added first.
+     * The standard pattern to get the id out of the header is the most reliable and it should fall back on concept matching if nothing matches.
+     * (Note this is the exact opposite of other facets where the concept match is probably better then the 'hardcoded' pattern).
+     */
+    private void handleId(List<String> xpaths, FacetConcept facetConcept) {
+        if (FacetConstants.FIELD_ID.equals(facetConcept.getName())) {
+            xpaths.addAll(facetConcept.getPatterns());
+        }
+    }
+
+    /**
+     * "this is where the magic happens".
+     * Finds paths in the xsd to all concepts (isocat data catagories).
+     * @param xsd
+     * @return
+     * @throws NavException
+     */
+    private Map<String, List<String>> createConceptLinkPathMapping(String xsd) throws NavException {
+        Map<String, List<String>> result = new HashMap<String, List<String>>();
+        VTDGen vg = new VTDGen();
+        boolean parseSuccess = vg.parseHttpUrl(xsd, true);
+        if (!parseSuccess) {
+            LOG.error("Cannot create ConceptLink Map from xsd (xsd is probably not reachable): "+xsd+". All metadata instances that use this xsd will not be imported correctly.");
+            return result; //return empty map, so the incorrect xsd is not tried for all metadata instances that specify it.
+        }
+        VTDNav vn = vg.getNav();
+        AutoPilot ap = new AutoPilot(vn);
+        ap.selectElement("xs:element");
+        Deque<Token> elementPath = new LinkedList<Token>();
+        while (ap.iterate()) {
+            int i = vn.getAttrVal("name");
+            if (i != -1) {
+                String elementName = vn.toNormalizedString(i);
+                updateElementPath(vn, elementPath, elementName);
+                int datcatIndex = getDatcatIndex(vn);
+                if (datcatIndex != -1) {
+                    String conceptLink = vn.toNormalizedString(datcatIndex);
+                    String xpath = createXpath(elementPath);
+                    List<String> values = result.get(conceptLink);
+                    if (values == null) {
+                        values = new ArrayList<String>();
+                        result.put(conceptLink, values);
+                    }
+                    values.add(xpath);
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Goal is to get the "datcat" attribute. Tries a number of different favors that were found in the xsd's.
+     * @return -1 if index is not found.
+     */
+    private int getDatcatIndex(VTDNav vn) throws NavException {
+        int result = -1;
+        result = vn.getAttrValNS("http://www.isocat.org/ns/dcr", "datcat");
+        if (result == -1) {
+            result = vn.getAttrValNS("http://www.isocat.org", "datcat");
+        }
+        if (result == -1) {
+            result = vn.getAttrVal("dcr:datcat");
+        }
+        return result;
+    }
+
+    /**
+     * Given an xml-token path thingy create an xpath.
+     * @param elementPath
+     * @return
+     */
+    private String createXpath(Deque<Token> elementPath) {
+        StringBuilder xpath = new StringBuilder("/");
+        for (Token token : elementPath) {
+            xpath.append("c:").append(token.name).append("/");
+        }
+        return xpath.append("text()").toString();
+    }
+
+    /**
+     * does some updating after a step. To keep the path proper and path-y.
+     * @param vn
+     * @param elementPath
+     * @param elementName
+     */
+    private void updateElementPath(VTDNav vn, Deque<Token> elementPath, String elementName) {
+        int previousDepth = elementPath.isEmpty() ? -1 : elementPath.peekLast().depth;
+        int currentDepth = vn.getCurrentDepth();
+        if (currentDepth == previousDepth) {
+            elementPath.removeLast();
+        } else if (currentDepth < previousDepth) {
+            while (currentDepth <= previousDepth) {
+                elementPath.removeLast();
+                previousDepth = elementPath.peekLast().depth;
+            }
+        }
+        elementPath.offerLast(new Token(currentDepth, elementName));
+    }
+
+    class Token {
+        final String name;
+        final int depth;
+
+        public Token(int depth, String name) {
+            this.depth = depth;
+            this.name = name;
+        }
+
+        @Override
+        public String toString() {
+            return name + ":" + depth;
+        }
+    }
+
+    public static void printMapping(File file) throws IOException {
+        Set<String> xsdNames = INSTANCE.mapping.keySet();
+        FileWriter fileWriter = new FileWriter(file);
+        fileWriter.append("This file is generated on " + DateFormat.getDateTimeInstance().format(new Date())
+                + " and only used to document the mapping.\n");
+        fileWriter.append("This file contains xsd name and a list of conceptName with xpath mappings that are generated.\n");
+        fileWriter.append("---------------------\n");
+        fileWriter.flush();
+        for (String xsd : xsdNames) {
+            FacetMapping facetMapping = INSTANCE.mapping.get(xsd);
+            fileWriter.append(xsd + "\n");
+            for (FacetConfiguration config : facetMapping.getFacets()) {
+                fileWriter.append("FacetName:" + config.getName() + "\n");
+                fileWriter.append("Mappings:\n");
+                for (String pattern : config.getPatterns()) {
+                    fileWriter.append("    " + pattern + "\n");
+                }
+            }
+            fileWriter.append("---------------------\n");
+            fileWriter.flush();
+        }
+        fileWriter.close();
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessor.java	(revision 2882)
@@ -0,0 +1,170 @@
+package eu.clarin.cmdi.vlo.importer;
+
+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.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import eu.clarin.cmdi.vlo.CommonUtils;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+
+public class LanguageCodePostProcessor implements PostProcessor{
+
+    private final static Logger LOG = LoggerFactory.getLogger(LanguageCodePostProcessor.class);
+
+    protected static final String ISO639_3_PREFIX = "ISO639-3:";
+    protected static final String SIL_CODE_PREFIX = "RFC1766:x-sil-";
+    protected static final String SIL_CODE_PREFIX_alt = "RFC-1766:x-sil-";
+
+    private Map<String, String> twoLetterCodesMap;
+    private Map<String, String> threeLetterCodesMap;
+    private Map<String, String> silToIso639Map;
+    private Map<String, String> languageNameToIso639Map;
+    private Map<String, String> iso639ToLanguageNameMap;
+
+    /**
+     * Returns the language name based on the mapping defined in the CMDI components: See http://trac.clarin.eu/ticket/40 for the mapping.
+     * If no mapping is found the original value is returned.
+     */
+    @Override
+    public String process(String value) {
+        String result = value;
+        if (value != null) {
+            String langCode = extractLanguageCode(value);
+            if (langCode.length() == 2) {
+                Map<String, String> twoLetterCodesMap = getTwoLetterCountryCodeMap();
+                String name = twoLetterCodesMap.get(langCode.toUpperCase());
+                if (name != null) {
+                    result = name;
+                }
+            } else if (langCode.length() == 3) {
+                Map<String, String> threeLetterCodesMap = getThreeLetterCountryCodeMap();
+                String name = threeLetterCodesMap.get(langCode.toUpperCase());
+                if (name != null) {
+                    result = name;
+                }
+            }
+        }
+        return result;
+    }
+
+    protected String extractLanguageCode(String value) {
+        String result = value;
+        if (value.length() != 2 && value.length() != 3) {
+            if (value.startsWith(ISO639_3_PREFIX)) {
+                result = value.substring(ISO639_3_PREFIX.length());
+            } else if (value.startsWith(SIL_CODE_PREFIX) || value.startsWith(SIL_CODE_PREFIX_alt)) {
+                result = value.substring(value.lastIndexOf("-")+1);
+                Map<String, String> silToISOMap = getSilToIso639Map();
+                String isoCode = silToISOMap.get(result.toUpperCase());
+                if (isoCode != null) {
+                    result = isoCode;
+                }
+            }
+        }
+        // Convert to lowercase to capture erroneously capitalized language codes in the CMDI files.
+        // NOTE: In the mappings themselves we do not capitalize.
+        result = result.toLowerCase();
+        return result;
+    }
+
+    public String getLanguageNameForLanguageCode(String langCode) {
+    	String result = getIso639ToLanguageNameMap().get(langCode);
+
+    	if(result == null)
+    		result = langCode;
+
+    	return result;
+    }
+
+    protected Map<String, String> getSilToIso639Map() {
+        if (silToIso639Map == null) {
+            silToIso639Map = createSilToIsoCodeMap();
+        }
+        return silToIso639Map;
+    }
+
+    private Map<String, String> getTwoLetterCountryCodeMap() {
+        if (twoLetterCodesMap == null) {
+            twoLetterCodesMap = createCodeMap(VloConfig.getLanguage2LetterCodeComponentUrl());
+        }
+        return twoLetterCodesMap;
+    }
+
+    private Map<String, String> getThreeLetterCountryCodeMap() {
+        if (threeLetterCodesMap == null) {
+            threeLetterCodesMap = createCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl());
+        }
+        return threeLetterCodesMap;
+    }
+
+    protected Map<String, String> getLanguageNameToIso639Map() {
+    	if (languageNameToIso639Map == null) {
+    			languageNameToIso639Map = createReverseCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl());
+    	}
+    	return languageNameToIso639Map;
+    }
+
+    private Map<String, String> getIso639ToLanguageNameMap() {
+    	if (iso639ToLanguageNameMap == null) {
+    		iso639ToLanguageNameMap = createCodeMap(VloConfig.getLanguage3LetterCodeComponentUrl());
+    	}
+
+    	return iso639ToLanguageNameMap;
+    }
+
+    private Map<String, String> createCodeMap(String url) {
+        LOG.debug("Creating language code map.");
+        try {
+            Map<String, String> result = CommonUtils.createCMDIComponentItemMap(url);
+            return result;
+        } catch (Exception e) {
+            throw new RuntimeException("Cannot instantiate postProcessor:", e);
+        }
+    }
+
+    private Map<String, String> createReverseCodeMap(String url) {
+        LOG.debug("Creating language code map.");
+        try {
+            Map<String, String> result = CommonUtils.createReverseCMDIComponentItemMap(url);
+            return result;
+        } catch (Exception e) {
+            throw new RuntimeException("Cannot instantiate postProcessor:", e);
+        }
+    }
+
+    private Map<String, String> createSilToIsoCodeMap() {
+        LOG.debug("Creating silToIso code map.");
+        try {
+            Map<String, String> result = new HashMap<String, String>();
+            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+            domFactory.setNamespaceAware(true);
+            URL url = new URL(VloConfig.getSilToISO639CodesUrl());
+            DocumentBuilder builder = domFactory.newDocumentBuilder();
+            Document doc = builder.parse(url.openStream());
+            XPath xpath = XPathFactory.newInstance().newXPath();
+            NodeList nodeList = (NodeList) xpath.evaluate("//lang", doc, XPathConstants.NODESET);
+            for (int i = 0; i < nodeList.getLength(); i++) {
+                Node node = nodeList.item(i);
+                String silCode = node.getFirstChild().getTextContent();
+                String isoCode = node.getLastChild().getTextContent();
+                result.put(silCode.toUpperCase(), isoCode);
+            }
+            return result;
+        } catch (Exception e) {
+            throw new RuntimeException("Cannot instantiate postProcessor:", e);
+        }
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageLinkPostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageLinkPostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/LanguageLinkPostProcessor.java	(revision 2882)
@@ -0,0 +1,59 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.util.Map;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class LanguageLinkPostProcessor extends LanguageCodePostProcessor {
+	private static LanguageCodePostProcessor languageCodePostProcessor = new LanguageCodePostProcessor();
+	
+    /**
+     * Returns the link to language information
+     * If no mapping is found the original value is returned.
+     */
+    @Override
+    public String process(String value) {        
+		String result = languageCodePostProcessor.process(value);
+        if (value != null) {
+            String langCode = extractISO639LanguageCode(value);
+            if(langCode.length() == 3)
+            	result = "<a href=\""+FacetConstants.LANGUAGE_LINK_PREFIX + langCode+"\">"+getLanguageNameForLanguageCode(langCode.toUpperCase())+"</a>";
+        }
+        return result;
+    }
+    
+    /**
+     * Try to guess the ISO 639-3 language code from value
+     * @param value
+     * @return ISO 639-3 code, or parameter value if it could not determined
+     */
+    protected String extractISO639LanguageCode(String value) {
+        String result = value.toLowerCase();
+        if (value.length() != 2 && value.length() != 3) {
+            if (value.startsWith(ISO639_3_PREFIX)) {
+                result = value.substring(ISO639_3_PREFIX.length());
+            } else if (value.startsWith(SIL_CODE_PREFIX) || value.startsWith(SIL_CODE_PREFIX_alt)) {
+                result = value.substring(value.lastIndexOf("-")+1);
+                Map<String, String> silToISOMap = getSilToIso639Map();
+                String isoCode = silToISOMap.get(result.toUpperCase());
+                if (isoCode != null) {
+                    result = isoCode;
+                }
+            } else {				// guessing based on language name
+            	if(getLanguageNameToIso639Map().containsKey(value))
+            		result = getLanguageNameToIso639Map().get(value).toLowerCase();
+            }
+        }
+
+        // SIL code?
+        if(result.length() == 2) {
+        	Map<String, String> silToISOMap = getSilToIso639Map();
+            String isoCode = silToISOMap.get(result.toUpperCase());
+            if (isoCode != null) {
+                result = isoCode;
+            }
+        }
+        
+        return result;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java	(revision 2882)
@@ -0,0 +1,471 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.CommonUtils;
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.DataRoot;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+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;
+import org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer;
+import org.apache.solr.client.solrj.util.ClientUtils;
+import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.common.params.MapSolrParams;
+import org.apache.solr.common.params.SolrParams;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The main metadataImporter class. Also contains the main function.
+ *
+ * The metadataimporter reads all the config files and then, for each
+ * metadatafile in each defined directory structure parses and imports them as
+ * defined in the configuration. The startImport function starts the importing
+ * and so on.
+ */
+
+@SuppressWarnings({"serial"})
+public class MetadataImporter {
+
+    /**
+     * Defines which files to try and parse.
+     * In this case all files ending in "xml" or "cmdi".
+     */
+    private static final String[] VALID_CMDI_EXTENSIONS = new String[] { "xml", "cmdi" };
+
+    /**
+     * Log log log log
+     */
+    protected final static Logger LOG = LoggerFactory.getLogger(MetadataImporter.class);
+    /**
+     * Some place to store errors.
+     */
+    private static Throwable serverError;
+    /**
+     * the solr server.
+     */
+    private StreamingUpdateSolrServer solrServer;
+    /**
+     * Defines the post-processor associations. At import, for each facet value,
+     * this map is checked and all postprocessors associated with the facet
+     * _type_ are applied to the value before storing the new value in the solr
+     * document.
+     */
+    final static Map<String, PostProcessor> POST_PROCESSORS = new HashMap<String, PostProcessor>();
+    static {
+        POST_PROCESSORS.put(FacetConstants.FIELD_COUNTRY, new CountryNamePostProcessor());
+        POST_PROCESSORS.put(FacetConstants.FIELD_LANGUAGE, new LanguageCodePostProcessor());
+        POST_PROCESSORS.put(FacetConstants.FIELD_RESOURCE_TYPE, new ResourceTypePostProcessor());
+        POST_PROCESSORS.put(FacetConstants.FIELD_LANGUAGES, new LanguageLinkPostProcessor());
+        POST_PROCESSORS.put(FacetConstants.FIELD_NATIONAL_PROJECT, new NationalProjectPostProcessor());
+        POST_PROCESSORS.put(FacetConstants.FIELD_CLARIN_PROFILE, new CMDIComponentProfileNamePostProcessor());
+    }
+    
+    /**
+     * Constructor
+     * 
+     * @param
+     */
+    public MetadataImporter (){
+    }
+
+    /**
+     * Contains MDSelflinks (usually).
+     * Just to know what we have already done.
+     */
+    protected final Set<String> processedIds = new HashSet<String>();
+    /**
+     * Some caching for solr documents (we are more efficient if we ram a whole
+     * bunch to the solr server at once.
+     */
+    protected List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
+
+    // SOME STATS
+    protected int nrOFDocumentsUpdated;
+    protected int nrOfFilesAnalyzed = 0;
+    protected int nrOfFilesWithoutId = 0;
+    protected int nrOfFilesWithoutDataResources = 0;
+    protected int nrOfFilesWithError = 0;
+
+    /**
+     * Retrieve all files with VALID_CMDI_EXTENSIONS from all DataRoot entries
+     * and starts processing for every single file
+     *
+     * @throws MalformedURLException
+     */
+    void startImport() throws MalformedURLException {
+
+        initSolrServer();
+        List<DataRoot> dataRoots = checkDataRoots();
+        long start = System.currentTimeMillis();
+        try {
+            // Delete the whole Solr db
+            if (VloConfig.deleteAllFirst()) {
+                LOG.info("Deleting original data...");
+                solrServer.deleteByQuery("*:*");
+                solrServer.commit();
+                LOG.info("Deleting original data done.");
+            }
+            for (DataRoot dataRoot : dataRoots) {
+                LOG.info("Start of processing: " + dataRoot.getOriginName());
+                if (dataRoot.deleteFirst()) {
+                    LOG.info("Deleting data for data provider: " + dataRoot.getOriginName());
+                    solrServer.deleteByQuery(FacetConstants.FIELD_DATA_PROVIDER + ":" + ClientUtils.escapeQueryChars(dataRoot.getOriginName()));
+                    LOG.info("Deleting data of provider done.");
+                }
+                CMDIDataProcessor processor = new CMDIParserVTDXML(POST_PROCESSORS);
+                List<File> files = getFilesFromDataRoot(dataRoot.getRootFile());
+                for (File file : files) {
+                    if (VloConfig.getUseMaxFileSize() && 
+                            file.length() > VloConfig.getMaxFileSize()) {
+                        LOG.info("Skipping " + file.getAbsolutePath() + " because it is too large.");
+                    } else {
+                        LOG.debug("PROCESSING FILE: " + file.getAbsolutePath());
+                        processCmdi(file, dataRoot, processor);
+                    }
+                }
+                if (!docs.isEmpty()) {
+                    sendDocs();
+                }
+                LOG.info("End of processing: " + dataRoot.getOriginName());
+            }
+        } catch (SolrServerException e) {
+            LOG.error("error updating files:\n", e);
+            LOG.error("Also see vlo_solr server logs for more information");
+        } catch (IOException e) {
+            LOG.error("error updating files:\n", e);
+        } finally {
+            try {
+                if (solrServer != null) {
+                    solrServer.commit();
+                    buildSuggesterIndex();
+                }                
+            } catch (SolrServerException e) {
+                LOG.error("cannot commit:\n", e);
+            } catch (IOException e) {
+                LOG.error("cannot commit:\n", e);
+            }
+        }
+        long took = (System.currentTimeMillis() - start) / 1000;
+        LOG.info("Found " + nrOfFilesWithoutId + " file(s) without an id. (id is generated based on fileName but that may not be unique)");
+        LOG.info("Found " + nrOfFilesWithError + " file(s) with errors.");
+        LOG.info("Found " + nrOfFilesWithoutDataResources
+                + " file(s) without data resources (metadata descriptions without resources are ignored).");
+        LOG.info("Update of " + nrOFDocumentsUpdated + " took " + took + " secs. Total nr of files analyzed " + nrOfFilesAnalyzed);
+    }
+
+    /**
+     * Check a List of DataRoots for existence of RootFile (typically parent
+     * directory of metadata files)
+     *
+     * @return
+     */
+    protected List<DataRoot> checkDataRoots() {
+        List<DataRoot> dataRoots = VloConfig.getDataRoots();
+        for (DataRoot dataRoot : dataRoots) {
+            if (!dataRoot.getRootFile().exists()) {
+                LOG.error("Root file " + dataRoot.getRootFile() + " does not exist. Probable configuration error so stopping import.");
+                System.exit(1);
+            }
+        }
+        return dataRoots;
+    }
+
+    /**
+     * Get the rootFile or all files with VALID_CMDI_EXTENSIONS if rootFile is a
+     * directory
+     *
+     * @param rootFile
+     * @return List with the rootFile or all contained files if rootFile is a
+     * directory
+     */
+    protected List<File> getFilesFromDataRoot(File rootFile) {
+        List<File> result = new ArrayList<File>();
+        if (rootFile.isFile()) {
+            result.add(rootFile);
+        } else {
+            Collection<File> listFiles = FileUtils.listFiles(rootFile, VALID_CMDI_EXTENSIONS, true);
+            result.addAll(listFiles);
+        }
+        return result;
+    }
+
+    /**
+     * Initialize SolrServer as specified in configuration file
+     *
+     * @throws MalformedURLException
+     */
+    protected void initSolrServer() throws MalformedURLException {
+        String solrUrl = VloConfig.getSolrUrl();
+        LOG.info("Initializing Solr Server on " + solrUrl);
+        solrServer = new StreamingUpdateSolrServer(solrUrl, 1000, 2) {
+            @Override
+            public void handleError(Throwable ex) {
+                super.handleError(ex);
+                serverError = ex;
+            }
+        };
+    }
+
+    /**
+     * Process single CMDI file with CMDIDataProcessor
+     *
+     * @param file CMDI input file
+     * @param dataOrigin
+     * @param processor
+     * @throws SolrServerException
+     * @throws IOException
+     */
+    protected void processCmdi(File file, DataRoot dataOrigin, CMDIDataProcessor processor) throws SolrServerException, IOException {
+        nrOfFilesAnalyzed++;
+        CMDIData cmdiData = null;
+        try {
+            cmdiData = processor.process(file);
+            if (!idOk(cmdiData.getId())) {
+                cmdiData.setId(dataOrigin.getOriginName() + "/" + file.getName()); //No id found in the metadata file so making one up based on the file name. Not quaranteed to be unique, but we have to set something.
+                nrOfFilesWithoutId++;
+            }
+        } catch (Exception e) {
+            LOG.error("error in file: " + file + " Exception", e);
+            nrOfFilesWithError++;
+        }
+        if (cmdiData != null && processedIds.add(cmdiData.getId())) {
+            SolrInputDocument solrDocument = cmdiData.getSolrDocument();
+            if (solrDocument != null) {
+                if (!cmdiData.getDataResources().isEmpty() || cmdiData.getMetadataResources().isEmpty()) {
+                    // We only add metadata files that have data resources (1) or files that don't link to other metadata files (2):
+                    //  1) files with data resources are obviously interesting
+                    //  2) files without metadata links and without dataResource can be interesting e.g. olac files describing a corpus with a link to the original archive.
+                    // Other files will have only metadata resources and are considered 'collection' metadata files they
+                    // are usually not very interesting (think imdi corpus files) and will not be included.
+                    updateDocument(solrDocument, cmdiData, file, dataOrigin);
+                } else {
+                    nrOfFilesWithoutDataResources++;
+                }
+            }
+        }
+    }
+
+    /**
+     * Check id for validness
+     *
+     * @param id
+     * @return true if id is acceptable, false otherwise
+     */
+    protected boolean idOk(String id) {
+        return id != null && !id.isEmpty();
+    }
+
+    /**
+     * Adds some additional information from DataRoot to solrDocument, add
+     * solrDocument to document list, submits list to SolrServer every 1000
+     * files
+     *
+     * @param solrDocument
+     * @param cmdiData
+     * @param file
+     * @param dataOrigin
+     * @throws SolrServerException
+     * @throws IOException
+     */
+    protected void updateDocument(SolrInputDocument solrDocument, CMDIData cmdiData, File file, DataRoot dataOrigin) throws SolrServerException,
+            IOException {
+        if (!solrDocument.containsKey(FacetConstants.FIELD_COLLECTION)) {
+            solrDocument.addField(FacetConstants.FIELD_COLLECTION, dataOrigin.getOriginName());
+        }
+        solrDocument.addField(FacetConstants.FIELD_DATA_PROVIDER, dataOrigin.getOriginName());
+        solrDocument.addField(FacetConstants.FIELD_ID, cmdiData.getId());
+        solrDocument.addField(FacetConstants.FIELD_FILENAME, file.getAbsolutePath());
+
+        String metadataSourceUrl = dataOrigin.getPrefix();
+        //System.out.println(dataOrigin.getTostrip());
+        //System.out.println(dataOrigin.getTostrip().length());
+        //System.out.println(file.getAbsolutePath());
+        metadataSourceUrl += file.getAbsolutePath().substring(dataOrigin.getToStrip().length());
+
+        solrDocument.addField(FacetConstants.FIELD_COMPLETE_METADATA, metadataSourceUrl);
+
+        // add SearchServices (should be CQL endpoint)
+        for (Resource resource : cmdiData.getSearchResources()) {
+            solrDocument.addField(FacetConstants.FIELD_SEARCH_SERVICE, resource.getResourceName());
+        }
+
+        // add landing page resource
+        for (Resource resource : cmdiData.getLandingPageResources()) {
+            solrDocument.addField(FacetConstants.FIELD_LANDINGPAGE, resource.getResourceName());
+        }
+        
+        // add search page resource
+        for (Resource resource : cmdiData.getSearchPageResources()) {
+            solrDocument.addField(FacetConstants.FIELD_SEARCHPAGE, resource.getResourceName());
+        }
+        
+        addResourceData(solrDocument, cmdiData);
+        docs.add(solrDocument);
+        if (docs.size() == VloConfig.getMaxOnHeap()) {
+            sendDocs();
+        }
+    }
+
+    /**
+     * Adds two fields FIELD_RESOURCE_TYPE and FIELD_RESOURCE. The Type can be
+     * specified in the "ResourceType" element of an imdi file or possibly
+     * overwritten by some more specific xpath (as in the LRT cmdi files). So if
+     * a type is overwritten and already in the solrDocument we take that type.
+     */
+    protected void addResourceData(SolrInputDocument solrDocument, CMDIData cmdiData) {
+        List<Object> fieldValues = solrDocument.containsKey(FacetConstants.FIELD_RESOURCE_TYPE) ? new ArrayList<Object>(solrDocument
+                .getFieldValues(FacetConstants.FIELD_RESOURCE_TYPE)) : null;
+        solrDocument.removeField(FacetConstants.FIELD_RESOURCE_TYPE); //Remove old values they might be overwritten.
+        List<Resource> resources = cmdiData.getDataResources();
+        for (int i = 0; i < resources.size(); i++) {
+            Resource resource = resources.get(i);
+            String mimeType = resource.getMimeType();
+            String resourceType = mimeType;
+            if (mimeType == null) {
+                if (fieldValues != null && i < fieldValues.size()) {
+                    resourceType = fieldValues.get(i).toString(); //assuming there will be as many resource types overwritten as there are specified
+                    mimeType = CommonUtils.normalizeMimeType(resourceType);
+                } else {
+                    mimeType = CommonUtils.normalizeMimeType("");
+                    resourceType = mimeType;
+                }
+            } else {
+                resourceType = CommonUtils.normalizeMimeType(mimeType);
+            }
+            solrDocument.addField(FacetConstants.FIELD_RESOURCE_TYPE, resourceType);
+            solrDocument.addField(FacetConstants.FIELD_RESOURCE, mimeType + FacetConstants.FIELD_RESOURCE_SPLIT_CHAR
+                    + resource.getResourceName());
+        }
+    }
+
+    /**
+     * Send current list of SolrImputDocuments to SolrServer and clears list
+     * afterwards
+     *
+     * @throws SolrServerException
+     * @throws IOException
+     */
+    protected void sendDocs() throws SolrServerException, IOException {
+        LOG.info("Sending " + docs.size() + " docs to solr server. Total number of docs updated till now: " + nrOFDocumentsUpdated);
+        nrOFDocumentsUpdated += docs.size();
+        solrServer.add(docs);
+        if (serverError != null) {
+            throw new SolrServerException(serverError);
+        }
+        docs = new ArrayList<SolrInputDocument>();
+    }
+    
+    /**
+     * Builds suggester index for autocompletion
+     *
+     * @throws SolrServerException
+     * @throws MalformedURLException
+     */
+    private void buildSuggesterIndex() throws SolrServerException, MalformedURLException {
+    	LOG.info("Building index for autocompletion.");
+    	HashMap<String,String> paramMap = new HashMap<String, String>();
+    	paramMap.put("qt", "/suggest");
+    	paramMap.put("spellcheck.build", "true");
+    	SolrParams params = new MapSolrParams(paramMap);
+    	solrServer.query(params);
+    }
+
+    /**
+     * @param args
+     * @throws IOException
+     */
+    public static void main(String[] args) throws MalformedURLException, IOException { 
+
+        // application configuration
+        VloConfig config;
+        
+        // path to the configuration file
+        String configFile = null;
+        
+        // use the Apache cli framework for getting command line parameters
+        Options options = new Options();
+
+        /**
+         * Add a "c" option, the option indicating the specification of an XML
+         * configuration file
+         */
+        options.addOption("c", true, "-c <file> : use parameters specified in <file>");
+
+        CommandLineParser parser = new PosixParser();
+
+        try {
+            // parse the command line arguments
+            CommandLine cmd = parser.parse(options, args);
+            if (cmd.hasOption("c")) {
+                
+                // the "c" option was specified, now get its value
+                configFile = cmd.getOptionValue("c");
+            }
+
+        } catch (org.apache.commons.cli.ParseException ex) {
+            
+            /**
+             * Caught an exception caused by command line parsing. Try to get
+             * the name of the configuration file by querying the system
+             * property.
+             */
+
+            String message = "Command line parsing failed. " + ex.getMessage();
+            LOG.error(message);
+            System.err.println(message);
+        }
+        
+        if (configFile == null){
+
+            String message;
+
+            message = "Could not get config file name via the command line, trying the system properties.";
+            LOG.info(message);
+            
+            String key;
+
+            key = "configFile";
+            configFile = System.getProperty(key);
+        }
+
+        if (configFile == null) {
+            
+            String message;
+            
+            message = "Could not get filename as system property either - stopping.";
+            LOG.error(message);
+        } else {
+            // read the configuration from the externally supplied file
+            VloConfig.readConfig(configFile);
+
+            // optionally, modify the configuration here
+
+            // create and start the importer
+            MetadataImporter importer = new MetadataImporter();
+            importer.startImport();
+
+            // finished importing
+
+            if (VloConfig.printMapping()) {
+                File file = new File("xsdMapping.txt");
+                FacetMappingFactory.printMapping(file);
+                LOG.info("Printed facetMapping in " + file);
+            }
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java	(revision 2882)
@@ -0,0 +1,124 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
+/**
+ * Adds information about the affiliation of a metadata file to a national project (like CLARIN-X etc.) into facet nationalProject
+ * @author Thomas Eckart
+ *
+ */
+public class NationalProjectPostProcessor extends LanguageCodePostProcessor {
+	private final static Logger LOG = LoggerFactory.getLogger(NationalProjectPostProcessor.class);
+
+	//private static String mappingFileName = "nationalProjectsMapping.xml";
+	private static Map<String, String> nationalProjectMap = null;
+
+	/**
+	 * Returns the national project based on the mapping in Configuration.getNationalProjectMapUrl()
+	 * If no mapping was found empty String is returned
+	 * @return
+	 */
+	@Override
+    public String process(String value) {
+        String result = value.trim();
+        if (result != null && getMapping().containsKey(result)) {
+            result = getMapping().get(result);
+        } else {
+        	result = "";
+        }
+        return result;
+    }
+
+	private Map<String, String> getMapping() {
+		if(nationalProjectMap == null)
+			nationalProjectMap = getNationalProjectMapping();
+		return  nationalProjectMap;
+	}
+
+	private Map<String, String> getNationalProjectMapping() {
+        String mappingFileName = VloConfig.getNationalProjectMapping();
+        if(mappingFileName == null){
+            throw new RuntimeException("Configuration Error, NationalProjectMapping is null");
+        }
+		LOG.debug("Creating national project map.");
+        try {
+            Map<String, String> result = new HashMap<String, String>();
+            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+            domFactory.setNamespaceAware(true);
+
+            DocumentBuilder builder = domFactory.newDocumentBuilder();
+            Document doc;
+
+            // File mappingFile = new File(mappingFileName);
+
+            // first, try to open the packaged mapping file
+            InputStream mappingFileAsStream;
+            mappingFileAsStream = NationalProjectPostProcessor.class.getResourceAsStream(mappingFileName);
+
+            if (mappingFileAsStream != null) {
+                doc = builder.parse(mappingFileAsStream);
+            } else {
+
+                // the resource cannot be found inside the package, try outside
+                File mappingAsFile;
+
+                mappingAsFile = new File(mappingFileName);
+
+                if (mappingAsFile == null) {
+                    LOG.info("National project mapping file does not exist - using minimal test file.");
+                    mappingAsFile = createMinimalMappingFile();
+                }
+                doc = builder.parse(mappingAsFile);
+            }
+         
+            XPath xpath = XPathFactory.newInstance().newXPath();
+            NodeList nodeList = (NodeList) xpath.evaluate("//nationalProjectMapping", doc, XPathConstants.NODESET);
+            for (int i = 1; i <= nodeList.getLength(); i++) {
+                String mdCollectionDisplayName = xpath.evaluate("//nationalProjectMapping["+i+"]/MdCollectionDisplayName", doc).trim();
+                String nationalProject = xpath.evaluate("//nationalProjectMapping["+i+"]/NationalProject", doc).trim();
+                result.put(mdCollectionDisplayName, nationalProject);
+            }
+            return result;
+        } catch (Exception e) {
+            throw new RuntimeException("Cannot instantiate postProcessor:", e);
+        }
+	}
+
+	/**
+	 * Create temporary and minimal mapping file for testing purposes and as backup solution
+	 * @return minimal file for national projects mapping (e.g. ANDES -> CLARIN-EU)
+	 */
+	private File createMinimalMappingFile() {
+		String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
+        content += "<nationalProjects>\n";
+        content += "   <nationalProjectMapping><MdCollectionDisplayName>ANDES</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>\n";
+        content += "</nationalProjects>\n";
+
+        File file = null;
+        try {
+        	file = File.createTempFile("vlo.nationalTestMapping", ".map");
+        	FileUtils.writeStringToFile(file, content, "UTF-8");
+        } catch (IOException ioe) {
+        	ioe.printStackTrace();
+        	LOG.error("Could not create temporary national project mapping file");
+        }
+
+        return file;
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/PostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/PostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/PostProcessor.java	(revision 2882)
@@ -0,0 +1,15 @@
+package eu.clarin.cmdi.vlo.importer;
+
+/**
+ * Defines the interface for a postprocessor.
+ *
+ * Such a postprossor is called on a single facet value after this facet value is inserted into the solr document during import.
+ *
+ * at the start of MetadataImporter which postprocessors (if any) are used for which facet are defined.
+ */
+
+public interface PostProcessor {
+
+    public String process(String value);
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/Resource.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/Resource.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/Resource.java	(revision 2882)
@@ -0,0 +1,27 @@
+package eu.clarin.cmdi.vlo.importer;
+
+public class Resource {
+
+    private final String resourceName;
+    private final String mimeType;
+    private final String type;
+
+    public Resource(String resourceName,String type, String mimeType) {
+        this.resourceName = resourceName;
+        this.mimeType = mimeType == "" ? null : mimeType;
+        this.type = type;
+    }
+
+    public String getResourceName() {
+        return resourceName;
+    }
+
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    public String getType(){
+        return type;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessor.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessor.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessor.java	(revision 2882)
@@ -0,0 +1,46 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class ResourceTypePostProcessor implements PostProcessor {
+
+	private Map<String, String> resourceTypeMap = null;
+
+	@Override
+	public String process(String value) {
+		String result = value;
+		if (value != null) {
+			String newVal = getResourceTypeMap().get(value.trim().toLowerCase());
+			if (newVal != null) {
+				result = newVal;
+			}
+		}
+		return result;
+	}
+
+        /*
+         * kj: mime type versus resource type
+         */
+	private Map<String, String> getResourceTypeMap() {
+		if (resourceTypeMap == null) {
+			resourceTypeMap = new HashMap<String, String>();
+			// OLAC DCMIType values.
+			resourceTypeMap.put("still image", FacetConstants.RESOURCE_TYPE_IMAGE);
+			resourceTypeMap.put("sound", FacetConstants.RESOURCE_TYPE_AUDIO);
+			resourceTypeMap.put("moving image", FacetConstants.RESOURCE_TYPE_VIDEO);
+			resourceTypeMap.put("text", FacetConstants.RESOURCE_TYPE_TEXT); // Transformes uppercase Text -> text
+			resourceTypeMap.put("audio/mp3", FacetConstants.RESOURCE_TYPE_AUDIO);
+			resourceTypeMap.put("audio/mpeg", FacetConstants.RESOURCE_TYPE_AUDIO);
+			resourceTypeMap.put("audio/wav", FacetConstants.RESOURCE_TYPE_AUDIO);
+			resourceTypeMap.put("audio/x-wav", FacetConstants.RESOURCE_TYPE_AUDIO);
+			
+			resourceTypeMap.put("text/xml", FacetConstants.RESOURCE_TYPE_TEXT);
+			resourceTypeMap.put("text/html", FacetConstants.RESOURCE_TYPE_TEXT);
+		}
+		return resourceTypeMap;
+	}
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/VLOMarshaller.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/VLOMarshaller.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/VLOMarshaller.java	(revision 2882)
@@ -0,0 +1,44 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import java.io.InputStream;
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+public class VLOMarshaller {
+    private final static String FACETCONCEPTS_FILENAME = "facetConcepts.xml";
+
+    public static FacetConceptMapping getFacetConceptMapping() {
+        InputStream inputStream = VLOMarshaller.class.getResourceAsStream("/" + FACETCONCEPTS_FILENAME);
+        return unmarshal(inputStream);
+
+    }
+
+    static FacetConceptMapping unmarshal(InputStream in) {
+        try {
+            JAXBContext jc = JAXBContext.newInstance(FacetConceptMapping.class);
+            Unmarshaller u = jc.createUnmarshaller();
+            FacetConceptMapping result = (FacetConceptMapping) u.unmarshal(in);
+            return result;
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    static String marshal(FacetConceptMapping f) {
+        try {
+            JAXBContext jc = JAXBContext.newInstance(FacetConceptMapping.class);
+            Marshaller marshaller = jc.createMarshaller();
+            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+            StringWriter writer = new StringWriter();
+            marshaller.marshal(f, writer);
+            return writer.toString();
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/VloConfig.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/VloConfig.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/VloConfig.xml	(revision 2882)
@@ -0,0 +1,82 @@
+<VloConfig>
+   
+    <deleteAllFirst>true</deleteAllFirst>
+    
+    <maxOnHeap>128</maxOnHeap>
+    
+    <useMaxFileSize>true</useMaxFileSize>
+    
+    <maxFileSize>10000000</maxFileSize>
+    
+    <useHandleResolver>false</useHandleResolver>
+    
+    <printMapping>false</printMapping>
+    
+    <dataRoots length="3">
+        <DataRoot>
+            <originName>MPI IMDI Archive</originName>
+            <rootFile>/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/</rootFile>            
+            <prefix>http://catalog.clarin.eu/</prefix>
+            <tostrip>/lat/apache/htdocs/</tostrip>
+            <deleteFirst>false</deleteFirst>
+        </DataRoot>
+
+        <DataRoot>
+            <originName>CMDI Providers</originName>
+            <rootFile>/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/</rootFile>            
+            <prefix>http://catalog.clarin.eu/</prefix>
+            <tostrip>/lat/apache/htdocs/</tostrip>
+            <deleteFirst>false</deleteFirst>
+        </DataRoot>
+
+        <DataRoot>
+            <originName>OLAC Metadata Providers</originName>
+            <rootFile>/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/</rootFile>            
+            <prefix>http://catalog.clarin.eu/</prefix>
+            <tostrip>/lat/apache/htdocs/</tostrip>
+            <deleteFirst>false</deleteFirst>
+        </DataRoot>
+    </dataRoots>
+   
+    <vloHomeLink>http://www.clarin.eu/vlo</vloHomeLink>
+    
+    <solrUrl>http://localhost:8084/vlo_solr/</solrUrl>
+    
+    <profileSchemaUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/{PROFILE_ID}/xsd</profileSchemaUrl>
+    
+    <componentRegistryRESTURL>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/</componentRegistryRESTURL>
+    
+    <handleServerUrl>http://hdl.handle.net/</handleServerUrl>
+    
+    <imdiBrowserUrl>http://corpus1.mpi.nl/ds/imdi_browser?openpath=</imdiBrowserUrl>
+    
+    <nationalProjectMapping>/nationalProjectsMapping.xml</nationalProjectMapping>
+    
+    <facetFields length="11">
+        <facetField>collection</facetField>
+        <facetField>language</facetField>
+        <facetField>continent</facetField>
+        <facetField>genre</facetField>
+        <facetField>country</facetField>
+        <facetField>subject</facetField>
+        <facetField>organisation</facetField>
+        <facetField>resourceType</facetField>
+        <facetField>dataProvider</facetField>
+        <facetField>nationalProject</facetField>
+        <facetField>tag</facetField>
+    </facetFields>
+    
+    <countryComponentUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml</countryComponentUrl>
+    
+    <languageLinkPrefix>http://infra.clarin.eu/service/language/info.php?code=</languageLinkPrefix>
+    
+    <feedbackFromUrl>http://www.clarin.eu/node/3759?url=</feedbackFromUrl>
+
+    <language2LetterCodeComponentUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml</language2LetterCodeComponentUrl>
+    
+    <language3LetterCodeComponentUrl>http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml</language3LetterCodeComponentUrl>
+   
+    <silToISO639CodesUrl>http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml</silToISO639CodesUrl>
+    
+    <FederatedContentSearchUrl>http://weblicht.sfs.uni-tuebingen.de/Aggregator/</FederatedContentSearchUrl>
+</VloConfig>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/cmdi2xhtml.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/cmdi2xhtml.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/cmdi2xhtml.xsl	(revision 2882)
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    xmlns:cmd="http://www.clarin.eu/cmd/"
+    xmlns:fn="http://www.w3.org/2005/xpath-functions"
+    exclude-result-prefixes="xs"
+    version="2.0"
+    xpath-default-namespace="http://www.clarin.eu/cmd/">
+    <!--    
+    <!DOCTYPE html>
+    -->
+
+    <xsl:output
+        method="html"
+        encoding="UTF-8"
+        doctype-system="about:legacy-compat"
+        indent="yes"
+        cdata-section-elements="td"/>
+    
+    <xsl:param name="prune_Components_branches_without_text_values" as="xs:boolean" select='false()'/>
+    
+
+    <xsl:template name="Component_tree" match="/CMD/Components">
+        <xsl:param name="nodeset" as="element()+" select="/CMD/Components"/>
+
+        <ul>
+            <xsl:for-each select="$nodeset/element()">
+                <xsl:variable name="subnodes_text" select="fn:normalize-space(fn:string-join(descendant-or-self::element()/text(), ''))" as="xs:string+"/>
+                <xsl:if test="not($subnodes_text = '' and $prune_Components_branches_without_text_values)">
+                    <xsl:variable name="nchildren" select="fn:count(child::element())"/>
+                     <li>
+                     
+                     <code class="node">
+                         <xsl:value-of select="fn:concat(local-name(), ' ')"/>
+                         <xsl:if test="count(@*) > 0">
+                             <div class="attributes">
+                                 <xsl:for-each select="@*">
+                                     <xsl:value-of select="name()"/>="<xsl:value-of select="."/>"
+                                 </xsl:for-each>
+                             </div>
+                         </xsl:if>
+                     </code>
+                    
+                     <xsl:choose>
+                         <xsl:when test="$nchildren = 0">
+                             <!--<br /><br />-->
+                             <div class="Component_tree_node_content">
+                                 <xsl:variable name="leaf_value" select="self::element()"                       as="xs:string"/>
+                                 <xsl:variable name="HTTP_URL"   select="starts-with($leaf_value, 'http://')"   as="xs:boolean"/> 
+                                 <code class="leaf">
+                                 <xsl:choose>
+                                     <xsl:when test="$HTTP_URL">
+                                         <a href="{$leaf_value}"><xsl:value-of select="$leaf_value"/></a>
+                                     </xsl:when>
+                                     <xsl:otherwise>                                    
+                                             <xsl:value-of select="$leaf_value"/>                                         
+                                     </xsl:otherwise>                                 
+                                 </xsl:choose>
+                                 </code>
+                             </div>
+                         </xsl:when>
+                         <xsl:otherwise>
+                             <ul>
+                                 <xsl:call-template name="Component_tree">
+                                     <xsl:with-param name="nodeset" select="self::element()"/>
+                                 </xsl:call-template>
+                             </ul>
+                         </xsl:otherwise>
+                     </xsl:choose>
+                                     
+                    </li>                                
+                </xsl:if>
+            </xsl:for-each>
+        </ul>
+    </xsl:template>
+
+
+    <xsl:template match="CMD">
+                <style media="screen" type="text/css">
+                    <![CDATA[
+                    li
+                    {
+                        margin: 20px;
+                        margin-left: -1.2em;
+                    }
+                    
+                    .node
+                    {
+                        background-color: rgba(188, 205, 232, 0.8);
+                        border: 1px ridge;
+                        font-weight: bold;
+                        padding: 5px;
+                        /*float: left;*/
+                    }                    
+                    
+                    .leaf
+                    {
+                    }                    
+                    
+                    .Component_tree_node_content
+                    {
+                        background-color: rgba(188, 200, 232, 0.3);
+                        border: 1px dotted red;                        
+                        margin-top: 10px;
+                        margin-left: 10px;
+                        padding: 5px;
+                        display: inline-block;
+                        /*float: left;*/       
+                        /*display: table-cell;*/
+                    }                    
+                    
+                    .attributes
+                    {                        
+                        display: inline-block;
+                        font-style: italic;
+                        font-weight: normal;
+                        /*background-color: rgba(100, 201, 234, 0.4);*/
+                    }
+                    
+                    footer
+                    {
+                        border: 1px dotted;
+                    }                    
+                    
+                    address
+                    {
+                        display: inline-block;
+                    }
+                    
+                    .searchword { background-color: yellow; }
+                    ]]>
+                </style>
+                <article style="background-color:#EEEEEE">
+                    <div class="endgame">
+                        <p>
+                            <h1>Resources</h1>
+                            <table>
+                                <caption>Resources</caption>
+                                <thead>
+                                    <tr>
+                                        <th class="attribute">Reference to resource</th>
+                                        <th class="attribute">Resource description</th>
+                                        <th class="attribute">Resource MIME type</th>
+                                        <th class="attribute">Resource Proxy ID</th>
+                                    </tr>
+                                </thead>
+                                <tbody class="attributesTbody">
+                                    <xsl:for-each select="Resources/ResourceProxyList/ResourceProxy">
+                                        <xsl:variable name="URI"                                select="ResourceRef/text()"                                 as="xs:string"/>
+                                        <tr> 
+                                            <td class="attributeValue">                                                
+                                                <xsl:variable name="protocol"                   select="fn:substring-before($URI, ':')"                     as="xs:string"/>
+                                                <xsl:choose>
+                                                    <xsl:when test="$protocol = 'hdl'">
+                                                        <xsl:variable name="HANDLE_PREFIX"      select="'http://hdl.handle.net'"                            as="xs:string"/>                                                
+                                                        <xsl:variable name="Handle_reference"   select="fn:substring-after($URI, ':')"                      as="xs:string"/>
+                                                        <xsl:variable name="Handle_HTTP_URL"    select="fn:concat($HANDLE_PREFIX, '/', $Handle_reference)"     as="xs:string"/>
+                                                        <a href="{$Handle_HTTP_URL}"><xsl:value-of select="$Handle_HTTP_URL"/></a>
+                                                    </xsl:when>
+                                                    <xsl:otherwise>
+                                                        <a href="{ResourceRef}"><xsl:value-of select="ResourceRef"/></a>
+                                                    </xsl:otherwise>
+                                                </xsl:choose>                                                
+                                            </td>
+                                            <td class="attributeValue">
+                                                <xsl:value-of select="ResourceType"/>
+                                            </td>
+                                            <td class="attributeValue">
+                                                <xsl:value-of select="ResourceType/@mimetype"/>
+                                            </td>
+                                            <td class="attributeValue">
+                                                <xsl:value-of select="./@id"/>
+                                            </td>
+                                        </tr>
+                                    </xsl:for-each>
+                                </tbody>
+                            </table>
+                        </p>
+                    </div>
+                    
+                    <p>
+                        <h1>Metadata content</h1>
+                        <xsl:call-template name="Component_tree"/>
+                    </p>
+                </article>
+    </xsl:template>
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/facetConcepts.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/facetConcepts.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/facetConcepts.xml	(revision 2882)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<facetConcepts>
+  <facetConcept name="id" allowMultipleValues="false">
+    <concept>http://www.isocat.org/datcat/DC-2573</concept>
+    <pattern>/c:CMD/c:Header/c:MdSelfLink/text()</pattern>
+  </facetConcept>
+  <facetConcept name="collection">
+    <pattern>/c:CMD/c:Header/c:MdCollectionDisplayName/text()</pattern>
+  </facetConcept>
+  <facetConcept name="projectName">
+    <concept>http://www.isocat.org/datcat/DC-2536</concept>
+    <concept>http://www.isocat.org/datcat/DC-2537</concept>
+  </facetConcept>
+  <facetConcept name="name" allowMultipleValues="false">
+      <concept>http://www.isocat.org/datcat/DC-4160</concept><!-- CLARIN-D Webservices name -->
+      <concept>http://www.isocat.org/datcat/DC-4114</concept>
+    <concept>http://www.isocat.org/datcat/DC-2544</concept>
+    <concept>http://www.isocat.org/datcat/DC-2545</concept>
+    <concept>http://www.isocat.org/rest/dc/4160</concept>
+    <concept>http://purl.org/dc/terms/title</concept>
+    <pattern>/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceName/text()</pattern> <!-- no concept in lrt schema -->
+  </facetConcept>
+  <facetConcept name="year">
+    <concept>http://www.isocat.org/datcat/DC-2509</concept>
+    <concept>http://www.isocat.org/datcat/DC-2510</concept>
+  </facetConcept>
+  <facetConcept name="continent">
+    <concept>http://www.isocat.org/datcat/DC-2531</concept>
+  </facetConcept>
+  <facetConcept name="country">
+    <concept>http://www.isocat.org/datcat/DC-2532</concept>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:spatial[@dcterms-type="ISO3166"]/text()</pattern>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:coverage[@dcterms-type="ISO3166"]/text()</pattern>
+  </facetConcept>
+  <facetConcept name="language">
+    <concept>http://www.isocat.org/datcat/DC-2482</concept> <!-- language code -->
+    <concept>http://www.isocat.org/datcat/DC-2484</concept> <!-- language name -->
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language</pattern>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language</pattern>
+    <pattern>/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()</pattern>
+  </facetConcept>
+  <facetConcept name="languages">
+    <concept>http://www.isocat.org/datcat/DC-2482</concept> <!-- language code -->
+    <concept>http://www.isocat.org/datcat/DC-2484</concept> <!-- language name -->
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language</pattern>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language</pattern>
+    <pattern>/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()</pattern>
+  </facetConcept>
+  <facetConcept name="organisation">
+    <concept>http://www.isocat.org/datcat/DC-2459</concept>
+    <concept>http://www.isocat.org/datcat/DC-2979</concept>
+    <concept>http://purl.org/dc/terms/publisher</concept>
+  </facetConcept>
+  <facetConcept name="genre" isCaseInsensitive="true" allowMultipleValues="false">
+    <concept>http://www.isocat.org/datcat/DC-2470</concept>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/@olac-linguistic-type</pattern> <!-- Find concept and add attribute somehow -->
+  </facetConcept>
+  <facetConcept name="subject" isCaseInsensitive="true" allowMultipleValues="false">
+    <concept>http://www.isocat.org/datcat/DC-2591</concept>
+     <concept>http://purl.org/dc/terms/subject</concept>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-linguistic-field</pattern>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject[@dcterms-type="LCSH"]/text()</pattern>   
+  </facetConcept>
+  <facetConcept name="description">
+    <concept>http://www.isocat.org/datcat/DC-2520</concept>
+    <concept>http://purl.org/dc/terms/description</concept>
+  </facetConcept>
+  <facetConcept name="resourceType">
+    <concept>http://www.isocat.org/datcat/DC-2571</concept>
+    <concept>http://purl.org/dc/terms/type</concept>
+    <pattern>/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceType/text()</pattern>
+    <pattern>/c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/text()</pattern>    
+  </facetConcept>
+  <facetConcept name="nationalProject">
+    <pattern>/c:CMD/c:Header/c:MdCollectionDisplayName/text()</pattern>
+  </facetConcept>
+  <facetConcept name="text">
+	<pattern>/c:CMD//text()</pattern>
+  </facetConcept>
+  <facetConcept name="_componentProfile">
+    <pattern>/c:CMD/c:Header/c:MdProfile/text()</pattern>
+  </facetConcept>
+  <facetConcept name="tag">
+	<concept>http://www.isocat.org/datcat/DC-5436</concept>
+	<concept>http://www.isocat.org/rest/dc/5436</concept>  not an official ISOcat PID - added to support LrtInventoryResource, should be removed in the future 
+  </facetConcept>
+</facetConcepts>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/log4j.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/log4j.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/log4j.properties	(revision 2882)
@@ -0,0 +1,12 @@
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
+
+log4j.rootLogger=INFO,Stdout
+
+log4j.logger.org.apache.wicket=INFO
+log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
+log4j.logger.org.apache.wicket.version=INFO
+log4j.logger.org.apache.wicket.RequestCycle=INFO
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/nationalProjectsMapping.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/nationalProjectsMapping.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/main/resources/nationalProjectsMapping.xml	(revision 2882)
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- This file contains the mapping from MDCollectionDisplayName entries in meta data files to their national projects --> 
+<nationalProjects>
+	<nationalProjectMapping><MdCollectionDisplayName>Berlin-Brandenburgische Akademie der Wissenschaften</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>CLARIN LRT inventory</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>WebLicht Webservice Orchestrator</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>TÃŒbingen Language Resources</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Acquisition</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Adaptive Listening Group</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>AILLA</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>ANDES</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Bavarian Archive for Speech Signals (BAS)</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>childes</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Comparative cognitive anthropology</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Comprehension</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>CORP-ORAL</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>DBD</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Demo</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>ECHO</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Endangered Languages</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Evolutionary Processes in Language and Culture</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>GTRP Corpus</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Humanethologisches Filmarchiv</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>IFA corpus</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>ILSP INTERA contribution</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Individual differences in language processing</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Language and Cognition</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Leiden Archives</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>LexoBlock registry</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>MPI CGN</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>MPI fÃŒr Bildungsforschung</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Multilingualism</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Neurobiology of language</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Nijmegen corpora of casual speech</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>SUCA</MdCollectionDisplayName><NationalProject>CLARIN-EU</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Sign Language</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Sign Language Typology</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>talkbank</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>CLARIN-NL webservices</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection: Soundbites</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection: Dynamische Fonologische en Morfologische Atlas van de Nederlandse Dialecten (GTRP)</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection: Diversity in Dutch DP Design (DiDDD)</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection: Dynamische Syntactische Atlas van de Nederlandse Dialecten (DynaSAND)</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens collection: Liederenbank</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Meertens Collection: Heiloo toponiemen</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Nederlands Instituut voor Beeld en Geluid Academia collectie</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>INL Taalbank Nederlands</MdCollectionDisplayName><NationalProject>CLARIN-NL</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>UniversitÃ€t des Saarlandes CLARIN-D-Zentrum</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping> 
+	<nationalProjectMapping><MdCollectionDisplayName>UniversitÃ€t des Saarlandes CLARIN-D-Zentrum, SaarbrÃŒcken</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>DK-CLARIN Repository</MdCollectionDisplayName><NationalProject>DK-CLARIN</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: External Data</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: External Tools </MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>LINDAT-Clarin repository</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: MU - Published Data</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: MU - Published Software</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: UFAL - Published Data</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: UFAL - Published Software</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Lindat-Clarin: ZÄU - Published Data</MdCollectionDisplayName><NationalProject>LINDAT (CLARIN-CZ)</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Leipzig Corpora Collection</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Hamburg Adult Bilingual LAnguage (HABLA)</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Hamburg Corpus of Argentinean Spanish (HaCASpa)</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	<nationalProjectMapping><MdCollectionDisplayName>Hamburg Corpus of Polish in Gemany (HamCoPoliG)</MdCollectionDisplayName><NationalProject>CLARIN-D</NationalProject></nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>AVATecH webservices</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+		
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Dolmetschen im Krankenhaus (DiK)</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>EXMARaLDA Demo corpus</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>HZSK Webservices</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Hamburg Adult Bilingual LAnguage (HABLA)</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Hamburg Corpus of Argentinean Spanish (HaCASpa)</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	 
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Hamburg Corpus of Polish in Gemany (HamCoPoliG)</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping> 
+	 
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>The Hamburg MapTask Corpus (HAMATAC)</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	 
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>TÃŒbingen Curated Resource</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping>
+	 
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Humboldt University of Berlin</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping> 
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Institut fÃŒr Deutsche Sprache, CLARIN-D Zentrum, Mannheim</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping> 
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>TLA Collections</MdCollectionDisplayName>
+		<NationalProject>CLARIN-D</NationalProject>
+	</nationalProjectMapping> 
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Corpus NGT</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Dictionary of the Brabantic dialect</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Dictionary of the Brabantic dialects - subcollection with core data</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Dictionary of the Limburgian dialects</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Dictionary of the Limburgian dialects - subcollection with core data</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Meertens Collection: GBA-derived</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Meertens Collection: GBA-derived - sub COROP area</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Meertens Collection: GBA-derived - sub dialectarea</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Meertens Collection: GBA-derived - sub municipality</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>Meertens Collection: GBA-derived - sub province</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>NEHOL</MdCollectionDisplayName>
+		<NationalProject>CLARIN-NL</NationalProject>
+	</nationalProjectMapping>
+	
+	<nationalProjectMapping>
+		<MdCollectionDisplayName>TST-Centrale</MdCollectionDisplayName>
+		<NationalProject>Dutch Language Union</NationalProject>
+	</nationalProjectMapping>
+	
+	
+</nationalProjects>
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigTest.java	(revision 2882)
@@ -0,0 +1,756 @@
+
+package eu.clarin.cmdi.vlo.config;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ * @author keeloo
+ */
+public class VloConfigTest {
+    
+    public VloConfigTest() {
+    }
+    
+    @Before
+    public void setUp() {        
+        VloConfig.readPackagedConfig();
+    }
+
+    /**
+     * Test the getDataRoots method.<br><br>
+     * 
+     * Use the values defined in the packaged {@literal VloConfig.xml} 
+     * configuration file.
+     */
+    @Test
+    public void testGetDataRoots() {
+        
+        ArrayList<DataRoot> dataRoots;
+        dataRoots = new ArrayList<DataRoot> ();
+        
+        dataRoots.add(new DataRoot("MPI IMDI Archive", 
+                                    new File("/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false));
+        dataRoots.add(new DataRoot("CMDI Providers"  , 
+                                    new File("/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false));
+        dataRoots.add(new DataRoot("OLAC Metadata Providers", 
+                                    new File("/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false));
+        
+        System.out.println("getDataRoots");
+        
+        List rootsReturned = VloConfig.getDataRoots();
+        
+        assertEquals(dataRoots, rootsReturned);
+    }
+
+    /**
+     * Test the set setDataRoots method
+     */
+    @Test
+    public void testSetDataRoots() {
+        
+        ArrayList<DataRoot> dataRoots = new ArrayList<DataRoot> ();
+        
+        dataRoots.add(new DataRoot("MPI IMDI Archive", 
+                                    new File("/lat/apache/htdocs/oai-harvester/mpi-self-harvest/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false)); 
+        dataRoots.add(new DataRoot("CMDI Providers"  , 
+                                    new File("/lat/apache/htdocs/oai-harvester/cmdi-providers/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false));
+        dataRoots.add(new DataRoot("OLAC Metadata Providers", 
+                                    new File("/lat/apache/htdocs/oai-harvester/olac-and-dc-providers/harvested/results/cmdi/"),
+                                   "http://catalog.clarin.eu/",
+                                   "/lat/apache/htdocs/", false));
+        
+        System.out.println("setDataRoots");
+
+        VloConfig.setDataRoots(dataRoots);
+        
+        List rootsReturned = VloConfig.getDataRoots(); 
+        
+        assertEquals (dataRoots, rootsReturned);
+    }
+
+    /**
+     * Test the getMaxOnHeap method
+     */
+    @Test
+    public void testGetMaxOnHeap() {
+        
+        System.out.println("getMaxOnHeap");
+        
+        int expResult = 128;
+        int result = VloConfig.getMaxOnHeap();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setMaxOnHeap method
+     */
+    @Test
+    public void testSetMaxOnHeap() {
+        
+        System.out.println("setMaxOnHeap");
+        
+        int param = 1000;
+        
+        VloConfig.setMaxOnHeap(param);
+
+        int result = VloConfig.getMaxOnHeap();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getUseMaxFileSize method
+     */
+    @Test
+    public void testGetUseMaxFileSize() {
+        
+        System.out.println("getUseMaxFileSize");
+        
+        boolean expResult = true;
+        boolean result = VloConfig.getUseMaxFileSize();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setSetUseMaxFileSize method
+     */
+    @Test
+    public void testSetUseMaxFileSize() {
+        
+        System.out.println("setUseMaxFileSize");
+        
+        boolean param = true;
+        
+        VloConfig.setUseMaxFileSize(param);
+
+        boolean result = VloConfig.getUseMaxFileSize();
+        
+        assertEquals(param, result);
+    }
+    
+        /**
+     * Test the getMaxFileSize method
+     */
+    @Test
+    public void testGetMaxFileSize() {
+        
+        System.out.println("getMaxFileSize");
+        
+        int expResult = 10000000;
+        int result = VloConfig.getMaxFileSize();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setMaxFileSize method
+     */
+    @Test
+    public void testSetMaxFileSize() {
+        
+        System.out.println("setMaxFileSize");
+        
+        int param = 10000000;
+        
+        VloConfig.setMaxFileSize(param);
+
+        int result = VloConfig.getMaxFileSize();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getHandleResolver method
+     */
+    @Test
+    public void testGetUseHandleResolver() {
+        
+        System.out.println("getUseHandleResolver");
+        
+        boolean expResult = false;
+        boolean result = VloConfig.getUseHandleResolver();
+        
+        assertEquals(expResult, result);
+    }
+    
+    /**
+     * Test the setUseHandleResolver method
+     */
+    @Test
+    public void testSetUseHandleResolver() {
+        
+        System.out.println("setUseHandleResolver");
+        
+        boolean param = true;
+        
+        VloConfig.setUseHandleResolver(param);
+
+        boolean result = VloConfig.getUseHandleResolver();
+        
+        assertEquals(param, result);
+    }
+
+    /**
+     * Test the deleteAllFirst method
+     */
+    @Test
+    public void testDeleteAllFirst() {
+        
+        System.out.println("deleteAllFirst");
+        
+        boolean expResult = true;
+        boolean result = VloConfig.deleteAllFirst();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the deleteAllFirst method
+     */
+    @Test
+    public void testSetDeleteAllFirst() {
+        
+        System.out.println("setDeleteAllFirst");
+        
+        boolean param = true;
+        
+        VloConfig.setDeleteAllFirst(param);
+
+        boolean result = VloConfig.deleteAllFirst();
+        
+        assertEquals(param, result);
+    }
+
+    /**
+     * Test the printMapping method
+     */
+    @Test
+    public void testPrintMapping() {
+        
+        System.out.println("printMapping");
+        
+        boolean expResult = false;
+        boolean result = VloConfig.printMapping();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setPrintMapping method
+     */
+    @Test
+    public void testSetPrintMapping() {
+        System.out.println("setPrintMapping");
+        
+        boolean param = false;
+        
+        VloConfig.setPrintMapping(param);
+
+        boolean result = VloConfig.printMapping();
+        
+        assertEquals(param, result);
+    }
+
+    /**
+     * Test the getVloHomeLink method
+     */
+    @Test
+    public void testGetVloHomeLink() {
+        
+        System.out.println("getVloHomeLink");
+        
+        String expResult = "http://www.clarin.eu/vlo";
+        String result = VloConfig.getVloHomeLink();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setVloHomeLink method
+     */
+    @Test
+    public void testSetVloHomeLink() {
+        
+        System.out.println("setSetVloHomeLink");
+        
+        String param = "http://www.clarin.eu/vlo";
+        
+        VloConfig.setVloHomeLink(param);
+
+        String result = VloConfig.getVloHomeLink();
+        
+        assertEquals(param, result);
+    }
+
+    /**
+     * Test the getSolrUrl method
+     */
+    @Test
+    public void testGetSolrUrl() {
+        
+        System.out.println("getSolrUrl");
+        
+        String expResult = "http://localhost:8084/vlo_solr/";
+        String result = VloConfig.getSolrUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setVloHomeLink method
+     */
+    @Test
+    public void testSetSolrUrl() {
+        
+        System.out.println("setSolrUrl");
+        
+        String param = "http://localhost:8084/vlo_solr/";
+        
+        VloConfig.setSolrUrl(param);
+
+        String result = VloConfig.getSolrUrl();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getGetComponentRegistryProfileSchema method
+     */
+    @Test
+    public void testGetComponentRegistryProfileSchema() {
+        
+        System.out.println("getComponentRegistryProfileSchema");
+        
+        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/someId/xsd";
+        String result = VloConfig.getComponentRegistryProfileSchema("someId");
+        
+        assertEquals(expResult, result);
+    }
+    
+    /**
+     * Test the getComponentRegistryRESTURL method
+     */
+    @Test
+    public void testGetComponentRegistryRESTURL() {
+        
+        System.out.println("getComponentRegistryRESTURL");
+        
+        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/";
+        String result = VloConfig.getComponentRegistryRESTURL();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setComponentRegistryRESTURL method
+     */
+    @Test
+    public void testComponentRegistryRESTURL() {
+        
+        System.out.println("setComponentRegistryRESTURL");
+        
+        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/";
+        
+        VloConfig.setComponentRegistryRESTURL(param);
+
+        String result = VloConfig.getComponentRegistryRESTURL();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getHandleServerUrl method
+     */
+    @Test
+    public void testGetHandleServerUrl() {
+        
+        System.out.println("getHandleServerUrl");
+        
+        String expResult = "http://hdl.handle.net/";
+        String result = VloConfig.getHandleServerUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setHandleServerUrl method
+     */
+    @Test
+    public void testSetHandleServerUrl() {
+        
+        System.out.println("setHandleServerUrl");
+        
+        String param = "http://hdl.handle.net/";
+        
+        VloConfig.setHandleServerUrl(param);
+
+        String result = VloConfig.getHandleServerUrl();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getIMDIBrowserUrl method
+     */
+    @Test
+    public void testGetIMDIBrowserUrl() {
+        
+        System.out.println("getIMDIBrowserUrl");
+        
+        String expResult;
+        try {
+            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");
+        } catch (UnsupportedEncodingException ex) {
+            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";
+        }
+        String result = VloConfig.getIMDIBrowserUrl("handle");
+
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setIMDIBrowserUrl method
+     */
+    @Test
+    public void testSetIMDIBrowserUrl() {
+        
+        System.out.println("setIMDIBrowserUrl");
+        
+        String param = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=";
+        
+        VloConfig.setIMDIBrowserUrl(param);
+
+        String expResult;
+        try {
+            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + URLEncoder.encode("handle", "UTF-8");
+        } catch (UnsupportedEncodingException ex) {
+            expResult = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=" + "handle";
+        }
+        
+        String result = VloConfig.getIMDIBrowserUrl("handle");
+
+        assertEquals(expResult, result);
+    }
+    
+    /**
+     * Test the getLanguageLinkPrefix method
+     */
+    @Test
+    public void testGetLanguageLinkPrefix() {
+        
+        System.out.println("getLanguageLinkPrefix");
+        
+        String expResult = "http://infra.clarin.eu/service/language/info.php?code=";
+        String result = VloConfig.getLanguageLinkPrefix();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setLanguageLinkPrefix method
+     */
+    @Test
+    public void testSetLanguageLinkPrefix() {
+        
+        System.out.println("setLanguageLinkPrefix");
+        
+        String param = "http://infra.clarin.eu/service/language/info.php?code=";
+        
+        VloConfig.setLanguageLinkPrefix(param);
+
+        String result = VloConfig.getLanguageLinkPrefix();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getFeedbackFromUrl method
+     */
+    @Test
+    public void testGetFeedbackFromUrl() {
+        
+        System.out.println("getFeedBackFromUrl");
+        
+        String expResult = "http://www.clarin.eu/node/3759?url=";
+        String result = VloConfig.getFeedbackFromUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setFeedbackFromUrl method
+     */
+    @Test
+    public void testSetFeedbackFromUrl() {
+        
+        System.out.println("setFeedbackFromUrl");
+        
+        String param = "http://www.clarin.eu/node/3759?url=";
+        
+        VloConfig.setFeedbackFromUrl(param);
+
+        String result = VloConfig.getFeedbackFromUrl();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getFederatedContentSearchUrl method
+     */
+    @Test
+    public void testGetFederatedContentSearchUrl() {
+        
+        System.out.println("getFederatedContentSearchUrl");
+        
+        String expResult = "http://weblicht.sfs.uni-tuebingen.de/Aggregator/";
+        String result = VloConfig.getFederatedContentSearchUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setFederatedContentSearchUrl method
+     */
+    @Test
+    public void testSetFederatedContentSearchUrl() {
+        
+        System.out.println("setFederatedContentSearchUrl");
+        
+        String param = "http://weblicht.sfs.uni-tuebingen.de/Aggregator/";
+        
+        VloConfig.setFederatedContentSearchUrl(param);
+
+        String result = VloConfig.getFederatedContentSearchUrl();
+        
+        assertEquals(param, result);
+    }
+
+    /**
+     * Test the getNationalProjectMapping method
+     */
+    @Test
+    public void testGetNationalProjectMapping() {
+        
+        System.out.println("getNationalProjectMapping");
+        
+        String expResult = "/nationalProjectsMapping.xml";
+        String result = VloConfig.getNationalProjectMapping();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setNationalProjectMapping method
+     */
+    @Test
+    public void testSetNationalProjectMapping() {
+        
+        System.out.println("setFNationalProjectMapping");
+        
+        String param = "nationalProjectsMapping.xml";
+        
+        VloConfig.setNationalProjectMapping(param);
+
+        String result = VloConfig.getNationalProjectMapping();
+        
+        assertEquals(param, result);
+    }    
+
+    /**
+     * Test of getFacetFields method
+     */
+    @Test
+    public void testGetFacetFields() {
+        
+        System.out.println("getFacetFields");
+        
+        String[] expResult = {
+        "collection",
+        "language",
+        "continent",
+        "genre",
+        "country",
+        "subject",
+        "organisation",
+        "resourceType",
+        "dataProvider",
+        "nationalProject",
+        "tag"};
+    
+        String[] result = VloConfig.getFacetFields();
+    
+        assertArrayEquals(expResult, result);
+    }
+
+    /**
+     * Test of setFacetFields method, of class VloConfig
+     */
+    @Test
+    public void testSetFacetFields() {
+        
+        System.out.println("setFacetFields");
+        
+        String[] expResult = {
+        "collection",
+        "language",
+        "continent",
+        "genre",
+        "country",
+        "subject",
+        "organisation",
+        "resourceType",
+        "dataProvider",
+        "nationalProject"};
+        
+        VloConfig.setFacetFields(expResult);
+        
+        String result[] = VloConfig.getFacetFields();
+
+        assertArrayEquals(expResult, result);
+    }
+    
+    /**
+     * Test the getCountryComponentUrl method.
+     */
+    @Test
+    public void testCountryComponentUrl() {
+        
+        System.out.println("getCountryComponentUrl");
+        
+        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml";
+        String result = VloConfig.getCountryComponentUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setCountryComponentUrl method.
+     */
+    @Test
+    public void testSetCountryComponentUrl() {
+        
+        System.out.println("setCountryComponentUrl");
+        
+        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438104/xml";
+        
+        VloConfig.setCountryComponentUrl(param);
+
+        String result = VloConfig.getCountryComponentUrl();
+        
+        assertEquals(param, result);
+    }  
+    
+    /**
+     * Test the getLanguage2LetterCodeComponentUrl method.
+     */
+    @Test
+    public void testGetLanguage2LetterCodeComponentUrl() {
+        
+        System.out.println("getLanguage2LetterCodeComponentUrl");
+        
+        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml";
+        String result = VloConfig.getLanguage2LetterCodeComponentUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setLanguage2LetterCodeComponentUrl method.
+     */
+    @Test
+    public void testSetLanguage2LetterCodeComponentUrl() {
+        
+        System.out.println("setLanguage2LetterCodeComponentUrl");
+        
+        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438109/xml";
+        
+        VloConfig.setLanguage2LetterCodeComponentUrl(param);
+
+        String result = VloConfig.getLanguage2LetterCodeComponentUrl();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getLanguage3LetterCodeComponentUrl.
+     */
+    @Test
+    public void testGetLanguage3LetterCodeComponentUrl() {
+        
+        System.out.println("getLanguage3LetterCodeComponentUrl");
+        
+        String expResult = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml";
+        String result = VloConfig.getLanguage3LetterCodeComponentUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setLanguage3LetterCodeComponentUrl.
+     */
+    @Test
+    public void testSetLanguage3LetterCodeComponentUrl() {
+        
+        System.out.println("setLanguage3LetterCodeComponentUrl");
+        
+        String param = "http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/components/clarin.eu:cr1:c_1271859438110/xml";
+        
+        VloConfig.setLanguage3LetterCodeComponentUrl(param);
+
+        String result = VloConfig.getLanguage3LetterCodeComponentUrl();
+        
+        assertEquals(param, result);
+    }
+    
+    /**
+     * Test the getSilToISO639CodesUrl method.
+     */
+    @Test
+    public void testGetSilToISO639CodesUrl() {
+        
+        System.out.println("getSilToISO639CodesUrl");
+        
+        String expResult = "http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml";
+        String result = VloConfig.getSilToISO639CodesUrl();
+        
+        assertEquals(expResult, result);
+    }
+
+    /**
+     * Test the setSilToISO639CodesUrl method.
+     */
+    @Test
+    public void testSetSilToISO639CodesUrl() {
+        
+        System.out.println("setSilToISO639CodesUrl");
+        
+        String param = "http://www.clarin.eu/cmd/xslt/sil_to_iso6393.xml";
+        
+        VloConfig.setSilToISO639CodesUrl(param);
+
+        String result = VloConfig.getSilToISO639CodesUrl();
+        
+        assertEquals(param, result);
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessorTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessorTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDataProcessorTest.java	(revision 2882)
@@ -0,0 +1,870 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.solr.common.SolrInputDocument;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CMDIDataProcessorTest extends ImporterTestcase {
+
+    private CMDIDataProcessor getDataParser() {
+        return new CMDIParserVTDXML(MetadataImporter.POST_PROCESSORS);
+    }
+    
+    @Test
+    public void testCreateCMDIDataFromCorpus() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
+        content += "   <Header>\n";
+        content += "      <MdCreationDate>2003-01-14</MdCreationDate>\n";
+        content += "      <MdSelfLink>test-hdl:1839/00-0000-0000-0000-0001-D</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1274880881885</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList>\n";
+        content += "         <ResourceProxy id=\"d28635e19\">\n";
+        content += "            <ResourceType>Metadata</ResourceType>\n";
+        content += "            <ResourceRef>../acqui_data/Corpusstructure/acqui.imdi.cmdi</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "         <ResourceProxy id=\"d28635e23\">\n";
+        content += "            <ResourceType>Metadata</ResourceType>\n";
+        content += "            <ResourceRef>../Comprehension/Corpusstructure/comprehension.imdi.cmdi</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "         <ResourceProxy id=\"d28635e26\">\n";
+        content += "            <ResourceType>Metadata</ResourceType>\n";
+        content += "            <ResourceRef>../lac_data/Corpusstructure/lac.imdi.cmdi</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "      </ResourceProxyList>\n";
+        content += "      <JournalFileProxyList/>\n";
+        content += "      <ResourceRelationList/>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <imdi-corpus>\n";
+        content += "         <Corpus>\n";
+        content += "            <Name>MPI corpora</Name>\n";
+        content += "            <Title>Corpora of the Max-Planck Institute for Psycholinguistics</Title>\n";
+        content += "            <CorpusLink Name=\"Acquisition\">../acqui_data/Corpusstructure/acqui.imdi</CorpusLink>\n";
+        content += "            <CorpusLink Name=\"Comprehension\">../Comprehension/Corpusstructure/comprehension.imdi</CorpusLink>\n";
+        content += "            <CorpusLink Name=\"Language and Cognition\">../lac_data/Corpusstructure/lac.imdi</CorpusLink>\n";
+        content += "            <descriptions>\n";
+        content += "               <Description LanguageId=\"\">IMDI corpora</Description>\n";
+        content += "               <Description LanguageId=\"\"/>\n";
+        content += "            </descriptions>\n";
+        content += "         </Corpus>\n";
+        content += "      </imdi-corpus>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File cmdiFile = createCmdiFile("testCorpus", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("test-hdl:1839/00-0000-0000-0000-0001-D", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(3, resources.size());
+        Resource res = resources.get(0);
+        assertEquals("../acqui_data/Corpusstructure/acqui.imdi.cmdi", res.getResourceName());
+        assertEquals(null, res.getMimeType());
+        assertEquals(0, data.getDataResources().size());
+        SolrInputDocument doc = data.getSolrDocument();
+        // TODO FIX bad test case. Depends on the presence of an internet connection! (BAD!)
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_CLARIN_PROFILE).contains("imdi-corpus"));
+        assertNotNull(doc);
+    }
+
+    @Test
+    public void testCreateCMDIDataFromSession() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
+        content += "     xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1271859438204/xsd\">\n";
+        content += "   <Header>\n";
+        content += "      <MdCreationDate>2008-05-27</MdCreationDate>\n";
+        content += "      <MdSelfLink>test-hdl:1839/00-0000-0000-0009-294C-9</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1271859438204</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList>\n";
+        content += "         <ResourceProxy id=\"d314e408\">\n";
+        content += "            <ResourceType mimetype=\"video/x-mpeg1\" >Resource</ResourceType>\n";
+        content += "            <ResourceRef>../Media/elan-example1.mpg</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "         <ResourceProxy id=\"d314e471\">\n";
+        content += "            <ResourceType mimetype=\"audio/mpeg\" >Resource</ResourceType>\n";
+        content += "            <ResourceRef>../Media/elan-example1.mp3</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "      </ResourceProxyList>\n";
+        content += "      <JournalFileProxyList/>\n";
+        content += "      <ResourceRelationList/>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <Session>\n";
+        content += "         <Name>kleve-route</Name>\n";
+        content += "         <Title>route description to Kleve</Title>\n";
+        content += "         <Date>2002-10-30</Date>\n";
+        content += "         <descriptions>\n";
+        content += "            <Description LanguageId=\"ISO639-2:eng\">This  recording was made to generate a freely available test resource including speech and gestures. The annotations were created by Peter and Kita who is gesture researcher at the MPI for Psycholinguistics.</Description>\n";
+        content += "            <Description LanguageId=\"ISO639-2:ger\">Diese Aufnahme wurde erzeugt, um eine frei verf\\u00fcgbare Test Resource zur Verf\\u00fcgung stellen zu k\\u00f6nnen, die Sprache und Gestik umfasst. Die Annotationen wurden von Peter und Kita, dem Gestik Researcher am MPI erzeugt.</Description>\n";
+        content += "         </descriptions>\n";
+        content += "         <MDGroup>\n";
+        content += "            <Location>\n";
+        content += "               <Continent>Europe</Continent>\n";
+        content += "               <Country>Netherlands</Country>\n";
+        content += "               <Region/>\n";
+        content += "               <Address>Wundtlaan 1, Nijmegen</Address>\n";
+        content += "            </Location>\n";
+        content += "            <Project>\n";
+        content += "               <Name>Peter Wittenburg</Name>\n";
+        content += "               <Title>Route description test resource</Title>\n";
+        content += "               <Id/>\n";
+        content += "               <Contact>\n";
+        content += "                  <Name>Peter Wittenburg</Name>\n";
+        content += "                  <Address>Wundtlaan 1, 6525 XD Nijmegen</Address>\n";
+        content += "                  <Email>peter.wittenburg@mpi.nl</Email>\n";
+        content += "                  <Organisation>Max Planck Institute for Psycholinguistics</Organisation>\n";
+        content += "               </Contact>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"\"/>\n";
+        content += "               </descriptions>\n";
+        content += "            </Project>\n";
+        content += "            <Keys>\n";
+        content += "               <Key Name=\"conversion.IMDI.1.9to3.0.warning\">Unknown mapping of Genre: conversation|explanation|unspecified --&gt; ???</Key>\n";
+        content += "            </Keys>\n";
+        content += "            <Content>\n";
+        content += "               <Genre>Demo</Genre>\n";
+        content += "               <SubGenre>Unspecified</SubGenre>\n";
+        content += "               <Task>route description</Task>\n";
+        content += "               <Modalities>Speech; Gestures</Modalities>\n";
+        content += "               <CommunicationContext>\n";
+        content += "                  <Interactivity>interactive</Interactivity>\n";
+        content += "                  <PlanningType>semi-spontaneous</PlanningType>\n";
+        content += "                  <Involvement>elicited</Involvement>\n";
+        content += "                  <SocialContext>Unspecified</SocialContext>\n";
+        content += "                  <EventStructure>Unspecified</EventStructure>\n";
+        content += "                  <Channel>Unspecified</Channel>\n";
+        content += "               </CommunicationContext>\n";
+        content += "               <Content_Languages>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "                  <Content_Language>\n";
+        content += "                     <Id>ISO639-3:eng</Id>\n";
+        content += "                     <Name>English</Name>\n";
+        content += "                     <descriptions>\n";
+        content += "                        <Description LanguageId=\"\"/>\n";
+        content += "                     </descriptions>\n";
+        content += "                  </Content_Language>\n";
+        content += "               </Content_Languages>\n";
+        content += "               <Keys>\n";
+        content += "                  <Key Name=\"IMDI__1_9.Interactional\">conversation</Key>\n";
+        content += "                  <Key Name=\"IMDI__1_9.Discursive\">explanation</Key>\n";
+        content += "                  <Key Name=\"IMDI__1_9.Interactional\">Unspecified</Key>\n";
+        content += "               </Keys>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"ISO639:eng\">This file was generated from an IMDI 1.9 file and transformed to IMDI 3.0. The substructure of Genre is replaced by two elements named \"Genre\" and \"SubGenre\". The original content of Genre substructure was: Interactional = 'conversation', Discursive = 'explanation', Performance = 'Unspecified'. These values have been added as Keys to the Content information.</Description>\n";
+        content += "                  <Description LanguageId=\"ISO639:eng\">Peter explains how to come from Nijmegen to Kleve by car, such that Kita would be able to get there.</Description>\n";
+        content += "               </descriptions>\n";
+        content += "            </Content>\n";
+        content += "            <Actors>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"\"/>\n";
+        content += "               </descriptions>\n";
+        content += "               <Actor>\n";
+        content += "                  <Role>interviewee</Role>\n";
+        content += "                  <Name>Peter</Name>\n";
+        content += "                  <FullName>Peter Wittenburg</FullName>\n";
+        content += "                  <Code>W</Code>\n";
+        content += "                  <FamilySocialRole>Unspecified</FamilySocialRole>\n";
+        content += "                  <EthnicGroup/>\n";
+        content += "                  <Age>Unknown</Age>\n";
+        content += "                  <BirthDate>Unspecified</BirthDate>\n";
+        content += "                  <Sex>Unknown</Sex>\n";
+        content += "                  <Education>university</Education>\n";
+        content += "                  <Anonymized>true</Anonymized>\n";
+        content += "                  <Contact>\n";
+        content += "                     <Name/>\n";
+        content += "                     <Address/>\n";
+        content += "                     <Email/>\n";
+        content += "                     <Organisation/>\n";
+        content += "                  </Contact>\n";
+        content += "                  <Keys/>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "                  <Actor_Languages>\n";
+        content += "                     <descriptions>\n";
+        content += "                        <Description LanguageId=\"\"/>\n";
+        content += "                     </descriptions>\n";
+        content += "                     <Actor_Language>\n";
+        content += "                        <Id>ISO639-3:nld</Id>\n";
+        content += "                        <Name>Dutch</Name>\n";
+        content += "                        <descriptions>\n";
+        content += "                           <Description LanguageId=\"\"/>\n";
+        content += "                        </descriptions>\n";
+        content += "                     </Actor_Language>\n";
+        content += "                     <Actor_Language>\n";
+        content += "                        <Id>ISO639-3:deu</Id>\n";
+        content += "                        <Name>German</Name>\n";
+        content += "                        <descriptions>\n";
+        content += "                           <Description LanguageId=\"\"/>\n";
+        content += "                        </descriptions>\n";
+        content += "                     </Actor_Language>\n";
+        content += "                     <Actor_Language>\n";
+        content += "                        <Id>ISO639-3:eng</Id>\n";
+        content += "                        <Name>English</Name>\n";
+        content += "                        <descriptions>\n";
+        content += "                           <Description LanguageId=\"\"/>\n";
+        content += "                        </descriptions>\n";
+        content += "                     </Actor_Language>\n";
+        content += "                  </Actor_Languages>\n";
+        content += "               </Actor>\n";
+        content += "               <Actor>\n";
+        content += "                  <Role>interviewer</Role>\n";
+        content += "                  <Name>Kita</Name>\n";
+        content += "                  <FullName>Sotaro Kita</FullName>\n";
+        content += "                  <Code>k</Code>\n";
+        content += "                  <FamilySocialRole>Unspecified</FamilySocialRole>\n";
+        content += "                  <EthnicGroup/>\n";
+        content += "                  <Age>Unknown</Age>\n";
+        content += "                  <BirthDate>Unspecified</BirthDate>\n";
+        content += "                  <Sex>Unknown</Sex>\n";
+        content += "                  <Education>university</Education>\n";
+        content += "                  <Anonymized>true</Anonymized>\n";
+        content += "                  <Contact>\n";
+        content += "                     <Name/>\n";
+        content += "                     <Address/>\n";
+        content += "                     <Email/>\n";
+        content += "                     <Organisation/>\n";
+        content += "                  </Contact>\n";
+        content += "                  <Keys/>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "                  <Actor_Languages>\n";
+        content += "                     <descriptions>\n";
+        content += "                        <Description LanguageId=\"\"/>\n";
+        content += "                     </descriptions>\n";
+        content += "                     <Actor_Language>\n";
+        content += "                        <Id>ISO639-3:eng</Id>\n";
+        content += "                        <Name>English</Name>\n";
+        content += "                        <descriptions>\n";
+        content += "                           <Description LanguageId=\"\"/>\n";
+        content += "                        </descriptions>\n";
+        content += "                     </Actor_Language>\n";
+        content += "                     <Actor_Language>\n";
+        content += "                        <Id>ISO639-3:jpn</Id>\n";
+        content += "                        <Name>Japanese</Name>\n";
+        content += "                        <descriptions>\n";
+        content += "                           <Description LanguageId=\"\"/>\n";
+        content += "                        </descriptions>\n";
+        content += "                     </Actor_Language>\n";
+        content += "                  </Actor_Languages>\n";
+        content += "               </Actor>\n";
+        content += "               <Actor>\n";
+        content += "                  <Role>Collector</Role>\n";
+        content += "                  <Name>Peter Wittenburg</Name>\n";
+        content += "                  <FullName>Peter Wittenburg</FullName>\n";
+        content += "                  <Code>Unspecified</Code>\n";
+        content += "                  <FamilySocialRole>Unspecified</FamilySocialRole>\n";
+        content += "                  <EthnicGroup/>\n";
+        content += "                  <Age>Unspecified</Age>\n";
+        content += "                  <BirthDate>Unspecified</BirthDate>\n";
+        content += "                  <Sex>Unspecified</Sex>\n";
+        content += "                  <Education/>\n";
+        content += "                  <Anonymized>false</Anonymized>\n";
+        content += "                  <Contact>\n";
+        content += "                     <Name>Peter Wittenburg</Name>\n";
+        content += "                     <Address>Wundtlaan 1, 6525 XD Nijmegen</Address>\n";
+        content += "                     <Email>peter.wittenburg@mpi.nl</Email>\n";
+        content += "                     <Organisation>Max-Planck-Institute for Psycholinguistics</Organisation>\n";
+        content += "                  </Contact>\n";
+        content += "                  <Keys/>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "                  <Actor_Languages/>\n";
+        content += "               </Actor>\n";
+        content += "            </Actors>\n";
+        content += "         </MDGroup>\n";
+        content += "         <Resources>\n";
+        content += "            <MediaFile ref=\"d314e408\">\n";
+        content += "               <ResourceLink>../Media/elan-example1.mpg</ResourceLink>\n";
+        content += "               <Type>video</Type>\n";
+        content += "               <Format>video/x-mpeg1</Format>\n";
+        content += "               <Size/>\n";
+        content += "               <Quality>Unknown</Quality>\n";
+        content += "               <RecordingConditions>excellent</RecordingConditions>\n";
+        content += "               <TimePosition>\n";
+        content += "                  <Start>Unknown</Start>\n";
+        content += "                  <End>Unknown</End>\n";
+        content += "               </TimePosition>\n";
+        content += "               <Access>\n";
+        content += "                  <Availability>openly available</Availability>\n";
+        content += "                  <Date>2003-02-12</Date>\n";
+        content += "                  <Owner>MPI for Psycholinguistics</Owner>\n";
+        content += "                  <Publisher/>\n";
+        content += "                  <Contact>\n";
+        content += "                     <Name>Romuald Skiba</Name>\n";
+        content += "                     <Address/>\n";
+        content += "                     <Email/>\n";
+        content += "                     <Organisation/>\n";
+        content += "                  </Contact>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "               </Access>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"\"/>\n";
+        content += "               </descriptions>\n";
+        content += "               <Keys/>\n";
+        content += "            </MediaFile>\n";
+        content += "            <MediaFile ref=\"d314e471\">\n";
+        content += "               <ResourceLink>../Media/elan-example1.mp4</ResourceLink>\n";
+        content += "               <Type>video</Type>\n";
+        content += "               <Format>video/mp4</Format>\n";
+        content += "               <Size/>\n";
+        content += "               <Quality>Unknown</Quality>\n";
+        content += "               <RecordingConditions>excellent</RecordingConditions>\n";
+        content += "               <TimePosition>\n";
+        content += "                  <Start>Unknown</Start>\n";
+        content += "                  <End>Unknown</End>\n";
+        content += "               </TimePosition>\n";
+        content += "               <Access>\n";
+        content += "                  <Availability>openly available</Availability>\n";
+        content += "                  <Date>2003-02-12</Date>\n";
+        content += "                  <Owner>MPI for Psycholinguistics</Owner>\n";
+        content += "                  <Publisher/>\n";
+        content += "                  <Contact>\n";
+        content += "                     <Name>Romuald Skiba</Name>\n";
+        content += "                     <Address/>\n";
+        content += "                     <Email/>\n";
+        content += "                     <Organisation/>\n";
+        content += "                  </Contact>\n";
+        content += "                  <descriptions>\n";
+        content += "                     <Description LanguageId=\"\"/>\n";
+        content += "                  </descriptions>\n";
+        content += "               </Access>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"\"/>\n";
+        content += "               </descriptions>\n";
+        content += "               <Keys/>\n";
+        content += "            </MediaFile>\n";
+        content += "         </Resources>\n";
+        content += "         <References>\n";
+        content += "            <descriptions>\n";
+        content += "               <Description LanguageId=\"\"/>\n";
+        content += "            </descriptions>\n";
+        content += "         </References>\n";
+        content += "      </Session>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File cmdiFile = createCmdiFile("testSession", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("test-hdl:1839/00-0000-0000-0009-294C-9", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(0, resources.size());
+        List<Resource> dataResources = data.getDataResources();
+        assertEquals(2, dataResources.size());
+        Resource res = dataResources.get(0);
+        assertEquals("../Media/elan-example1.mpg", res.getResourceName());
+        assertEquals("video/x-mpeg1", res.getMimeType());
+        res = dataResources.get(1);
+        assertEquals("../Media/elan-example1.mp3", res.getResourceName());
+        assertEquals("audio/mpeg", res.getMimeType());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        assertEquals(13, doc.getFieldNames().size());
+        assertEquals("kleve-route", doc.getFieldValue("name"));
+        assertEquals("Peter Wittenburg", doc.getFieldValue(FacetConstants.FIELD_PROJECT_NAME));
+        assertEquals("Europe", doc.getFieldValue("continent"));
+        assertEquals("English", doc.getFieldValue("language"));
+        assertEquals("Netherlands", doc.getFieldValue("country"));
+        assertEquals("Max Planck Institute for Psycholinguistics", doc.getFieldValue("organisation"));
+        assertEquals("demo", doc.getFieldValue("genre"));
+        assertEquals(
+                "This  recording was made to generate a freely available test resource including speech and gestures. The annotations were created by Peter and Kita who is gesture researcher at the MPI for Psycholinguistics.",
+                doc.getFieldValue("description"));
+        assertEquals("2002-10-30", doc.getFieldValue("year"));
+        List<String> fieldValues = new ArrayList(doc.getFieldValues(FacetConstants.FIELD_RESOURCE_TYPE));
+        assertEquals(2, fieldValues.size());
+        assertEquals("video/x-mpeg1", fieldValues.get(0));
+        assertEquals("video/mp4", fieldValues.get(1));
+        assertEquals(null, doc.getFieldValue("subject"));
+    }
+
+    @Test
+    public void testCreateCMDISessionSmall() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
+        content += "     xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1271859438204/xsd\">\n";
+        content += "   <Header>\n";
+        content += "      <MdCreationDate>2008-05-27</MdCreationDate>\n";
+        content += "      <MdSelfLink>test-hdl:1839/00-0000-0000-0009-294C-9</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1271859438204</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "    </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <Session>\n";
+        content += "         <Name>kleve-route</Name>\n";
+        content += "      </Session>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File cmdiFile = createCmdiFile("testSession", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("kleve-route", data.getSolrDocument().getFieldValue(FacetConstants.FIELD_NAME));
+    }
+
+    @Test
+    public void testEmptyFieldsShouldBeNull() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
+        content += "     xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1271859438204/xsd\">\n";
+        content += "   <Header>\n";
+        content += "      <MdCreationDate>2008-05-27</MdCreationDate>\n";
+        content += "      <MdSelfLink>test-hdl:1839/00-0000-0000-0009-294C-9</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1271859438204</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList>\n";
+        content += "      </ResourceProxyList>\n";
+        content += "      <JournalFileProxyList/>\n";
+        content += "      <ResourceRelationList/>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <Session>\n";
+        content += "         <Name>kleve-route</Name>\n";
+        content += "         <Title>route description to Kleve</Title>\n";
+        content += "         <Date></Date>\n";
+        content += "         <descriptions>\n";
+        content += "            <Description LanguageId=\"ISO639-2:eng\">Test.</Description>\n";
+        content += "         </descriptions>\n";
+        content += "         <MDGroup>\n";
+        content += "            <Location>\n";
+        content += "               <Continent>Europe</Continent>\n";
+        content += "               <Country>Netherlands</Country>\n";
+        content += "               <Region/>\n";
+        content += "               <Address>Wundtlaan 1, Nijmegen</Address>\n";
+        content += "            </Location>\n";
+        content += "            <Project>\n";
+        content += "               <Name></Name>\n";
+        content += "               <Title></Title>\n";
+        content += "               <Id/>\n";
+        content += "               <Contact>\n";
+        content += "                  <Name></Name>\n";
+        content += "                  <Address></Address>\n";
+        content += "                  <Email></Email>\n";
+        content += "                  <Organisation></Organisation>\n";
+        content += "               </Contact>\n";
+        content += "               <descriptions>\n";
+        content += "                  <Description LanguageId=\"\"/>\n";
+        content += "               </descriptions>\n";
+        content += "            </Project>\n";
+        content += "            <Keys>\n";
+        content += "            </Keys>\n";
+        content += "            <Content>\n";
+        content += "               <Genre>Demo</Genre>\n";
+        content += "               <SubGenre>Unspecified</SubGenre>\n";
+        content += "               <Task>route description</Task>\n";
+        content += "               <Modalities>Speech; Gestures</Modalities>\n";
+        content += "               <CommunicationContext>\n";
+        content += "               </CommunicationContext>\n";
+        content += "               <Content_Languages>\n";
+        content += "               </Content_Languages>\n";
+        content += "               <descriptions>\n";
+        content += "               </descriptions>\n";
+        content += "            </Content>\n";
+        content += "            <Actors>\n";
+        content += "            </Actors>\n";
+        content += "         </MDGroup>\n";
+        content += "         <Resources>\n";
+        content += "         </Resources>\n";
+        content += "      </Session>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File cmdiFile = createCmdiFile("testSession", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("test-hdl:1839/00-0000-0000-0009-294C-9", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(0, resources.size());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        assertEquals(7, doc.getFieldNames().size());
+        assertEquals("kleve-route", doc.getFieldValue("name"));
+        assertEquals("Europe", doc.getFieldValue("continent"));
+        assertEquals("Netherlands", doc.getFieldValue("country"));
+        assertEquals("demo", doc.getFieldValue("genre"));
+        assertEquals("Test.", doc.getFieldValue("description"));
+        assertEquals("Should be null not empty string", null, doc.getFieldValue("organisation"));
+        assertEquals(null, doc.getFieldValue("language"));
+        assertEquals(null, doc.getFieldValue("subject"));
+        assertEquals(null, doc.getFieldValue("year"));
+    }
+
+    @Test
+    public void testOlac() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
+        content += "     xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
+        content += "     xmlns:oai_dc=\"http://www.openarchives.org/OAI/2.0/oai_dc/\"\n";
+        content += "     xmlns:defns=\"http://www.openarchives.org/OAI/2.0/\"\n";
+        content += "     xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd\">\n";
+        content += "   <Header>\n";
+        content += "      <MdCreator>olac2cmdi.xsl</MdCreator>\n";
+        content += "      <MdCreationDate>2002-12-14</MdCreationDate>\n";
+        content += "      <MdSelfLink>oai:ailla.utexas.edu:1</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList/>\n";
+        content += "      <JournalFileProxyList/>\n";
+        content += "      <ResourceRelationList/>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <creator>Joel Sherzer (recorder)</creator>\n";
+        content += "         <description>\n";
+        content += "    Channel: Talking;\n";
+        content += "    Genre: Traditional Narrative / Story;\n";
+        content += "    Country: Panama;\n";
+        content += "    Place of Recording: Mulatuppu;\n";
+        content += "    Event: Community Gathering;\n";
+        content += "    Institutional Affiliation: University of Texas at Austin;\n";
+        content += "    Participant Information: Political Leader;\n";
+        content += "      </description>\n";
+        content += "         <description>The one-eyed grandmother is one of many traditional Kuna stories performed in the Kuna gathering house. This story, performed here by Pedro Arias, combines European derived motifs (Tom Thumb and Hansel and Gretel) with themes that seem more Kuna in origin. All are woven together and a moral is provided. Pedro Arias performed this story before a gathered audience in the morning..\n";
+        content += "      </description>\n";
+        content += "         <description>Test</description>\n";
+        content += "         <identifier>http://uts.cc.utexas.edu/~ailla/audio/sherzer/one_eyed_grandmother.ram</identifier>\n";
+        content += "         <identifier>http://uts.cc.utexas.edu/~ailla/texts/sherzer/one_eyed_grandmother.pdf</identifier>\n";
+        content += "         <language olac-language=\"x-sil-CHN\"/>\n";
+        content += "         <language>Chinese</language>\n";
+        content += "         <subject olac-linguistic-field=\"testSubject\">Kuna</subject>\n";
+        content += "         <type olac-linguistic-type=\"Transcription\"/>\n";
+        content += "         <format>WAV</format>\n";
+        content += "        <type dcterms-type=\"DCMIType\">Sound</type>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("oai:ailla.utexas.edu:1", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(0, resources.size());
+        List<Resource> dataResources = data.getDataResources();
+        assertEquals(0, dataResources.size());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        assertEquals(8, doc.getFieldNames().size());
+        assertEquals(null, doc.getFieldValue("name"));
+        assertEquals(null, doc.getFieldValue("continent"));
+        assertEquals(1, doc.getFieldValues("language").size());
+        assertEquals("x-sil-CHN", doc.getFieldValue("language"));
+        assertEquals(null, doc.getFieldValue("country"));
+        assertEquals(null, doc.getFieldValue("organisation"));
+        assertEquals("transcription", doc.getFieldValue("genre"));
+        assertEquals("kuna", doc.getFieldValue("subject"));
+        Collection<Object> fieldValues = doc.getFieldValues("description");
+        assertEquals(3, fieldValues.size());
+        List<String> descriptions = new ArrayList(fieldValues);
+        Collections.sort(descriptions);
+        assertEquals("Channel: Talking;\n    Genre: Traditional Narrative / Story;\n    Country: Panama;\n"
+                + "    Place of Recording: Mulatuppu;\n    Event: Community Gathering;\n"
+                + "    Institutional Affiliation: University of Texas at Austin;\n    Participant Information: Political Leader;", descriptions.get(0).toString());
+        assertEquals("Test", descriptions.get(1).toString());
+        assertEquals("The one-eyed grandmother is one of many traditional Kuna stories performed "
+                + "in the Kuna gathering house. This story, performed here by Pedro Arias, combines "
+                + "European derived motifs (Tom Thumb and Hansel and Gretel) with themes that seem more "
+                + "Kuna in origin. All are woven together and a moral is provided. Pedro Arias performed "
+                + "this story before a gathered audience in the morning..", descriptions.get(2).toString());
+        assertEquals("audio", doc.getFieldValue(FacetConstants.FIELD_RESOURCE_TYPE));
+    }
+
+    @Test
+    public void testOlacMultiFacets() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <subject olac-linguistic-field=\"testSubject\">Kuna</subject>\n";
+        content += "         <subject dcterms-type=\"LCSH\">testSubjectFallback</subject>\n";
+        content += "         <spatial dcterms-type=\"ISO3166\">testCountry1</spatial>\n";
+        content += "         <coverage dcterms-type=\"ISO3166\">testCountry2</coverage>\n";
+        content += "         <language olac-language=\"language1\">test1</language>\n";
+        content += "         <subject olac-language=\"language2\">test2</subject>\n";
+        content += "         <subject olac-language=\"language2\">test2</subject>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        SolrInputDocument doc = data.getSolrDocument();
+        assertEquals(1, doc.getFieldValues(FacetConstants.FIELD_SUBJECT).size());
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_SUBJECT).contains("kuna"));
+        assertEquals(2, doc.getFieldValues(FacetConstants.FIELD_COUNTRY).size());
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_COUNTRY).contains("testCountry1"));
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_COUNTRY).contains("testCountry2"));
+        assertEquals(2, doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).size());
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).contains("language1"));
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).contains("language2"));
+
+        content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <subject dcterms-type=\"LCSH\">testSubjectFallback</subject>\n";
+        content += "         <coverage dcterms-type=\"ISO3166\">testCountry2</coverage>\n";
+        content += "         <subject olac-language=\"language2\">test2</subject>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        cmdiFile = createCmdiFile("testOlac", content);
+        processor = getDataParser();
+        data = processor.process(cmdiFile);
+        doc = data.getSolrDocument();
+        assertEquals(1, doc.getFieldValues(FacetConstants.FIELD_SUBJECT).size());
+        assertEquals("testsubjectfallback", doc.getFieldValue(FacetConstants.FIELD_SUBJECT));
+        assertEquals(1, doc.getFieldValues(FacetConstants.FIELD_COUNTRY).size());
+        assertEquals("testCountry2", doc.getFieldValue(FacetConstants.FIELD_COUNTRY));
+        assertEquals(1, doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).size());
+        assertEquals("language2", doc.getFieldValue(FacetConstants.FIELD_LANGUAGE));
+
+        content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <subject dcterms-type=\"LCSH\">testSubjectFallback</subject>\n";
+        content += "         <subject olac-linguistic-field=\"testSubject\">Kuna</subject>\n";
+        content += "         <coverage dcterms-type=\"ISO3166\">testCountry2</coverage>\n";
+        content += "         <spatial dcterms-type=\"ISO3166\">testCountry1</spatial>\n";
+        content += "         <subject olac-language=\"language1\">test2</subject>\n";
+        content += "         <language olac-language=\"language1\">test1</language>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        cmdiFile = createCmdiFile("testOlac", content);
+        processor = getDataParser();
+        data = processor.process(cmdiFile);
+        doc = data.getSolrDocument();
+        assertEquals(1, doc.getFieldValues("subject").size());
+        assertEquals("testsubjectfallback", doc.getFieldValue("subject"));
+        assertEquals(2, doc.getFieldValues(FacetConstants.FIELD_COUNTRY).size());
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_COUNTRY).contains("testCountry1"));
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_COUNTRY).contains("testCountry2"));
+        assertEquals(1, doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).size());
+        assertTrue(doc.getFieldValues(FacetConstants.FIELD_LANGUAGE).contains("language1"));
+    }
+
+    @Test
+    public void testIgnoreWhiteSpaceFacets() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <subject olac-linguistic-field=\"\n\n\t\t\t\">Kuna</subject>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        SolrInputDocument doc = data.getSolrDocument();
+        assertTrue(doc.getFieldValues("subject").contains("kuna"));
+    }
+
+    @Test
+    public void testCountryCodesPostProcessing() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <coverage dcterms-type=\"ISO3166\">NL</coverage>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        SolrInputDocument doc = data.getSolrDocument();
+        assertEquals("Netherlands", doc.getFieldValue(FacetConstants.FIELD_COUNTRY));
+    }
+
+    @Test
+    public void testLanguageCodesPostProcessing() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Components>\n";
+        content += "      <OLAC-DcmiTerms>\n";
+        content += "         <language olac-language=\"fr\"/>\n";
+        content += "         <language olac-language=\"spa\"/>\n";
+        content += "      </OLAC-DcmiTerms>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        SolrInputDocument doc = data.getSolrDocument();
+        Collection<Object> values = doc.getFieldValues(FacetConstants.FIELD_LANGUAGE);
+        assertEquals(2, values.size());
+        Iterator<Object> iter = values.iterator();
+        assertEquals("French", iter.next());
+        assertEquals("Spanish; Castilian", iter.next());
+    }
+
+    @Test
+    public void testOlacCollection() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n";
+        content += "    xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd\">\n";
+        content += "    <Header>\n";
+        content += "        <MdCreator>dir2cmdicollection.py</MdCreator>\n";
+        content += "        <MdCreationDate>2010-10-11</MdCreationDate>\n";
+        content += "        <MdSelfLink>collection_ATILF_Resources.cmdi</MdSelfLink>\n";
+        content += "        <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "    </Header>\n";
+        content += "    <Resources>\n";
+        content += "        <ResourceProxyList>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0001.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0001.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0002.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0002.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0003.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0003.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0004.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0004.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0005_a.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0005_a.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0005_b.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0005_b.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_0006.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_0006.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_M277.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_M277.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "<ResourceProxy id=\"ATILF_Resources_0_oai_atilf_inalf_fr_M592.xml.cmdi\"><ResourceType>Metadata</ResourceType><ResourceRef>ATILF_Resources/0/oai_atilf_inalf_fr_M592.xml.cmdi</ResourceRef></ResourceProxy>\n";
+        content += "        </ResourceProxyList>\n";
+        content += "        <JournalFileProxyList/>\n";
+        content += "        <ResourceRelationList/>\n";
+        content += "    </Resources>\n";
+        content += "    <Components>\n";
+        content += "        <olac></olac>\n";
+        content += "    </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("collection_ATILF_Resources.cmdi", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(9, resources.size());
+        Resource res = resources.get(0);
+        assertEquals("ATILF_Resources/0/oai_atilf_inalf_fr_0001.xml.cmdi", res.getResourceName());
+        assertEquals(null, res.getMimeType());
+        assertEquals(0, data.getDataResources().size());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        List<Resource> dataResources = data.getDataResources();
+        assertEquals(0, dataResources.size());
+    }
+
+    @Test
+    public void testLrtCollection() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" ns0:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1289827960126/xsd\" xmlns:ns0=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
+        content += "    <Header>\n";
+        content += "        <MdCreator>lrt2cmdi.py</MdCreator>\n";
+        content += "        <MdCreationDate>2010-11-17</MdCreationDate>\n";
+        content += "        <MdSelfLink>clarin.eu:lrt:433</MdSelfLink>\n";
+        content += "        <MdProfile>clarin.eu:cr1:p_1289827960126</MdProfile>\n";
+        content += "    </Header>\n";
+        content += "    <Resources>\n";
+        content += "        <ResourceProxyList />\n";
+        content += "        <JournalFileProxyList />\n";
+        content += "        <ResourceRelationList />\n";
+        content += "    </Resources>\n";
+        content += "    <Components>\n";
+        content += "        <LrtInventoryResource>\n";
+        content += "            <LrtCommon>\n";
+        content += "                <ResourceName>Corpus of Present-day Written Estonian</ResourceName>\n";
+        content += "                <ResourceType>Written Corpus</ResourceType>\n";
+        content += "                <LanguagesOther />\n";
+        content += "                <Description>written general; 95 mio words; TEI/SGML</Description>\n";
+        content += "                <ContactPerson>Kadri.Muischnek@ut.ee</ContactPerson>\n";
+        content += "                <Format />\n";
+        content += "                <Institute>Test</Institute>\n";
+        content += "                <MetadataLink />\n";
+        content += "                <Publications />\n";
+        content += "                <ReadilyAvailable>true</ReadilyAvailable>\n";
+        content += "                <ReferenceLink />         \n";
+        content += "                <Languages><ISO639><iso-639-3-code>est</iso-639-3-code></ISO639></Languages>\n";
+        content += "                <Countries><Country><Code>EE</Code></Country></Countries>\n";
+        content += "            </LrtCommon>\n";
+        content += "       </LrtInventoryResource>\n";
+        content += "    </Components>\n";
+        content += "</CMD>\n";
+
+        File cmdiFile = createCmdiFile("testOlac", content);
+        CMDIDataProcessor processor = getDataParser();
+        CMDIData data = processor.process(cmdiFile);
+        assertEquals("clarin.eu:lrt:433", data.getId());
+        List<Resource> resources = data.getMetadataResources();
+        assertEquals(0, resources.size());
+        List<Resource> dataResources = data.getDataResources();
+        assertEquals(0, dataResources.size());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        assertEquals(9, doc.getFieldNames().size());
+        assertEquals("Corpus of Present-day Written Estonian", doc.getFieldValue("name"));
+        assertEquals(null, doc.getFieldValue("continent"));
+        assertEquals(1, doc.getFieldValues("language").size());
+        assertEquals("Estonian", doc.getFieldValue("language"));
+        assertEquals("Estonia", doc.getFieldValue("country"));
+        assertEquals("Test", doc.getFieldValue("organisation"));
+        assertEquals(null, doc.getFieldValue("year"));
+        assertEquals(null, doc.getFieldValue("genre"));
+        assertEquals("written general; 95 mio words; TEI/SGML", doc.getFieldValue("description"));
+        assertEquals("Written Corpus", doc.getFieldValue(FacetConstants.FIELD_RESOURCE_TYPE));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXMLTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXMLTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIParserVTDXMLTest.java	(revision 2882)
@@ -0,0 +1,79 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import com.ximpleware.VTDGen;
+import com.ximpleware.VTDNav;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CMDIParserVTDXMLTest {
+    
+    @Before
+    public void setUp() {
+
+        // read the configuration from the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+
+        // apparantly, this does not make the configuration available
+    }
+
+    @Test
+    public void testExtractXsdFromHeader() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1288172614026</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "</CMD>\n";
+        String xsd = getXsd(content);
+        assertEquals("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd", xsd);
+    }
+
+    @Test
+    public void testExtractXsdFromSchemaLocation() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n";
+        content += "     xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd\">\n";
+        content += "</CMD>\n";
+        String xsd = getXsd(content);
+        assertEquals("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd", xsd);
+    }
+
+    @Test
+    public void testExtractXsdFromNoSchemaLocation() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n";
+        content += "     xsi:noNamespaceSchemaLocation=\"http://www.meertens.knaw.nl/oai/cmdi/diddd_sub_location_profile.xsd\">\n";
+        content += "</CMD>\n";
+        String xsd = getXsd(content);
+        assertEquals("http://www.meertens.knaw.nl/oai/cmdi/diddd_sub_location_profile.xsd", xsd);
+    }
+
+    @Test
+    public void testNoXsd() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "</CMD>\n";
+        String xsd = getXsd(content);
+        assertNull(xsd);
+    }
+
+    private String getXsd(String content) throws Exception {
+        VTDGen vg = new VTDGen();
+        vg.setDoc(content.getBytes());
+        vg.parse(true);
+        VTDNav nav = vg.getNav();
+        CMDIParserVTDXML.setNameSpace(nav);
+        CMDIParserVTDXML parser = new CMDIParserVTDXML(null);
+        String xsd = parser.extractXsd(nav);
+        return xsd;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessorTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessorTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/CountryNamePostProcessorTest.java	(revision 2882)
@@ -0,0 +1,29 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CountryNamePostProcessorTest {
+
+    @Before
+    public void setUp() {
+        
+        // read the configuration from the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+    }
+    
+    @Test
+    public void testCountryCode() {
+        CountryNamePostProcessor processor = new CountryNamePostProcessor();
+        assertEquals("Netherlands", processor.process("NL"));
+        assertEquals("United Kingdom", processor.process("GB"));
+        assertEquals("Netherlands", processor.process("nl"));
+        assertEquals("test", processor.process("test"));
+        assertEquals("", processor.process(""));
+        assertEquals(null, processor.process(null));
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetConceptMappingTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetConceptMappingTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetConceptMappingTest.java	(revision 2882)
@@ -0,0 +1,57 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.util.List;
+
+import org.junit.Test;
+
+import eu.clarin.cmdi.vlo.importer.FacetConceptMapping.FacetConcept;
+
+public class FacetConceptMappingTest {
+
+    @Test
+    public void testMapping() {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
+        content += "<facetConcepts>\n";
+        content += "    <facetConcept name=\"name\">\n";
+        content += "        <concept>http://www.isocat.org/datcat/DC-2544</concept>\n";
+        content += "        <concept>conceptLink2</concept>\n";
+        content += "    </facetConcept>\n";
+        content += "    <facetConcept name=\"subject\" isCaseInsensitive=\"true\" allowMultipleValues=\"false\">\n";
+        content += "        <concept>conceptLink1</concept>\n";
+        content += "        <pattern>/xpath/pattern/text()</pattern>\n";
+        content += "    </facetConcept>\n";
+        content += "</facetConcepts>\n";
+
+        FacetConceptMapping conceptMapping = VLOMarshaller.unmarshal(new ByteArrayInputStream(content.getBytes()));
+        List<FacetConcept> facetConcepts = conceptMapping.getFacetConcepts();
+        assertEquals(2, facetConcepts.size());
+        FacetConcept facetConcept = facetConcepts.get(0);
+        assertEquals("name", facetConcept.getName());
+        assertFalse(facetConcept.isCaseInsensitive());
+        assertTrue(facetConcept.isAllowMultipleValues());
+        List<String> concepts = facetConcept.getConcepts();
+        assertEquals(2, concepts.size());
+        assertEquals("http://www.isocat.org/datcat/DC-2544", concepts.get(0));
+        assertEquals("conceptLink2", concepts.get(1));
+        List<String> patterns = facetConcept.getPatterns();
+        assertEquals(0, patterns.size());
+        
+        facetConcept = facetConcepts.get(1);
+        assertEquals("subject", facetConcept.getName());
+        assertTrue(facetConcept.isCaseInsensitive());
+        assertFalse(facetConcept.isAllowMultipleValues());
+        concepts = facetConcept.getConcepts();
+        assertEquals(1, concepts.size());
+        assertEquals("conceptLink1", concepts.get(0));
+        patterns = facetConcept.getPatterns();
+        assertEquals(1, patterns.size());
+        assertEquals("/xpath/pattern/text()", patterns.get(0));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactoryTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactoryTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/FacetMappingFactoryTest.java	(revision 2882)
@@ -0,0 +1,250 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+
+public class FacetMappingFactoryTest {
+
+    private final static Logger LOG = LoggerFactory.getLogger(FacetMappingFactoryTest.class);
+
+    @Test
+    public void testGetImdiMapping() {
+        FacetMapping facetMapping = FacetMappingFactory
+                .getFacetMapping("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1271859438204/xsd");//IMDI Session profile xsd
+        List<FacetConfiguration> facets = facetMapping.getFacets();
+        assertEquals(17, facets.size());
+        int index = 0;
+        FacetConfiguration mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ID, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Header/c:MdSelfLink/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COLLECTION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_PROJECT_NAME, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Project/c:Name/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Project/c:Title/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_NAME, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:Name/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Title/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_YEAR, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:Date/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_CONTINENT, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Location/c:Continent/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COUNTRY, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Location/c:Country/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGE, mapping.getName());
+        assertEquals(3, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Content/c:Content_Languages/c:Content_Language/c:Id/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Actors/c:Actor/c:Actor_Languages/c:Actor_Language/c:Id/text()", mapping.getPatterns().get(1));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Resources/c:WrittenResource/c:LanguageId/text()", mapping.getPatterns().get(2));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGES, mapping.getName());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ORGANISATION, mapping.getName());
+        assertEquals(6, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Project/c:Contact/c:Organisation/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Actors/c:Actor/c:Contact/c:Organisation/text()", mapping.getPatterns().get(1));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Resources/c:MediaFile/c:Access/c:Contact/c:Organisation/text()", mapping.getPatterns().get(2));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Resources/c:WrittenResource/c:Access/c:Contact/c:Organisation/text()", mapping.getPatterns().get(3));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Resources/c:Source/c:Access/c:Contact/c:Organisation/text()", mapping.getPatterns().get(4));
+        assertEquals("/c:CMD/c:Components/c:Session/c:Resources/c:Anonyms/c:Access/c:Contact/c:Organisation/text()", mapping.getPatterns().get(5));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_GENRE, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Content/c:Genre/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_SUBJECT, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:MDGroup/c:Content/c:Subject/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_DESCRIPTION, mapping.getName());
+        assertEquals(18, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:Session/c:descriptions/c:Description/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_RESOURCE_TYPE, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdCollectionDisplayName/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD//text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdProfile/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("check to see we tested them all", facets.size(), index);
+    }
+
+    @Test
+    public void testGetOlacMapping() {
+        FacetMapping facetMapping = FacetMappingFactory
+                .getFacetMapping("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1288172614026/xsd");
+        List<FacetConfiguration> facets = facetMapping.getFacets();
+        assertEquals(14, facets.size());
+        int index = 0;
+        FacetConfiguration mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ID, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Header/c:MdSelfLink/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COLLECTION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Header/c:MdCollectionDisplayName/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_NAME, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:title/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COUNTRY, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:spatial[@dcterms-type=\"ISO3166\"]/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:coverage[@dcterms-type=\"ISO3166\"]/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGE, mapping.getName());
+        assertEquals(3, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language", mapping.getPatterns().get(1));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()", mapping.getPatterns().get(2));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGES, mapping.getName());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ORGANISATION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:publisher/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_GENRE, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/@olac-linguistic-type", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_SUBJECT, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/text()", mapping.getPatterns().get(0));
+        //assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject[@dcterms-type=\"LCSH\"]/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_DESCRIPTION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:description/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_RESOURCE_TYPE, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdCollectionDisplayName/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD//text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdProfile/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+
+        assertEquals("check to see we tested them all", facets.size(), index);
+    }
+
+    @Test
+    public void testGetLrtMapping() {
+        FacetMapping facetMapping = FacetMappingFactory
+                .getFacetMapping("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1289827960126/xsd");
+        List<FacetConfiguration> facets = facetMapping.getFacets();
+        assertEquals(16, facets.size());
+        int index = 0;
+        FacetConfiguration mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ID, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Header/c:MdSelfLink/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COLLECTION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_NAME, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceName/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_YEAR, mapping.getName());
+        assertEquals(3, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:FinalizationYearResourceCreation/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtLexiconDetails/c:Date/text()", mapping.getPatterns().get(1));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtServiceDetails/c:Date/text()", mapping.getPatterns().get(2));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_COUNTRY, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Countries/c:Country/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Countries/c:Country/c:Code/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGE, mapping.getName());
+
+
+        //LOG.info("XXXXX: " + mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+//        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language", mapping.getPatterns().get(0));
+//        assertEquals("/c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language", mapping.getPatterns().get(1));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_LANGUAGES, mapping.getName());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_ORGANISATION, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Institute/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_GENRE, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_SUBJECT, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_DESCRIPTION, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Description/text()", mapping.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtIPR/c:Description/text()", mapping.getPatterns().get(1));
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_RESOURCE_TYPE, mapping.getName());
+        assertEquals(2, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceType/text()", mapping.getPatterns().get(0));
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdCollectionDisplayName/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD//text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals("/c:CMD/c:Header/c:MdProfile/text()", mapping.getPatterns().get(0));
+        assertEquals(1, mapping.getPatterns().size());
+        mapping = facets.get(index++);
+        assertEquals(FacetConstants.FIELD_TAG, mapping.getName());
+        assertEquals(1, mapping.getPatterns().size());
+        assertEquals("/c:CMD/c:Components/c:LrtInventoryResource/c:tags/c:tag/text()", mapping.getPatterns().get(0));
+        assertEquals("check to see we tested them all", facets.size(), index);
+    }
+
+    @Test
+    public void testGetIdMapping() throws Exception {
+        FacetMapping facetMapping = FacetMappingFactory
+                .getFacetMapping("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1290431694629/xsd");
+        List<FacetConfiguration> facets = facetMapping.getFacets();
+        FacetConfiguration facet = facets.get(0);
+        assertEquals(FacetConstants.FIELD_ID, facet.getName());
+        assertEquals(2, facet.getPatterns().size());
+        assertEquals("/c:CMD/c:Header/c:MdSelfLink/text()", facet.getPatterns().get(0));
+        assertEquals("/c:CMD/c:Components/c:EastRepublican/c:GeneralInformation/c:Identifier/text()", facet.getPatterns().get(1));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ImporterTestcase.java	(revision 2882)
@@ -0,0 +1,39 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.io.IOException;
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class ImporterTestcase {
+    private static File testDir;
+
+    protected File createCmdiFile(String name, String content) throws IOException {
+        File file = File.createTempFile(name, ".cmdi", testDir);
+        FileUtils.writeStringToFile(file, content, "UTF-8");
+        return file;
+    }
+
+    @AfterClass
+    public static void cleanup() {
+        FileUtils.deleteQuietly(testDir);
+    }
+
+    @BeforeClass
+    public static void setup() {
+        final String baseTempPath = System.getProperty("java.io.tmpdir");
+        testDir = new File(baseTempPath + File.separator + "testRegistry_" + System.currentTimeMillis());
+        testDir.mkdir();
+        testDir.deleteOnExit();
+        
+        // read the configuration defined in the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+        
+        VloConfig.setComponentRegistryRESTURL("http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/");
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessorTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessorTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/LanguageCodePostProcessorTest.java	(revision 2882)
@@ -0,0 +1,34 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+public class LanguageCodePostProcessorTest {
+
+    @Before
+    public void setUp() {
+        
+        // read the configuration from the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+    }
+
+    @Test
+    public void testLanguageCode() {
+        LanguageCodePostProcessor processor = new LanguageCodePostProcessor();
+        assertEquals("Dutch", processor.process("NL"));
+        assertEquals("English", processor.process("en"));
+        assertEquals("Dutch", processor.process("nl"));
+        assertEquals("Western Frisian", processor.process("fry"));
+        assertEquals("test", processor.process("test"));
+        assertEquals("", processor.process(""));
+        assertEquals(null, processor.process(null));
+        assertEquals("French", processor.process("ISO639-3:fra"));
+        assertEquals("German", processor.process("RFC1766:x-sil-GER"));
+        assertEquals("RFC1766:sgn-NL", processor.process("RFC1766:sgn-NL"));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/MetadataImporterTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/MetadataImporterTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/MetadataImporterTest.java	(revision 2882)
@@ -0,0 +1,342 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.DataRoot;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.common.SolrInputDocument;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+public class MetadataImporterTest extends ImporterTestcase {
+
+    @Test
+    public void testImporterSimple() throws Exception {
+        String session = "";
+        session += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        session += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        session += "   <Header>\n";
+        session += "      <MdCreationDate>2008-05-27</MdCreationDate>\n";
+        session += "      <MdSelfLink> testID1Session</MdSelfLink>\n";
+        session += "      <MdCollectionDisplayName>CollectionName</MdCollectionDisplayName>\n";
+        session += "      <MdProfile>clarin.eu:cr1:p_1271859438204</MdProfile>\n";
+        session += "   </Header>\n";
+        session += "   <Resources>\n";
+        session += "      <ResourceProxyList>\n";
+        session += "         <ResourceProxy id=\"d314e408\">\n";
+        session += "            <ResourceType mimetype=\"video/x-mpeg1\" >Resource</ResourceType>\n";
+        session += "            <ResourceRef>../Media/elan-example1.mpg</ResourceRef>\n";
+        session += "         </ResourceProxy>\n";
+        session += "      </ResourceProxyList>\n";
+        session += "   </Resources>\n";
+        session += "   <Components>\n";
+        session += "      <Session>\n";
+        session += "         <Name>kleve-route</Name>\n";
+        session += "         <Title>kleve-route-title</Title>\n";
+        session += "      </Session>\n";
+        session += "   </Components>\n";
+        session += "</CMD>\n";
+        File sessionFile = createCmdiFile("testSession", session);
+
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.clarin.eu/cmd http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1274880881885/xsd\">\n";
+        content += "   <Header>\n";
+        content += "      <MdSelfLink>testID2</MdSelfLink>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList>\n";
+        content += "         <ResourceProxy id=\"d28635e19\">\n";
+        content += "            <ResourceType>Metadata</ResourceType>\n";
+        content += "            <ResourceRef>" + sessionFile.getName() + "</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "      </ResourceProxyList>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "      <imdi-corpus>\n";
+        content += "         <Corpus>\n";
+        content += "            <Name>MPI corpora</Name>\n";
+        content += "         </Corpus>\n";
+        content += "      </imdi-corpus>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File rootFile = createCmdiFile("rootFile", content);
+
+        List<SolrInputDocument> docs = importData(rootFile.getParentFile());
+        assertEquals(1, docs.size());
+        SolrInputDocument doc = docs.get(0);
+        assertEquals("testID1Session", getValue(doc, FacetConstants.FIELD_ID));
+        assertEquals("CollectionName", getValue(doc, FacetConstants.FIELD_COLLECTION));
+        assertEquals("testRoot", getValue(doc, FacetConstants.FIELD_DATA_PROVIDER));
+        assertEquals("kleve-route", getValue(doc, FacetConstants.FIELD_NAME));
+        assertEquals(sessionFile.getAbsolutePath(), getValue(doc, FacetConstants.FIELD_FILENAME));
+        assertEquals("video", getValue(doc, FacetConstants.FIELD_RESOURCE_TYPE));
+        assertEquals("video/x-mpeg1|../Media/elan-example1.mpg", getValue(doc, FacetConstants.FIELD_RESOURCE));
+    }
+
+    @Test
+    public void testImportWithMimeTypeOverride() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdSelfLink>testID2</MdSelfLink>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1289827960126</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "      <ResourceProxyList>\n";
+        content += "         <ResourceProxy id=\"refLink\">\n";
+        content += "            <ResourceType>Resource</ResourceType>\n";
+        content += "            <ResourceRef>http://terminotica.upf.es/CREL/LIC01.htm</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "         <ResourceProxy id=\"refLink2\">\n";
+        content += "            <ResourceType>Resource</ResourceType>\n";
+        content += "            <ResourceRef>file://bla.resource2.txt</ResourceRef>\n";
+        content += "         </ResourceProxy>\n";
+        content += "      </ResourceProxyList>\n";
+        content += "   </Resources>\n";
+        content += "   <Components>\n";
+        content += "     <LrtInventoryResource>\n";
+        content += "         <LrtCommon>\n";
+        content += "             <ResourceName>PALIC</ResourceName>\n";
+        content += "             <ResourceType>Application / Tool</ResourceType>\n";
+        content += "             <ResourceType>Text</ResourceType>\n";
+        content += "         </LrtCommon>\n";
+        content += "     </LrtInventoryResource>\n";
+        content += "   </Components>\n";
+        content += "</CMD>\n";
+        File rootFile = createCmdiFile("rootFile", content);
+
+        List<SolrInputDocument> docs = importData(rootFile);
+        assertEquals(1, docs.size());
+        SolrInputDocument doc = docs.get(0);
+        assertEquals("PALIC", getValue(doc, FacetConstants.FIELD_NAME));
+        Collection<Object> fieldValues = doc.getFieldValues(FacetConstants.FIELD_RESOURCE_TYPE);
+        assertEquals(2, fieldValues.size());
+        List<String> values = new ArrayList(fieldValues);
+        Collections.sort(values);
+        assertEquals("Application / Tool", values.get(0));
+        assertEquals("text", values.get(1));
+        fieldValues = doc.getFieldValues(FacetConstants.FIELD_RESOURCE);
+        assertEquals(2, fieldValues.size());
+        values = new ArrayList(fieldValues);
+        Collections.sort(values);
+        assertEquals("text|file://bla.resource2.txt", values.get(0));
+        assertEquals("unknown type|http://terminotica.upf.es/CREL/LIC01.htm", values.get(1));
+    }
+
+    @Test
+    public void testImportWithNameSpaceGalore() throws Exception {
+        String content = "";
+        content += "<cmdi:CMD CMDVersion=\"1.1\" xmlns:cmdi=\"http://www.clarin.eu/cmd/\"\n";
+        content += "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.clarin.eu/cmd/ http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1290431694629/xsd\">\n";
+        content += "    <cmdi:Header/>\n";
+        content += "    <cmdi:Resources>\n";
+        content += "        <cmdi:ResourceProxyList>\n";
+        content += "            <cmdi:ResourceProxy id=\"TEI\">\n";
+        content += "                <cmdi:ResourceType>Resource</cmdi:ResourceType>\n";
+        content += "                <cmdi:ResourceRef>http://hdl.handle.net/11858/00-175C-0000-0000-E180-8?urlappend=/TEI</cmdi:ResourceRef>\n";
+        content += "            </cmdi:ResourceProxy>\n";
+        content += "        </cmdi:ResourceProxyList>\n";
+        content += "        <cmdi:JournalFileProxyList/>\n";
+        content += "        <cmdi:ResourceRelationList/>\n";
+        content += "    </cmdi:Resources>\n";
+        content += "    <cmdi:Components>\n";
+        content += "        <cmdi:EastRepublican ref=\"TEI\">\n";
+        content += "            <cmdi:GeneralInformation>\n";
+        content += "                <cmdi:Identifier>hdl:11858/00-175C-0000-0000-E180-8</cmdi:Identifier>\n";
+        content += "                <cmdi:Title>L'Est R\u00e9publicain : \u00e9dition du 17 mai 1999</cmdi:Title>\n";
+        content += "            </cmdi:GeneralInformation>\n";
+        content += "        </cmdi:EastRepublican>\n";
+        content += "    </cmdi:Components>\n";
+        content += "</cmdi:CMD>\n";
+
+        File rootFile = createCmdiFile("rootFile", content);
+
+        List<SolrInputDocument> docs = importData(rootFile);
+        assertEquals(1, docs.size());
+        SolrInputDocument doc = docs.get(0);
+        assertEquals("hdl:11858/00-175C-0000-0000-E180-8", getValue(doc, FacetConstants.FIELD_ID));
+        assertEquals("L'Est R\u00e9publicain : \u00e9dition du 17 mai 1999", getValue(doc, FacetConstants.FIELD_NAME));
+        assertEquals("unknown type|http://hdl.handle.net/11858/00-175C-0000-0000-E180-8?urlappend=/TEI", getValue(doc,
+                FacetConstants.FIELD_RESOURCE));
+    }
+
+    @Test
+    public void testNoIdTakeFileName() throws Exception {
+        String session = "";
+        session += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        session += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        session += "   <Header>\n";
+        session += "      <MdProfile>clarin.eu:cr1:p_1271859438204</MdProfile>\n";
+        session += "   </Header>\n";
+        session += "   <Resources>\n";
+        session += "   </Resources>\n";
+        session += "   <Components>\n";
+        session += "      <Session>\n";
+        session += "         <Name>kleve-route</Name>\n";
+        session += "         <Title>kleve-route-title</Title>\n";
+        session += "      </Session>\n";
+        session += "   </Components>\n";
+        session += "</CMD>\n";
+        File sessionFile = createCmdiFile("testSession", session);
+
+        List<SolrInputDocument> docs = importData(sessionFile);
+        assertEquals(1, docs.size());
+        SolrInputDocument doc = docs.get(0);
+        assertEquals("testRoot/" + sessionFile.getName(), getValue(doc, FacetConstants.FIELD_ID));
+    }
+
+    @Test
+    public void testProjectName() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<CMD xmlns=\"http://www.clarin.eu/cmd/\">\n";
+        content += "   <Header>\n";
+        content += "      <MdProfile>clarin.eu:cr1:p_1280305685235</MdProfile>\n";
+        content += "   </Header>\n";
+        content += "   <Resources>\n";
+        content += "   </Resources>\n";
+        content += "    <Components>\n";
+        content += "        <DynaSAND>\n";
+        content += "            <Collection>\n";
+        content += "                <GeneralInfo>\n";
+        content += "                    <Name>DiDDD</Name>\n";
+        content += "                    <ID>id1234</ID>\n";
+        content += "                </GeneralInfo>\n";
+        content += "                <Project>\n";
+        content += "                    <Name>DiDDD-project</Name>\n";
+        content += "                </Project>\n";
+        content += "            </Collection>\n";
+        content += "        </DynaSAND>\n";
+        content += "    </Components>\n";
+        content += "</CMD>\n";
+        File sessionFile = createCmdiFile("testSession", content);
+
+        List<SolrInputDocument> docs = importData(sessionFile);
+        assertEquals(1, docs.size());
+        SolrInputDocument doc = docs.get(0);
+        assertEquals("testRoot", getValue(doc, FacetConstants.FIELD_COLLECTION));
+        assertEquals("DiDDD-project", getValue(doc, FacetConstants.FIELD_PROJECT_NAME));
+    }
+
+    private Object getValue(SolrInputDocument doc, String field) {
+        assertEquals(1, doc.getFieldValues(field).size());
+        return doc.getFieldValue(field);
+    }
+
+    private List<SolrInputDocument> importData(File rootFile) throws MalformedURLException {
+        final List<SolrInputDocument> result = new ArrayList<SolrInputDocument>();
+                
+        /*
+         * Read configuration in ImporterTestCase.setup and change the setup to
+         * suit the test.
+         */
+        
+        modifyConfig(rootFile);
+        
+        MetadataImporter importer;
+        importer = new MetadataImporter() {
+            /*
+             * Because in the test, the solr server is not assumed to be 
+             * available, override the importer's class startImport method by
+             * leaving out interaction with server. 
+             * 
+             * By invoking the processCmdi method, the class being defined here
+             * needs to anticipate on an exception possibly thrown by the 
+             * processCmdi method invoking the sendDocs method. Please note 
+             * however, that the latter method is overriden, and the actual 
+             * database is being replaced by an array of documents.
+             */
+            @Override
+            void startImport() throws MalformedURLException {
+
+                List<DataRoot> dataRoots = checkDataRoots();
+                long start = System.currentTimeMillis();
+                try {
+
+                    for (DataRoot dataRoot : dataRoots) {
+                        LOG.info("Start of processing: " + 
+                                dataRoot.getOriginName());
+                        CMDIDataProcessor processor = new 
+                                CMDIParserVTDXML(POST_PROCESSORS);
+                        List<File> files = 
+                                getFilesFromDataRoot(dataRoot.getRootFile());
+                        for (File file : files) {
+                            if (VloConfig.getUseMaxFileSize()
+                                    && file.length() > 
+                                    VloConfig.getMaxFileSize()) {
+                                LOG.info("Skipping " + file.getAbsolutePath() + 
+                                        " because it is too large.");
+                            } else {
+                                LOG.debug("PROCESSING FILE: " + 
+                                        file.getAbsolutePath());                
+                                /*
+                                 * Anticipate on the solr exception that will
+                                 * never by raised because sendDocs is overriden
+                                 * in a suitable way.
+                                 */
+                                try {
+                                    processCmdi(file, dataRoot, processor);
+                                } catch (SolrServerException ex) {
+                                    Logger.getLogger(MetadataImporterTest.class.getName()).log(Level.SEVERE, null, ex);
+                                }
+                            }
+                        }
+                        if (!docs.isEmpty()) {
+                            sendDocs();
+                        }
+                        LOG.info("End of processing: " + 
+                                dataRoot.getOriginName());
+                    }
+                    
+                } catch (IOException e) {
+                    LOG.error("error updating files:\n", e);
+                } finally {
+
+                }
+                long took = (System.currentTimeMillis() - start) / 1000;
+                LOG.info("Found " + nrOfFilesWithoutId + 
+                        " file(s) without an id. (id is generated based on fileName but that may not be unique)");
+                LOG.info("Found " + nrOfFilesWithError + 
+                        " file(s) with errors.");
+                LOG.info("Found " + nrOfFilesWithoutDataResources
+                        + " file(s) without data resources (metadata descriptions without resources are ignored).");
+                LOG.info("Update of " + nrOFDocumentsUpdated + " took " + took + 
+                        " secs. Total nr of files analyzed " + nrOfFilesAnalyzed);
+            }
+
+            /*
+             * Replace the server's database by a document array
+             */
+            @Override
+            protected void sendDocs() throws IOException {
+                
+                result.addAll(this.docs);
+                docs = new ArrayList<SolrInputDocument>();
+            }
+        };
+        importer.startImport();
+        return result;
+    }
+
+    private void modifyConfig(File rootFile) {
+        DataRoot dataRoot = new DataRoot();
+        dataRoot.setDeleteFirst(false); // cannot delete becanot using real solrServer
+        dataRoot.setOriginName("testRoot");
+        dataRoot.setRootFile(rootFile);
+        dataRoot.setTostrip("");
+        dataRoot.setPrefix("http://example.com");
+        VloConfig.setDataRoots(Collections.singletonList(dataRoot));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessorTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessorTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/java/eu/clarin/cmdi/vlo/importer/ResourceTypePostProcessorTest.java	(revision 2882)
@@ -0,0 +1,22 @@
+package eu.clarin.cmdi.vlo.importer;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+public class ResourceTypePostProcessorTest {
+    
+    @Test
+    public void testMapping() {
+	ResourceTypePostProcessor processor = new ResourceTypePostProcessor();
+        assertEquals("audio", processor.process("Sound "));
+        assertEquals("video", processor.process("Moving Image"));
+        assertEquals("video", processor.process("Moving image"));
+        assertEquals("image", processor.process("Still Image"));
+        assertEquals("Image2", processor.process("Image2"));
+        assertEquals(null, processor.process(null));
+        assertEquals("", processor.process(""));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_importer/src/test/resources/log4j.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/src/test/resources/log4j.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/src/test/resources/log4j.properties	(revision 2882)
@@ -0,0 +1,12 @@
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%d %p [%c{1}#%M:%L] - %m%n
+
+log4j.rootLogger=INFO,Stdout
+
+log4j.logger.org.apache.wicket=INFO
+log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
+log4j.logger.org.apache.wicket.version=INFO
+log4j.logger.org.apache.wicket.RequestCycle=INFO
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_importer/xsdMapping.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_importer/xsdMapping.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_importer/xsdMapping.txt	(revision 2882)
@@ -0,0 +1,97 @@
+This file is generated on Apr 8, 2013 3:38:24 PM and only used to document the mapping.
+This file contains xsd name and a list of conceptName with xpath mappings that are generated.
+---------------------
+http://catalog.clarin.eu/ds/ComponentRegistry/rest/registry/profiles/clarin.eu:cr1:p_1349361150622/xsd
+FacetName:id
+Mappings:
+    /c:CMD/c:Header/c:MdSelfLink/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:identificationInfo/c:identifier/text()
+FacetName:collection
+Mappings:
+    /c:CMD/c:Header/c:MdCollectionDisplayName/text()
+FacetName:projectName
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceCreationInfo/c:fundingProject/c:projectName/text()
+FacetName:name
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:identificationInfo/c:resourceName/text()
+    /c:CMD/c:Components/c:data/c:OLAC-DcmiTerms/c:title/text()
+FacetName:country
+Mappings:
+    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:spatial[@dcterms-type="ISO3166"]/text()
+    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:coverage[@dcterms-type="ISO3166"]/text()
+FacetName:language
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusAudioInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceAudioInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusAudioInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusImageInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionImageInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceAudioInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceImageInfo/c:languageInfo/c:languageName/text()
+FacetName:languages
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusAudioInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceTextInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceAudioInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceVideoInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceImageInfo/c:languageInfo/c:languageId/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusAudioInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:corpusInfo/c:corpusMediaType/c:corpusImageInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:languageDescriptionInfo/c:languageDescriptionMediaType/c:languageDescriptionImageInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceTextInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceAudioInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceVideoInfo/c:languageInfo/c:languageName/text()
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:resourceComponentType/c:lexicalConceptualResourceInfo/c:lexicalConceptualResourceMediaType/c:lexicalConceptualResourceImageInfo/c:languageInfo/c:languageName/text()
+FacetName:organisation
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:contactPerson/c:affiliation/c:organizationName/text()
+    /c:CMD/c:Components/c:data/c:OLAC-DcmiTerms/c:publisher/text()
+FacetName:genre
+Mappings:
+    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/@olac-linguistic-type
+FacetName:subject
+Mappings:
+    /c:CMD/c:Components/c:data/c:OLAC-DcmiTerms/c:subject/text()
+FacetName:description
+Mappings:
+    /c:CMD/c:Components/c:data/c:resourceInfo/c:identificationInfo/c:description/text()
+    /c:CMD/c:Components/c:data/c:OLAC-DcmiTerms/c:description/text()
+FacetName:resourceType
+Mappings:
+    /c:CMD/c:Components/c:data/c:OLAC-DcmiTerms/c:type/text()
+FacetName:nationalProject
+Mappings:
+    /c:CMD/c:Header/c:MdCollectionDisplayName/text()
+FacetName:text
+Mappings:
+    /c:CMD//text()
+FacetName:_componentProfile
+Mappings:
+    /c:CMD/c:Header/c:MdProfile/text()
+---------------------
Index: /vlo/tags/2.13.beta.extra/vlo_preprocessor/ImdiCmdi_preprocess.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_preprocessor/ImdiCmdi_preprocess.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_preprocessor/ImdiCmdi_preprocess.xsl	(revision 2882)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+    <xsl:output method="xml" indent="yes"/>
+
+	<xsl:param name="inputDir"></xsl:param><!-- e.g. /lat/tools/vlo_importer/data/imdi/imdi-20110106/corpora -->
+	<xsl:param name="organisationsFile"></xsl:param> <!-- e.g. /lat/tools/vlo_importer/data/imdi/OrganisationControlledVocabulary.xml -->
+
+    <xsl:variable name="organisations" select="doc($organisationsFile)"/>
+    <xsl:variable name="newLine" select="system-property('line.separator')"/>
+
+    <xsl:template match="Organisation">
+        <xsl:variable name="org" select="normalize-space(.)"/>
+        <xsl:variable name="correctOrganisation"
+            select="$organisations/Organisations/Organisation[Variation=$org]/@name"/>
+        <Organisation>
+            <xsl:choose>
+                <xsl:when test="string-length($correctOrganisation)>1">
+                    <xsl:value-of select="$correctOrganisation"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:value-of select="."/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </Organisation>
+    </xsl:template>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template name="main">
+        <xsl:variable name="inputImdis" select="concat('file://', $inputDir, '?select=*.cmdi;recurse=yes;on-error=ignore')" />
+        <xsl:for-each
+            select="collection($inputImdis)">
+            <xsl:result-document href="{document-uri(.)}">
+                <xsl:comment>
+                    <xsl:text>Preprocessed by version 0.1 of the VLO preprocessor</xsl:text>
+                </xsl:comment>
+                <xsl:value-of select="$newLine"/>
+                <xsl:apply-templates select="."/>
+            </xsl:result-document>
+        </xsl:for-each>
+    </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_preprocessor/OrganisationControlledVocabulary.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_preprocessor/OrganisationControlledVocabulary.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_preprocessor/OrganisationControlledVocabulary.xml	(revision 2882)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Organisations>
+    <Organisation name="Max Planck Institute for Psycholinguistics">
+        <Variation>MPI Nijmegen</Variation>
+        <Variation>Max Planck Institut fuer Psycholinguistik, Nijmegen, Nl.</Variation>
+        <Variation>Max Planck Institute for Psycholinguistics (Nijmegen, Netherlands)</Variation>
+        <Variation>Max Planck Institute for Psycholinguistics, Nijmegen, Netherlands</Variation>
+        <Variation>Max Planck Institute for Psycholinguistics, Nijmegen, Nl</Variation>
+        <Variation>Max Planck Institute for Psycholinguisticsc</Variation>
+        <Variation>Max-Planck-InstitÃŒt fÃŒr PsycholinguÃ¯stik</Variation>
+    </Organisation>
+    <Organisation name="University of Abidjan">
+        <Variation>Abidjan : L'Universite d'Abidjan</Variation>
+        <Variation>Abidjan : L'UniversitÃ©</Variation>
+        <Variation>Abidjan : Universite d'Abidjan</Variation>
+        <Variation>Abidjan : Universite de Abidjan</Variation>
+        <Variation>Abidjan : UniversitÃ© d'Abidjan</Variation>
+        <Variation>Abidjan : UniversitÃ© d'Abidjan, Institut de linguistique appliquÃ©e : SociÃ©tÃ© internationale de linguistique</Variation>
+        <Variation>Abidjan : l'Universite d'Abidjan</Variation>
+        <Variation>Abidjan : l'UniversitÃ© d'Abidjan</Variation>
+        <Variation>Abidjan, Cote d'Ivoire : The University</Variation>
+        <Variation>Abidjan, Cote d'Ivoire : University of Abidjan</Variation>
+        <Variation>Abidjan, Cote d'Ivoire : Universityof Abidjan</Variation>
+        <Variation>Abidjan, CÃŽte-d'Ivoire : [L'UniversitÃ© d'Abidjan]</Variation>
+        <Variation>Abidjan, Ivory Coast : UniversitÃ© Abidjan</Variation>
+    </Organisation>
+</Organisations>
Index: /vlo/tags/2.13.beta.extra/vlo_preprocessor/vlo_preprocessor.sh
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_preprocessor/vlo_preprocessor.sh	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_preprocessor/vlo_preprocessor.sh	(revision 2882)
@@ -0,0 +1,23 @@
+#!/bin/sh
+# script to start up the vlo preprocessing xsl.
+
+INPUT_DIR=$1
+
+if [ -z $INPUT_DIR ] 
+then
+    echo "Usage params missing: <path_to_inputdir>"
+    echo "For example: '/lat/tools/vlo_importer/data/imdi/imdi-20110106/corpora'"
+    echo "ERROR"
+    exit 0
+fi
+
+#assuming work dir has these files 
+SAXONJAR=saxon8.jar
+XSLTEMPLATE=ImdiCmdi_preprocess.xsl
+ORGANISATIONS_INPUT_FILE=OrganisationControlledVocabulary.xml
+
+JAVA=java
+
+echo "Starting preprocessing..."
+$JAVA -Xmx1024M -jar $SAXONJAR -it main $XSLTEMPLATE inputDir=$INPUT_DIR organisationsFile=$ORGANISATIONS_INPUT_FILE
+echo "...done."
Index: /vlo/tags/2.13.beta.extra/vlo_solr/README.TXT
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/README.TXT	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/README.TXT	(revision 2882)
@@ -0,0 +1,19 @@
+The goal of this project is to make it easy to create an installation of a solr/server.
+The projects is basically a stripped down version of the solr example download with a maven pom for installation.
+
+Changes from the original solr example:
+- The end result of a mvn package is a zip in the target dir with the solr war, solr conf and tomcat context file.
+- The solr war differs that it is not using jetty and has log4j.properties added so we can direct the logging. 
+  See the log4j.properties in WEB-INF/classes to take a look at the location of the log file. 
+- Added a maven pom with some properties to set the solr home and solr log dir in an easy way.
+- Adjusted the solr/conf/schema.xml file to be used for our facets.
+
+Installation:
+- Check the pom.xml for properties that can be set. 
+- run: mvn package 
+- unzip: target/vlo_solr-1.4.1-vlo_solr_conf.zip to your favorite location (e.g. production server).
+- check the log4j.properties (inside the war) and vlo_solr.xml for proper solr_home/log directories
+- copy example tomcat context file: vlo_solr.xml to: <Tomcat-Home>/conf/Catalina/localhost
+- Go to e.g: http://localhost:8080/vlo_solr to see if the instance is working properly.
+
+If you see the Welcome to Solr! message you have the solr server up and running and ready to be used.
Index: /vlo/tags/2.13.beta.extra/vlo_solr/pom.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/pom.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/pom.xml	(revision 2882)
@@ -0,0 +1,103 @@
+<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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>eu.clarin.cmdi</groupId>
+    <artifactId>vlo_solr</artifactId>
+    <packaging>war</packaging>
+    <version>3.6.0</version>
+    <name>vlo_solr</name>
+    <description>VLO Solr server configuration and installation project.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.solr</groupId>
+            <artifactId>solr-core</artifactId>
+            <version>3.6.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>woodstox</groupId>
+                    <artifactId>wstx-asl</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <!-- PAY ATTENTION: when changing the version of the solr ALSO ALWAYS UPDATE the parent assembly xml-->
+            <groupId>org.apache.solr</groupId>
+            <artifactId>solr-dataimporthandler</artifactId>
+            <version>3.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.solr</groupId>
+            <artifactId>solr-solrj</artifactId>
+            <version>3.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.6</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.14</version>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <vlo.solr.home>${project.build.directory}</vlo.solr.home>
+        <vlo.solr.conf>${project.build.finalName}-vlo_solr_conf/solr</vlo.solr.conf>
+        <vlo.war.name>war/solr/</vlo.war.name>
+        <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <filtering>true</filtering>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/vlo_solr_install_dir.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+   
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.1.1</version>
+                <configuration>
+                    <!--<warName>${project.artifactId}</warName>-->
+                    <webResources>
+                        <resource>
+                            <directory>src/main/webapp</directory>
+                            <filtering>true</filtering>
+                        </resource>
+                    </webResources>
+                    <archive>
+                        <manifest>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+      
+        </plugins>
+    </build>
+
+</project>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/assembly/vlo_solr_install_dir.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/assembly/vlo_solr_install_dir.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/assembly/vlo_solr_install_dir.xml	(revision 2882)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+    <id>vlo_solr_conf</id>
+    <formats>
+        <format>dir</format>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/solr_conf</directory>
+ 		    <outputDirectory></outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/solr_conf_resources</directory>
+            <filtered>true</filtered>
+ 		    <outputDirectory></outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/resources/log4j.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/resources/log4j.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/resources/log4j.properties	(revision 2882)
@@ -0,0 +1,9 @@
+log4j.appender.ROOT.File=${catalina.base}/logs/solr.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
+
+log4j.rootLogger=INFO,ROOT
+
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/admin-extra.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/admin-extra.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/admin-extra.html	(revision 2882)
@@ -0,0 +1,31 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The content of this page will be statically included into the top
+of the admin page.  Uncomment this as an example to see there the content
+will show up.
+
+<hr>
+<i>This line will appear before the first table</i>
+<tr>
+<td colspan="2">
+This row will be appended to the end of the first table
+</td>
+</tr>
+<hr>
+
+-->
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/dataimport.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/dataimport.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/dataimport.properties	(revision 2882)
@@ -0,0 +1,3 @@
+#Wed Sep 15 16:35:32 CEST 2010
+last_index_time=2010-09-15 16\:35\:30
+page.last_index_time=2010-09-15 16\:35\:30
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/elevate.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/elevate.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/elevate.xml	(revision 2882)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- If this file is found in the config directory, it will only be
+     loaded once at startup.  If it is found in Solr's data
+     directory, it will be re-loaded every commit.
+-->
+
+<elevate>
+ <query text="foo bar">
+  <doc id="1" />
+  <doc id="2" />
+  <doc id="3" />
+ </query>
+ 
+ <query text="ipod">
+   <doc id="MA147LL/A" />  <!-- put the actual ipod at the top -->
+   <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
+ </query>
+ 
+</elevate>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/mapping-ISOLatin1Accent.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/mapping-ISOLatin1Accent.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/mapping-ISOLatin1Accent.txt	(revision 2882)
@@ -0,0 +1,248 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Syntax:
+#   "source" => "target"
+#     "source".length() > 0 (source cannot be empty.)
+#     "target".length() >= 0 (target can be empty.)
+
+# example:
+#   "Ã" => "A"
+#   "\u00C0" => "A"
+#   "\u00C0" => "\u0041"
+#   "Ã" => "ss"
+#   "\t" => " "
+#   "\n" => ""
+
+# Ã => A
+"\u00C0" => "A"
+
+# Ã => A
+"\u00C1" => "A"
+
+# Ã => A
+"\u00C2" => "A"
+
+# Ã => A
+"\u00C3" => "A"
+
+# Ã => A
+"\u00C4" => "A"
+
+# Ã
+ => A
+"\u00C5" => "A"
+
+# Ã => AE
+"\u00C6" => "AE"
+
+# Ã => C
+"\u00C7" => "C"
+
+# Ã => E
+"\u00C8" => "E"
+
+# Ã => E
+"\u00C9" => "E"
+
+# Ã => E
+"\u00CA" => "E"
+
+# Ã => E
+"\u00CB" => "E"
+
+# Ã => I
+"\u00CC" => "I"
+
+# Ã => I
+"\u00CD" => "I"
+
+# Ã => I
+"\u00CE" => "I"
+
+# Ã => I
+"\u00CF" => "I"
+
+# Ä² => IJ
+"\u0132" => "IJ"
+
+# Ã => D
+"\u00D0" => "D"
+
+# Ã => N
+"\u00D1" => "N"
+
+# Ã => O
+"\u00D2" => "O"
+
+# Ã => O
+"\u00D3" => "O"
+
+# Ã => O
+"\u00D4" => "O"
+
+# Ã => O
+"\u00D5" => "O"
+
+# Ã => O
+"\u00D6" => "O"
+
+# Ã => O
+"\u00D8" => "O"
+
+# Å => OE
+"\u0152" => "OE"
+
+# Ã
+"\u00DE" => "TH"
+
+# Ã => U
+"\u00D9" => "U"
+
+# Ã => U
+"\u00DA" => "U"
+
+# Ã => U
+"\u00DB" => "U"
+
+# Ã => U
+"\u00DC" => "U"
+
+# Ã => Y
+"\u00DD" => "Y"
+
+# Åž => Y
+"\u0178" => "Y"
+
+# Ã  => a
+"\u00E0" => "a"
+
+# Ã¡ => a
+"\u00E1" => "a"
+
+# Ã¢ => a
+"\u00E2" => "a"
+
+# Ã£ => a
+"\u00E3" => "a"
+
+# Ã€ => a
+"\u00E4" => "a"
+
+# Ã¥ => a
+"\u00E5" => "a"
+
+# ÃŠ => ae
+"\u00E6" => "ae"
+
+# Ã§ => c
+"\u00E7" => "c"
+
+# Ãš => e
+"\u00E8" => "e"
+
+# Ã© => e
+"\u00E9" => "e"
+
+# Ãª => e
+"\u00EA" => "e"
+
+# Ã« => e
+"\u00EB" => "e"
+
+# Ã¬ => i
+"\u00EC" => "i"
+
+# Ã­ => i
+"\u00ED" => "i"
+
+# Ã® => i
+"\u00EE" => "i"
+
+# Ã¯ => i
+"\u00EF" => "i"
+
+# Ä³ => ij
+"\u0133" => "ij"
+
+# Ã° => d
+"\u00F0" => "d"
+
+# Ã± => n
+"\u00F1" => "n"
+
+# Ã² => o
+"\u00F2" => "o"
+
+# Ã³ => o
+"\u00F3" => "o"
+
+# ÃŽ => o
+"\u00F4" => "o"
+
+# Ãµ => o
+"\u00F5" => "o"
+
+# Ã¶ => o
+"\u00F6" => "o"
+
+# Ãž => o
+"\u00F8" => "o"
+
+# Å => oe
+"\u0153" => "oe"
+
+# Ã => ss
+"\u00DF" => "ss"
+
+# ÃŸ => th
+"\u00FE" => "th"
+
+# Ã¹ => u
+"\u00F9" => "u"
+
+# Ãº => u
+"\u00FA" => "u"
+
+# Ã» => u
+"\u00FB" => "u"
+
+# ÃŒ => u
+"\u00FC" => "u"
+
+# Ãœ => y
+"\u00FD" => "y"
+
+# Ã¿ => y
+"\u00FF" => "y"
+
+# ï¬ => ff
+"\uFB00" => "ff"
+
+# ï¬ => fi
+"\uFB01" => "fi"
+
+# ï¬ => fl
+"\uFB02" => "fl"
+
+# ï¬ => ffi
+"\uFB03" => "ffi"
+
+# ï¬ => ffl
+"\uFB04" => "ffl"
+
+# ï¬
+ => ft
+"\uFB05" => "ft"
+
+# ï¬ => st
+"\uFB06" => "st"
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/protwords.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/protwords.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/protwords.txt	(revision 2882)
@@ -0,0 +1,21 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+# Use a protected word file to protect against the stemmer reducing two
+# unrelated words to the same base word.
+
+# Some non-words that normally won't be encountered,
+# just to test that they won't be stemmed.
+dontstems
+zwhacky
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/schema.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/schema.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/schema.xml	(revision 2882)
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ This is the Solr schema file. This file should be named "schema.xml" and
+ should be in the conf directory under the solr home
+ (i.e. ./solr/conf/schema.xml by default)
+ or located where the classloader for the Solr webapp can find it.
+
+ This example schema is the recommended starting point for users.
+ It should be kept correct and concise, usable out-of-the-box.
+
+ For more information, on how to customize this file, please see
+ http://wiki.apache.org/solr/SchemaXml
+
+ PERFORMANCE NOTE: this schema includes many optional features and should not
+ be used for benchmarking.  To improve performance one could
+  - set stored="false" for all fields possible (esp large fields) when you
+    only need to search on the field but don't need to return the original
+    value.
+  - set indexed="false" if you don't need to search on the field, but only
+    return the field as a result of searching on other indexed fields.
+  - remove all unneeded copyField statements
+  - for best index size and searching performance, set "index" to false
+    for all general text fields, use copyField to copy them to the
+    catchall "text" field, and use that for searching.
+  - For maximum indexing performance, use the StreamingUpdateSolrServer
+    java client.
+  - Remember to run the JVM in server mode, and use a higher logging level
+    that avoids logging every request
+-->
+
+<schema name="VLO_SOLR" version="1.2">
+  <!-- attribute "name" is the name of this schema and is only used for display purposes.
+       Applications should change this to reflect the nature of the search collection.
+       version="1.2" is Solr's version number for the schema syntax and semantics.  It should
+       not normally be changed by applications.
+       1.0: multiValued attribute did not exist, all fields are multiValued by nature
+       1.1: multiValued attribute introduced, false by default
+       1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
+     -->
+
+  <types>
+    <!-- field type definitions. The "name" attribute is
+       just a label to be used by field definitions.  The "class"
+       attribute and any other attributes determine the real
+       behavior of the fieldType.
+         Class names starting with "solr" refer to java classes in the
+       org.apache.solr.analysis package.
+    -->
+
+    <!-- The StrField type is not analyzed, but indexed/stored verbatim.
+       - StrField and TextField support an optional compressThreshold which
+       limits compression (if enabled in the derived fields) to values which
+       exceed a certain size (in characters).
+    -->
+    <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
+
+    <fieldType name="metadataSource" class="solr.TextField" sortMissingLast="false" omitNorms="true" indexed="false" stored="true" />
+
+    <!-- boolean type: "true" or "false" -->
+    <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+    <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
+    <fieldtype name="binary" class="solr.BinaryField"/>
+
+    <!-- The optional sortMissingLast and sortMissingFirst attributes are
+         currently supported on types that are sorted internally as strings.
+	       This includes "string","boolean","sint","slong","sfloat","sdouble","pdate"
+       - If sortMissingLast="true", then a sort on this field will cause documents
+         without the field to come after documents with the field,
+         regardless of the requested sort order (asc or desc).
+       - If sortMissingFirst="true", then a sort on this field will cause documents
+         without the field to come before documents with the field,
+         regardless of the requested sort order.
+       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
+         then default lucene sorting will be used which places docs without the
+         field first in an ascending sort and last in a descending sort.
+    -->
+
+    <!--
+      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
+    -->
+    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+
+    <!--
+     Numeric field types that index each value at various levels of precision
+     to accelerate range queries when the number of values between the range
+     endpoints is large. See the javadoc for NumericRangeQuery for internal
+     implementation details.
+
+     Smaller precisionStep values (specified in bits) will lead to more tokens
+     indexed per value, slightly larger index size, and faster range queries.
+     A precisionStep of 0 disables indexing at different precision levels.
+    -->
+    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+
+    <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
+         is a more restricted form of the canonical representation of dateTime
+         http://www.w3.org/TR/xmlschema-2/#dateTime
+         The trailing "Z" designates UTC time and is mandatory.
+         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
+         All other components are mandatory.
+
+         Expressions can also be used to denote calculations that should be
+         performed relative to "NOW" to determine the value, ie...
+
+               NOW/HOUR
+                  ... Round to the start of the current hour
+               NOW-1DAY
+                  ... Exactly 1 day prior to now
+               NOW/DAY+6MONTHS+3DAYS
+                  ... 6 months and 3 days in the future from the start of
+                      the current day
+
+         Consult the DateField javadocs for more information.
+
+         Note: For faster range queries, consider the tdate type
+      -->
+    <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
+
+    <!-- A Trie based date field for faster date range queries and date faceting. -->
+    <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
+
+
+    <!--
+      Note:
+      These should only be used for compatibility with existing indexes (created with older Solr versions)
+      or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
+
+      Plain numeric field types that store and index the text
+      value verbatim (and hence don't support range queries, since the
+      lexicographic ordering isn't equal to the numeric ordering)
+    -->
+    <fieldType name="pint" class="solr.IntField" omitNorms="true"/>
+    <fieldType name="plong" class="solr.LongField" omitNorms="true"/>
+    <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
+    <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
+    <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
+
+
+    <!--
+      Note:
+      These should only be used for compatibility with existing indexes (created with older Solr versions)
+      or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
+
+      Numeric field types that manipulate the value into
+      a string value that isn't human-readable in its internal form,
+      but with a lexicographic ordering the same as the numeric ordering,
+      so that range queries work correctly.
+    -->
+    <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
+    <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
+    <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
+    <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
+
+
+    <!-- The "RandomSortField" is not used to store or search any
+         data.  You can declare fields of this type it in your schema
+         to generate pseudo-random orderings of your docs for sorting
+         purposes.  The ordering is generated based on the field name
+         and the version of the index, As long as the index version
+         remains unchanged, and the same field name is reused,
+         the ordering of the docs will be consistent.
+         If you want different psuedo-random orderings of documents,
+         for the same version of the index, use a dynamicField and
+         change the name
+     -->
+    <fieldType name="random" class="solr.RandomSortField" indexed="true" />
+
+    <!-- solr.TextField allows the specification of custom text analyzers
+         specified as a tokenizer and a list of token filters. Different
+         analyzers may be specified for indexing and querying.
+
+         The optional positionIncrementGap puts space between multiple fields of
+         this type on the same document, with the purpose of preventing false phrase
+         matching across fields.
+
+         For more info on customizing your analyzer chain, please see
+         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
+     -->
+
+    <!-- One can also specify an existing Analyzer class that has a
+         default constructor via the class attribute on the analyzer element
+    <fieldType name="text_greek" class="solr.TextField">
+      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
+    </fieldType>
+    -->
+
+    <!-- A text field that only splits on whitespace for exact matching of words -->
+    <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
+        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
+        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
+        Synonyms and stopwords are customized by external files, and stemming is enabled.
+        -->
+    <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+        -->
+        <!-- Case insensitive stop word removal.
+          add enablePositionIncrements=true in both the index and query
+          analyzers to leave a 'gap' for more accurate phrase queries.
+        -->
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="stopwords.txt"
+                enablePositionIncrements="true"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.CollationKeyFilterFactory" custom="customCollationRules.bin" strength="primary"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="stopwords.txt"
+                enablePositionIncrements="true"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.CollationKeyFilterFactory" custom="customCollationRules.bin" strength="primary"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
+      </analyzer>
+    </fieldType>
+
+
+    <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
+         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+    <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
+        <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
+             possible with WordDelimiterFilter in conjuncton with stemming. -->
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+
+    <!-- A general unstemmed text field - good if one does not know the language of the field -->
+    <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="stopwords.txt"
+                enablePositionIncrements="true"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+
+    <!-- A general unstemmed text field that indexes tokens normally and also
+         reversed (via ReversedWildcardFilterFactory), to enable more efficient
+	 leading wildcard queries. -->
+    <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
+           maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="stopwords.txt"
+                enablePositionIncrements="true"
+                />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- charFilter + WhitespaceTokenizer  -->
+    <!--
+    <fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >
+      <analyzer>
+        <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldType>
+    -->
+
+    <!-- This is an example of using the KeywordTokenizer along
+         With various TokenFilterFactories to produce a sortable field
+         that does not include some properties of the source text
+      -->
+    <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
+      <analyzer>
+        <!-- KeywordTokenizer does no actual tokenizing, so the entire
+             input string is preserved as a single token
+          -->
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <!-- The LowerCase TokenFilter does what you expect, which can be
+             when you want your sorting to be case insensitive
+          -->
+        <filter class="solr.LowerCaseFilterFactory" />
+        <!-- The TrimFilter removes any leading or trailing whitespace -->
+        <filter class="solr.TrimFilterFactory" />
+        <!-- The PatternReplaceFilter gives you the flexibility to use
+             Java Regular expression to replace any sequence of characters
+             matching a pattern with an arbitrary replacement string,
+             which may include back references to portions of the original
+             string matched by the pattern.
+
+             See the Java Regular Expression documentation for more
+             information on pattern and replacement string syntax.
+
+             http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
+          -->
+        <filter class="solr.PatternReplaceFilterFactory"
+                pattern="([^a-z])" replacement="" replace="all"
+        />
+      </analyzer>
+    </fieldType>
+
+    <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
+      </analyzer>
+    </fieldtype>
+
+    <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!--
+        The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
+        a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f
+        Attributes of the DelimitedPayloadTokenFilterFactory :
+         "delimiter" - a one character delimiter. Default is | (pipe)
+	 "encoder" - how to encode the following value into a playload
+	    float -> org.apache.lucene.analysis.payloads.FloatEncoder,
+	    integer -> o.a.l.a.p.IntegerEncoder
+	    identity -> o.a.l.a.p.IdentityEncoder
+            Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
+         -->
+        <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
+      </analyzer>
+    </fieldtype>
+
+    <!-- lowercases the entire field value, keeping it as a single token.  -->
+    <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory" />
+      </analyzer>
+    </fieldType>
+
+
+    <!-- since fields of this type are by default not stored or indexed,
+         any data added to them will be ignored outright.  -->
+    <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+
+    <!-- field for autocompletion -->
+    <fieldType name="textauto" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.LowerCaseTokenizerFactory"/>
+    </analyzer>
+  </fieldType>
+ </types>
+
+
+
+ <fields>
+   <field name="id" type="string" indexed="true" stored="true" required="true"/>
+   <field name="collection" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="name" type="string" indexed="true" stored="true" multiValued="false"/>
+   <field name="projectName" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="continent" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="country" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="language" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="organisation"  type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="genre"  type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="subject"  type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="description" type="text" indexed="true" stored="true" multiValued="true" />
+   <field name="year" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="resourceType" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="dataProvider" type="string" indexed="true" stored="true" multiValued="false" />
+   <field name="nationalProject" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="tag" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
+
+   
+   <field name="_fileName" type="string" indexed="true" stored="true" multiValued="false" />
+   <field name="_resourceRef" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="_componentProfile" type="string" indexed="true" stored="true" multiValued="false" />
+   <field name="_contentSearchRef" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="_landingPageRef" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="_searchPageRef" type="string" indexed="true" stored="true" multiValued="true" />
+   <field name="metadataSource" type="metadataSource" indexed="false" stored="true" multiValued="true" />
+   <field name="languages" type="string" indexed="true" stored="true" multiValued="true" />
+   
+   <!-- Field for autocompletion (suggester) -->
+   <field name="_suggester" type="textauto" indexed="true" stored="false"/>
+   <copyField source="name" dest="_suggester"/>
+ </fields>
+
+ <uniqueKey>id</uniqueKey>
+ <defaultSearchField>text</defaultSearchField>
+
+ <solrQueryParser defaultOperator="AND"/>
+
+</schema>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/scripts.conf
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/scripts.conf	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/scripts.conf	(revision 2882)
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+user=
+solr_hostname=localhost
+solr_port=8983
+rsyncd_port=18983
+data_dir=
+webapp_name=solr
+master_host=
+master_data_dir=
+master_status_dir=
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/solrconfig.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/solrconfig.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/solrconfig.xml	(revision 2882)
@@ -0,0 +1,1063 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- 
+     For more details about configurations options that may appear in this 
+     file, see http://wiki.apache.org/solr/SolrConfigXml.
+
+     Specifically, the Solr Config can support XInclude, which may make it easier to manage
+     the configuration.  See https://issues.apache.org/jira/browse/SOLR-1167
+-->
+<config>
+  <!-- Set this to 'false' if you want solr to continue working after it has 
+       encountered an severe configuration error.  In a production environment, 
+       you may want solr to keep working even if one handler is mis-configured.
+
+       You may also set this to false using by setting the system property:
+         -Dsolr.abortOnConfigurationError=false
+     -->
+  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
+
+  <!-- lib directives can be used to instruct Solr to load an Jars identified
+       and use them to resolve any "plugins" specified in your solrconfig.xml or
+       schema.xml (ie: Analyzers, Request Handlers, etc...).
+
+       All directories and paths are resolved relative the instanceDir.
+
+       If a "./lib" directory exists in your instanceDir, all files found in it
+       are included as if you had used the following syntax...
+       
+              <lib dir="./lib" />
+    -->
+  <!-- A dir option by itself adds any files found in the directory to the
+       classpath, this is useful for including all jars in a directory.
+    -->
+  <lib dir="../../contrib/extraction/lib" />
+  <!-- When a regex is specified in addition to a directory, only the files in that
+       directory which completely match the regex (anchored on both ends)
+       will be included.
+    -->
+  <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
+  <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
+  <!-- If a dir option (with or without a regex) is used and nothing is found
+       that matches, it will be ignored
+    -->
+  <lib dir="../../contrib/clustering/lib/downloads/" />
+  <lib dir="../../contrib/clustering/lib/" />
+  <lib dir="/total/crap/dir/ignored" /> 
+  <!-- an exact path can be used to specify a specific file.  This will cause
+       a serious error to be logged if it can't be loaded.
+  <lib path="../a-jar-that-does-not-exist.jar" /> 
+  -->
+
+  
+  <!-- Used to specify an alternate directory to hold all index data
+       other than the default ./data under the Solr home.
+       If replication is in use, this should match the replication configuration. -->
+<!--   <dataDir></dataDir>-->
+
+  <!-- WARNING: this <indexDefaults> section only provides defaults for index writers
+       in general. See also the <mainIndex> section after that when changing parameters
+       for Solr's main Lucene index. -->
+  <indexDefaults>
+   <!-- Values here affect all index writers and act as a default unless overridden. -->
+    <useCompoundFile>false</useCompoundFile>
+
+    <mergeFactor>10</mergeFactor>
+    <!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush
+     based on whichever limit is hit first.  -->
+    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
+
+    <!-- Sets the amount of RAM that may be used by Lucene indexing
+      for buffering added documents and deletions before they are
+      flushed to the Directory.  -->
+    <ramBufferSizeMB>32</ramBufferSizeMB>
+    <!-- <maxMergeDocs>2147483647</maxMergeDocs> -->
+    <maxFieldLength>10000</maxFieldLength>
+    <writeLockTimeout>1000</writeLockTimeout>
+    <commitLockTimeout>10000</commitLockTimeout>
+
+    <!--
+     Expert: Turn on Lucene's auto commit capability.  This causes intermediate
+     segment flushes to write a new lucene index descriptor, enabling it to be
+     opened by an external IndexReader.  This can greatly slow down indexing
+     speed.  NOTE: Despite the name, this value does not have any relation to
+     Solr's autoCommit functionality
+     -->
+    <!--<luceneAutoCommit>false</luceneAutoCommit>-->
+
+    <!--
+     Expert: The Merge Policy in Lucene controls how merging is handled by
+     Lucene.  The default in 2.3 is the LogByteSizeMergePolicy, previous
+     versions used LogDocMergePolicy.
+
+     LogByteSizeMergePolicy chooses segments to merge based on their size.  The
+     Lucene 2.2 default, LogDocMergePolicy chose when to merge based on number
+     of documents
+
+     Other implementations of MergePolicy must have a no-argument constructor
+     -->
+    <!--<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"/>-->
+
+    <!--
+     Expert:
+     The Merge Scheduler in Lucene controls how merges are performed.  The
+     ConcurrentMergeScheduler (Lucene 2.3 default) can perform merges in the
+     background using separate threads.  The SerialMergeScheduler (Lucene 2.2
+     default) does not.
+     -->
+    <!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
+
+	  
+    <!--
+      This option specifies which Lucene LockFactory implementation to use.
+      
+      single = SingleInstanceLockFactory - suggested for a read-only index
+               or when there is no possibility of another process trying
+               to modify the index.
+      native = NativeFSLockFactory  - uses OS native file locking
+      simple = SimpleFSLockFactory  - uses a plain file for locking
+
+      (For backwards compatibility with Solr 1.2, 'simple' is the default
+       if not specified.)
+    -->
+    <lockType>native</lockType>
+    <!--
+     Expert:
+    Controls how often Lucene loads terms into memory -->
+    <!--<termIndexInterval>256</termIndexInterval>-->
+  </indexDefaults>
+
+  <mainIndex>
+    <!-- options specific to the main on-disk lucene index -->
+    <useCompoundFile>false</useCompoundFile>
+    <ramBufferSizeMB>32</ramBufferSizeMB>
+    <mergeFactor>10</mergeFactor>
+    <!-- Deprecated -->
+    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
+    <!--<maxMergeDocs>2147483647</maxMergeDocs>-->
+
+    <!-- inherit from indexDefaults <maxFieldLength>10000</maxFieldLength> -->
+
+    <!-- If true, unlock any held write or commit locks on startup. 
+         This defeats the locking mechanism that allows multiple
+         processes to safely access a lucene index, and should be
+         used with care.
+         This is not needed if lock type is 'none' or 'single'
+     -->
+    <unlockOnStartup>false</unlockOnStartup>
+    
+    <!-- If true, IndexReaders will be reopened (often more efficient) instead
+         of closed and then opened.  -->
+    <reopenReaders>true</reopenReaders>
+
+    <!--
+     Expert:
+    Controls how often Lucene loads terms into memory.  Default is 128 and is likely good for most everyone. -->
+    <!--<termIndexInterval>256</termIndexInterval>-->
+
+    <!--
+        Custom deletion policies can specified here. The class must
+        implement org.apache.lucene.index.IndexDeletionPolicy.
+
+        http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
+
+        The standard Solr IndexDeletionPolicy implementation supports deleting
+        index commit points on number of commits, age of commit point and
+        optimized status.
+
+        The latest commit point should always be preserved regardless
+        of the criteria.
+    -->
+    <deletionPolicy class="solr.SolrDeletionPolicy">
+      <!-- The number of commit points to be kept -->
+      <str name="maxCommitsToKeep">1</str>
+      <!-- The number of optimized commit points to be kept -->
+      <str name="maxOptimizedCommitsToKeep">0</str>
+      <!--
+          Delete all commit points once they have reached the given age.
+          Supports DateMathParser syntax e.g.
+          
+          <str name="maxCommitAge">30MINUTES</str>
+          <str name="maxCommitAge">1DAY</str>
+      -->
+    </deletionPolicy>
+
+    <!--  To aid in advanced debugging, you may turn on IndexWriter debug logging.
+      Setting to true will set the file that the underlying Lucene IndexWriter
+      will write its debug infostream to.  -->
+     <infoStream file="INFOSTREAM.txt">false</infoStream> 
+
+  </mainIndex>
+
+  <!--	Enables JMX if and only if an existing MBeanServer is found, use this
+    if you want to configure JMX through JVM parameters. Remove this to disable
+    exposing Solr configuration and statistics to JMX.
+
+		If you want to connect to a particular server, specify the agentId
+		e.g. <jmx agentId="myAgent" />
+
+		If you want to start a new MBeanServer, specify the serviceUrl
+		e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
+
+		For more details see http://wiki.apache.org/solr/SolrJmx
+  -->
+  <jmx />
+
+  <!-- the default high-performance update handler -->
+  <updateHandler class="solr.DirectUpdateHandler2">
+    <!-- A prefix of "solr." for class names is an alias that
+         causes solr to search appropriate packages, including
+         org.apache.solr.(search|update|request|core|analysis)
+     -->
+
+    <!-- Perform a <commit/> automatically under certain conditions:
+         maxDocs - number of updates since last commit is greater than this
+         maxTime - oldest uncommited update (in ms) is this long ago
+         Instead of enabling autoCommit, consider using "commitWithin"
+         when adding documents. http://wiki.apache.org/solr/UpdateXmlMessages
+    <autoCommit> 
+      <maxDocs>10000</maxDocs>
+      <maxTime>1000</maxTime> 
+    </autoCommit>
+    -->
+
+
+    <!-- The RunExecutableListener executes an external command from a
+      hook such as postCommit or postOptimize.
+         exe - the name of the executable to run
+         dir - dir to use as the current working directory. default="."
+         wait - the calling thread waits until the executable returns. default="true"
+         args - the arguments to pass to the program.  default=nothing
+         env - environment variables to set.  default=nothing
+      -->
+    <!-- A postCommit event is fired after every commit or optimize command
+    <listener event="postCommit" class="solr.RunExecutableListener">
+      <str name="exe">solr/bin/snapshooter</str>
+      <str name="dir">.</str>
+      <bool name="wait">true</bool>
+      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
+      <arr name="env"> <str>MYVAR=val1</str> </arr>
+    </listener>
+    -->
+    <!-- A postOptimize event is fired only after every optimize command
+    <listener event="postOptimize" class="solr.RunExecutableListener">
+      <str name="exe">snapshooter</str>
+      <str name="dir">solr/bin</str>
+      <bool name="wait">true</bool>
+    </listener>
+    -->
+
+  </updateHandler>
+  
+  <!-- Use the following format to specify a custom IndexReaderFactory - allows for alternate
+       IndexReader implementations.
+
+       ** Experimental Feature **
+       Please note - Using a custom IndexReaderFactory may prevent certain other features
+       from working. The API to IndexReaderFactory may change without warning or may even
+       be removed from future releases if the problems cannot be resolved.
+
+       ** Features that may not work with custom IndexReaderFactory **
+       The ReplicationHandler assumes a disk-resident index. Using a custom
+       IndexReader implementation may cause incompatibility with ReplicationHandler and
+       may cause replication to not work correctly. See SOLR-1366 for details.
+
+  <indexReaderFactory name="IndexReaderFactory" class="package.class">
+    Parameters as required by the implementation
+  </indexReaderFactory >
+  -->
+  <!-- To set the termInfosIndexDivisor, do this: -->
+  <!--<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
+    <int name="termInfosIndexDivisor">12</int>
+  </indexReaderFactory >-->
+
+
+  <query>
+    <!-- Maximum number of clauses in a boolean query... in the past, this affected
+        range or prefix queries that expanded to big boolean queries - built in Solr 
+        query parsers no longer create queries with this limitation. 
+        An exception is thrown if exceeded.  -->
+    <maxBooleanClauses>1024</maxBooleanClauses>
+
+
+    <!-- There are two implementations of cache available for Solr,
+         LRUCache, based on a synchronized LinkedHashMap, and
+         FastLRUCache, based on a ConcurrentHashMap.  FastLRUCache has faster gets
+         and slower puts in single threaded operation and thus is generally faster
+         than LRUCache when the hit ratio of the cache is high (> 75%), and may be
+         faster under other scenarios on multi-cpu systems. -->
+    <!-- Cache used by SolrIndexSearcher for filters (DocSets),
+         unordered sets of *all* documents that match a query.
+         When a new searcher is opened, its caches may be prepopulated
+         or "autowarmed" using data from caches in the old searcher.
+         autowarmCount is the number of items to prepopulate.  For LRUCache,
+         the autowarmed items will be the most recently accessed items.
+       Parameters:
+         class - the SolrCache implementation LRUCache or FastLRUCache
+         size - the maximum number of entries in the cache
+         initialSize - the initial capacity (number of entries) of
+           the cache.  (seel java.util.HashMap)
+         autowarmCount - the number of entries to prepopulate from
+           and old cache.
+         -->
+    <filterCache
+      class="solr.FastLRUCache"
+      size="512"
+      initialSize="512"
+      autowarmCount="0"/>
+
+    <!-- Cache used to hold field values that are quickly accessible
+         by document id.  The fieldValueCache is created by default
+         even if not configured here.
+      <fieldValueCache
+        class="solr.FastLRUCache"
+        size="512"
+        autowarmCount="128"
+        showItems="32"
+      />
+    -->
+
+   <!-- queryResultCache caches results of searches - ordered lists of
+         document ids (DocList) based on a query, a sort, and the range
+         of documents requested.  -->
+    <queryResultCache
+      class="solr.LRUCache"
+      size="512"
+      initialSize="512"
+      autowarmCount="0"/>
+
+  <!-- documentCache caches Lucene Document objects (the stored fields for each document).
+       Since Lucene internal document ids are transient, this cache will not be autowarmed.  -->
+    <documentCache
+      class="solr.LRUCache"
+      size="512"
+      initialSize="512"
+      autowarmCount="0"/>
+
+    <!-- If true, stored fields that are not requested will be loaded lazily.
+      This can result in a significant speed improvement if the usual case is to
+      not load all stored fields, especially if the skipped fields are large
+      compressed text fields.
+    -->
+    <enableLazyFieldLoading>true</enableLazyFieldLoading>
+
+    <!-- Example of a generic cache.  These caches may be accessed by name
+         through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
+         The purpose is to enable easy caching of user/application level data.
+         The regenerator argument should be specified as an implementation
+         of solr.search.CacheRegenerator if autowarming is desired.  -->
+    <!--
+    <cache name="myUserCache"
+      class="solr.LRUCache"
+      size="4096"
+      initialSize="1024"
+      autowarmCount="1024"
+      regenerator="org.mycompany.mypackage.MyRegenerator"
+      />
+    -->
+
+   <!-- An optimization that attempts to use a filter to satisfy a search.
+         If the requested sort does not include score, then the filterCache
+         will be checked for a filter matching the query. If found, the filter
+         will be used as the source of document ids, and then the sort will be
+         applied to that.
+    <useFilterForSortedQuery>true</useFilterForSortedQuery>
+   -->
+
+   <!-- An optimization for use with the queryResultCache.  When a search
+         is requested, a superset of the requested number of document ids
+         are collected.  For example, if a search for a particular query
+         requests matching documents 10 through 19, and queryWindowSize is 50,
+         then documents 0 through 49 will be collected and cached.  Any further
+         requests in that range can be satisfied via the cache.  -->
+    <queryResultWindowSize>20</queryResultWindowSize>
+
+    <!-- Maximum number of documents to cache for any entry in the
+         queryResultCache. -->
+    <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
+
+    <!-- a newSearcher event is fired whenever a new searcher is being prepared
+      and there is a current searcher handling requests (aka registered).
+      It can be used to prime certain caches to prevent long request times for
+      certain requests.
+    -->
+    <!-- QuerySenderListener takes an array of NamedList and executes a
+         local query request for each NamedList in sequence. -->
+    <listener event="newSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <!--
+        <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
+        <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
+        <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
+        -->
+      </arr>
+    </listener>
+
+    <!-- a firstSearcher event is fired whenever a new searcher is being
+         prepared but there is no current registered searcher to handle
+         requests or to gain autowarming data from. -->
+    <listener event="firstSearcher" class="solr.QuerySenderListener">
+      <arr name="queries">
+        <lst> <str name="q">solr rocks</str><str name="start">0</str><str name="rows">10</str></lst>
+        <lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
+      </arr>
+    </listener>
+
+    <!-- If a search request comes in and there is no current registered searcher,
+         then immediately register the still warming searcher and use it.  If
+         "false" then all requests will block until the first searcher is done
+         warming. -->
+    <useColdSearcher>false</useColdSearcher>
+
+    <!-- Maximum number of searchers that may be warming in the background
+      concurrently.  An error is returned if this limit is exceeded. Recommend
+      1-2 for read-only slaves, higher for masters w/o cache warming. -->
+    <maxWarmingSearchers>2</maxWarmingSearchers>
+
+  </query>
+
+  <!-- 
+    Let the dispatch filter handler /select?qt=XXX
+    handleSelect=true will use consistent error handling for /select and /update
+    handleSelect=false will use solr1.1 style error formatting
+    -->
+  <requestDispatcher handleSelect="true" >
+    <!--Make sure your system has some authentication before enabling remote streaming!  -->
+    <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" />
+
+    <!-- Set HTTP caching related parameters (for proxy caches and clients).
+          
+         To get the behaviour of Solr 1.2 (ie: no caching related headers)
+         use the never304="true" option and do not specify a value for
+         <cacheControl>
+    -->
+    <!-- <httpCaching never304="true"> -->
+    <httpCaching lastModifiedFrom="openTime"
+                 etagSeed="Solr">
+       <!-- lastModFrom="openTime" is the default, the Last-Modified value
+            (and validation against If-Modified-Since requests) will all be
+            relative to when the current Searcher was opened.
+            You can change it to lastModFrom="dirLastMod" if you want the
+            value to exactly corrispond to when the physical index was last
+            modified.
+
+            etagSeed="..." is an option you can change to force the ETag
+            header (and validation against If-None-Match requests) to be
+            differnet even if the index has not changed (ie: when making
+            significant changes to your config file)
+
+            lastModifiedFrom and etagSeed are both ignored if you use the
+            never304="true" option.
+       -->
+       <!-- If you include a <cacheControl> directive, it will be used to
+            generate a Cache-Control header, as well as an Expires header
+            if the value contains "max-age="
+
+            By default, no Cache-Control header is generated.
+
+            You can use the <cacheControl> option even if you have set
+            never304="true"
+       -->
+       <!-- <cacheControl>max-age=30, public</cacheControl> -->
+    </httpCaching>
+  </requestDispatcher>
+
+
+  <!-- requestHandler plugins... incoming queries will be dispatched to the
+     correct handler based on the path or the qt (query type) param.
+     Names starting with a '/' are accessed with the a path equal to the 
+     registered name.  Names without a leading '/' are accessed with:
+      http://host/app/select?qt=name
+     If no qt is defined, the requestHandler that declares default="true"
+     will be used.
+  -->
+  <requestHandler name="standard" class="solr.SearchHandler" default="true">
+    <!-- default values for query parameters -->
+     <lst name="defaults">
+       <str name="echoParams">explicit</str>
+       <!--
+       <int name="rows">10</int>
+       <str name="fl">*</str>
+       <str name="version">2.1</str>
+        -->
+     </lst>
+  </requestHandler>
+
+ <!-- <requestHandler name="/dataimport"
+   	class="org.apache.solr.handler.dataimport.DataImportHandler">
+   	<lst name="defaults">
+   		<str name="config">data-config.xml</str>
+   	</lst>
+   </requestHandler> -->
+
+<!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
+<!-- remove the <lst name="master"> section if this is just a slave -->
+<!-- remove  the <lst name="slave"> section if this is just a master -->
+<!--
+<requestHandler name="/replication" class="solr.ReplicationHandler" >
+    <lst name="master">
+      <str name="replicateAfter">commit</str>
+      <str name="replicateAfter">startup</str>
+      <str name="confFiles">schema.xml,stopwords.txt</str>
+    </lst>
+    <lst name="slave">
+      <str name="masterUrl">http://localhost:8983/solr/replication</str>
+      <str name="pollInterval">00:00:60</str>
+    </lst>
+</requestHandler>-->
+
+  <!-- DisMaxRequestHandler allows easy searching across multiple fields
+       for simple user-entered phrases.  It's implementation is now
+       just the standard SearchHandler with a default query type
+       of "dismax". 
+       see http://wiki.apache.org/solr/DisMaxRequestHandler
+   -->
+  <requestHandler name="dismax" class="solr.SearchHandler" >
+    <lst name="defaults">
+     <str name="defType">dismax</str>
+     <str name="echoParams">explicit</str>
+     <float name="tie">0.01</float>
+     <str name="qf">
+        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+     </str>
+     <str name="pf">
+        text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
+     </str>
+     <str name="bf">
+        popularity^0.5 recip(price,1,1000,1000)^0.3
+     </str>
+     <str name="fl">
+        id,name,price,score
+     </str>
+     <str name="mm">
+        2&lt;-1 5&lt;-2 6&lt;90%
+     </str>
+     <int name="ps">100</int>
+     <str name="q.alt">*:*</str>
+     <!-- example highlighter config, enable per-query with hl=true -->
+     <str name="hl.fl">text features name</str>
+     <!-- for this field, we want no fragmenting, just highlighting -->
+     <str name="f.name.hl.fragsize">0</str>
+     <!-- instructs Solr to return the field itself if no query terms are
+          found -->
+     <str name="f.name.hl.alternateField">name</str>
+     <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
+    </lst>
+  </requestHandler>
+
+  <!-- Note how you can register the same handler multiple times with
+       different names (and different init parameters)
+    -->
+  <requestHandler name="partitioned" class="solr.SearchHandler" >
+    <lst name="defaults">
+     <str name="defType">dismax</str>
+     <str name="echoParams">explicit</str>
+     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
+     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
+     <!-- This is an example of using Date Math to specify a constantly
+          moving date range in a config...
+       -->
+     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
+    </lst>
+    <!-- In addition to defaults, "appends" params can be specified
+         to identify values which should be appended to the list of
+         multi-val params from the query (or the existing "defaults").
+
+         In this example, the param "fq=instock:true" will be appended to
+         any query time fq params the user may specify, as a mechanism for
+         partitioning the index, independent of any user selected filtering
+         that may also be desired (perhaps as a result of faceted searching).
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "appends" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <lst name="appends">
+      <str name="fq">inStock:true</str>
+    </lst>
+    <!-- "invariants" are a way of letting the Solr maintainer lock down
+         the options available to Solr clients.  Any params values
+         specified here are used regardless of what values may be specified
+         in either the query, the "defaults", or the "appends" params.
+
+         In this example, the facet.field and facet.query params are fixed,
+         limiting the facets clients can use.  Faceting is not turned on by
+         default - but if the client does specify facet=true in the request,
+         these are the only facets they will be able to see counts for;
+         regardless of what other facet.field or facet.query params they
+         may specify.
+
+         NOTE: there is *absolutely* nothing a client can do to prevent these
+         "invariants" values from being used, so don't use this mechanism
+         unless you are sure you always want it.
+      -->
+    <lst name="invariants">
+      <str name="facet.field">cat</str>
+      <str name="facet.field">manu_exact</str>
+      <str name="facet.query">price:[* TO 500]</str>
+      <str name="facet.query">price:[500 TO *]</str>
+    </lst>
+  </requestHandler>
+
+
+  <!--
+   Search components are registered to SolrCore and used by Search Handlers
+   
+   By default, the following components are avaliable:
+    
+   <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
+   <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
+   <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
+   <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
+   <searchComponent name="stats"     class="org.apache.solr.handler.component.StatsComponent" />
+   <searchComponent name="debug"     class="org.apache.solr.handler.component.DebugComponent" />
+   
+   Default configuration in a requestHandler would look like:
+    <arr name="components">
+      <str>query</str>
+      <str>facet</str>
+      <str>mlt</str>
+      <str>highlight</str>
+      <str>stats</str>
+      <str>debug</str>
+    </arr>
+
+    If you register a searchComponent to one of the standard names, that will be used instead.
+    To insert components before or after the 'standard' components, use:
+    
+    <arr name="first-components">
+      <str>myFirstComponentName</str>
+    </arr>
+    
+    <arr name="last-components">
+      <str>myLastComponentName</str>
+    </arr>
+  -->
+
+   <!-- The spell check component can return a list of alternative spelling
+  suggestions.  -->
+  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
+
+    <str name="queryAnalyzerFieldType">textSpell</str>
+
+    <lst name="spellchecker">
+      <str name="name">default</str>
+      <str name="field">name</str>
+      <str name="spellcheckIndexDir">./spellchecker</str>
+    </lst>
+
+    <!-- a spellchecker that uses a different distance measure
+    <lst name="spellchecker">
+      <str name="name">jarowinkler</str>
+      <str name="field">spell</str>
+      <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
+      <str name="spellcheckIndexDir">./spellchecker2</str>
+    </lst>
+     -->
+
+    <!-- a file based spell checker
+    <lst name="spellchecker">
+      <str name="classname">solr.FileBasedSpellChecker</str>
+      <str name="name">file</str>
+      <str name="sourceLocation">spellings.txt</str>
+      <str name="characterEncoding">UTF-8</str>
+      <str name="spellcheckIndexDir">./spellcheckerFile</str>
+    </lst>
+    -->
+  </searchComponent>
+
+  <!-- A request handler utilizing the spellcheck component.  
+  #############################################################################
+  NOTE: This is purely as an example.  The whole purpose of the
+  SpellCheckComponent is to hook it into the request handler that handles (i.e.
+  the standard or dismax SearchHandler) queries such that a separate request is
+  not needed to get suggestions.
+
+  IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU
+  WANT FOR YOUR PRODUCTION SYSTEM!
+  #############################################################################
+  -->
+  <requestHandler name="/spell" class="solr.SearchHandler" lazy="true">
+    <lst name="defaults">
+      <!-- omp = Only More Popular -->
+      <str name="spellcheck.onlyMorePopular">false</str>
+      <!-- exr = Extended Results -->
+      <str name="spellcheck.extendedResults">false</str>
+      <!--  The number of suggestions to return -->
+      <str name="spellcheck.count">1</str>
+    </lst>
+    <arr name="last-components">
+      <str>spellcheck</str>
+    </arr>
+  </requestHandler>
+
+  <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
+  <!-- A Req Handler for working with the tvComponent.  This is purely as an example.
+  You will likely want to add the component to your already specified request handlers. -->
+  <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
+    <lst name="defaults">
+      <bool name="tv">true</bool>
+    </lst>
+    <arr name="last-components">
+      <str>tvComponent</str>
+    </arr>
+  </requestHandler>
+  
+  
+  <!-- a suggester component for autocomplete -->
+  <searchComponent class="solr.SpellCheckComponent" name="suggest">
+    <lst name="spellchecker">
+    	<str name="name">suggest</str>
+    	<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
+    	<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
+    	<str name="field">_suggester</str>
+    </lst>
+  </searchComponent>
+  <!-- Req Handler for suggest searchComponent -->
+  <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/suggest">
+    <lst name="defaults">
+      <str name="spellcheck">true</str>
+      <str name="spellcheck.dictionary">suggest</str>
+      <str name="spellcheck.onlyMorePopular">true</str>
+      <str name="spellcheck.count">5</str>
+    </lst>
+    <arr name="components">
+      <str>suggest</str>
+    </arr>
+  </requestHandler>
+  
+
+  <!-- Clustering Component
+       http://wiki.apache.org/solr/ClusteringComponent
+       This relies on third party jars which are not included in the release.
+       To use this component (and the "/clustering" handler)
+       Those jars will need to be downloaded, and you'll need to set the
+       solr.cluster.enabled system property when running solr...
+          java -Dsolr.clustering.enabled=true -jar start.jar
+    -->
+  <searchComponent
+    name="clusteringComponent"
+    enable="${solr.clustering.enabled:false}"
+    class="org.apache.solr.handler.clustering.ClusteringComponent" >
+    <!-- Declare an engine -->
+    <lst name="engine">
+      <!-- The name, only one can be named "default" -->
+      <str name="name">default</str>
+      <!-- 
+           Class name of Carrot2 clustering algorithm. Currently available algorithms are:
+           
+           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
+           * org.carrot2.clustering.stc.STCClusteringAlgorithm
+           
+           See http://project.carrot2.org/algorithms.html for the algorithm's characteristics.
+        -->
+      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
+      <!-- 
+           Overriding values for Carrot2 default algorithm attributes. For a description
+           of all available attributes, see: http://download.carrot2.org/stable/manual/#chapter.components.
+           Use attribute key as name attribute of str elements below. These can be further
+           overridden for individual requests by specifying attribute key as request
+           parameter name and attribute value as parameter value.
+        -->
+      <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
+    </lst>
+    <lst name="engine">
+      <str name="name">stc</str>
+      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
+    </lst>
+  </searchComponent>
+  <requestHandler name="/clustering"
+                  enable="${solr.clustering.enabled:false}"
+                  class="solr.SearchHandler">
+     <lst name="defaults">
+       <bool name="clustering">true</bool>
+       <str name="clustering.engine">default</str>
+       <bool name="clustering.results">true</bool>
+       <!-- The title field -->
+       <str name="carrot.title">name</str>
+       <str name="carrot.url">id</str>
+       <!-- The field to cluster on -->
+       <str name="carrot.snippet">features</str>
+       <!-- produce summaries -->
+       <bool name="carrot.produceSummary">true</bool>
+       <!-- the maximum number of labels per cluster -->
+       <!--<int name="carrot.numDescriptions">5</int>-->
+       <!-- produce sub clusters -->
+       <bool name="carrot.outputSubClusters">false</bool>
+    </lst>     
+    <arr name="last-components">
+      <str>clusteringComponent</str>
+    </arr>
+  </requestHandler>
+  
+  <!-- Solr Cell: http://wiki.apache.org/solr/ExtractingRequestHandler -->
+  <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" startup="lazy">
+    <lst name="defaults">
+      <!-- All the main content goes into "text"... if you need to return
+           the extracted text or do highlighting, use a stored field. -->
+      <str name="fmap.content">text</str>
+      <str name="lowernames">true</str>
+      <str name="uprefix">ignored_</str>
+
+      <!-- capture link hrefs but ignore div attributes -->
+      <str name="captureAttr">true</str>
+      <str name="fmap.a">links</str>
+      <str name="fmap.div">ignored_</str>
+    </lst>
+  </requestHandler>
+
+
+  <!-- A component to return terms and document frequency of those terms.
+       This component does not yet support distributed search. -->
+  <searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
+
+  <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
+     <lst name="defaults">
+      <bool name="terms">true</bool>
+    </lst>     
+    <arr name="components">
+      <str>termsComponent</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- a search component that enables you to configure the top results for
+       a given query regardless of the normal lucene scoring.-->
+  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
+    <!-- pick a fieldType to analyze queries -->
+    <str name="queryFieldType">string</str>
+    <str name="config-file">elevate.xml</str>
+  </searchComponent>
+
+  <!-- a request handler utilizing the elevator component -->
+  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
+    <lst name="defaults">
+      <str name="echoParams">explicit</str>
+    </lst>
+    <arr name="last-components">
+      <str>elevator</str>
+    </arr>
+  </requestHandler>
+
+
+  <!-- Update request handler.  
+
+       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
+       the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
+       The response format differs from solr1.1 formatting and returns a standard error code.
+       To enable solr1.1 behavior, remove the /update handler or change its path
+    -->
+  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
+
+
+  <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
+
+  <!--
+   Analysis request handler.  Since Solr 1.3.  Use to return how a document is analyzed.  Useful
+   for debugging and as a token server for other types of applications.
+
+   This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
+
+   <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
+   -->
+
+  <!--
+    An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
+    (single) content stream with the following format:
+
+    <docs>
+      <doc>
+        <field name="id">1</field>
+        <field name="name">The Name</field>
+        <field name="text">The Text Value</field>
+      <doc>
+      <doc>...</doc>
+      <doc>...</doc>
+      ...
+    </docs>
+
+    Note: Each document must contain a field which serves as the unique key. This key is used in the returned
+    response to assoicate an analysis breakdown to the analyzed document.
+
+    Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
+    sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
+    supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
+    tokens will be marked as a "match".
+  -->
+  <requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler" />
+
+  <!--
+    RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
+    to specify multiple field types and field names in the same request and outputs index-time and
+    query-time analysis for each of them.
+
+    Request parameters are:
+    analysis.fieldname - The field name whose analyzers are to be used
+    analysis.fieldtype - The field type whose analyzers are to be used
+    analysis.fieldvalue - The text for index-time analysis
+    q (or analysis.q) - The text for query time analysis
+    analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
+                                      tokens of the field value analysis will be marked as "matched" for every
+                                      token that is produces by the query analysis
+   -->
+  <requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler" />
+
+
+  <!-- CSV update handler, loaded on demand -->
+  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
+
+
+  <!-- 
+   Admin Handlers - This will register all the standard admin RequestHandlers.  Adding 
+   this single handler is equivalent to registering:
+   
+  <requestHandler name="/admin/luke"       class="org.apache.solr.handler.admin.LukeRequestHandler" />
+  <requestHandler name="/admin/system"     class="org.apache.solr.handler.admin.SystemInfoHandler" />
+  <requestHandler name="/admin/plugins"    class="org.apache.solr.handler.admin.PluginInfoHandler" />
+  <requestHandler name="/admin/threads"    class="org.apache.solr.handler.admin.ThreadDumpHandler" />
+  <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
+  <requestHandler name="/admin/file"       class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
+  
+  If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
+  <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
+    <lst name="invariants">
+     <str name="hidden">synonyms.txt</str> 
+     <str name="hidden">anotherfile.txt</str> 
+    </lst>
+  </requestHandler>
+  -->
+  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
+
+  <!-- ping/healthcheck -->
+  <requestHandler name="/admin/ping" class="PingRequestHandler">
+    <lst name="defaults">
+      <str name="qt">standard</str>
+      <str name="q">solrpingquery</str>
+      <str name="echoParams">all</str>
+    </lst>
+  </requestHandler>
+
+  <!-- Echo the request contents back to the client -->
+  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
+    <lst name="defaults">
+     <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
+     <str name="echoHandler">true</str>
+    </lst>
+  </requestHandler>
+
+  <highlighting>
+   <!-- Configure the standard fragmenter -->
+   <!-- This could most likely be commented out in the "default" case -->
+   <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
+    <lst name="defaults">
+     <int name="hl.fragsize">100</int>
+    </lst>
+   </fragmenter>
+
+   <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
+   <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
+    <lst name="defaults">
+      <!-- slightly smaller fragsizes work better because of slop -->
+      <int name="hl.fragsize">70</int>
+      <!-- allow 50% slop on fragment sizes -->
+      <float name="hl.regex.slop">0.5</float>
+      <!-- a basic sentence pattern -->
+      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
+    </lst>
+   </fragmenter>
+
+   <!-- Configure the standard formatter -->
+   <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
+    <lst name="defaults">
+     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
+     <str name="hl.simple.post"><![CDATA[</em>]]></str>
+    </lst>
+   </formatter>
+  </highlighting>
+
+  <!-- An example dedup update processor that creates the "id" field on the fly
+       based on the hash code of some other fields.  This example has overwriteDupes
+       set to false since we are using the id field as the signatureField and Solr
+       will maintain uniqueness based on that anyway. 
+       
+       You have to link the chain to an update handler above to use it ie:
+         <requestHandler name="/update "class="solr.XmlUpdateRequestHandler">
+           <lst name="defaults">
+             <str name="update.processor">dedupe</str>
+           </lst>
+         </requestHandler>  
+  -->
+  <!--
+  <updateRequestProcessorChain name="dedupe">
+    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
+      <bool name="enabled">true</bool>
+      <str name="signatureField">id</str>
+      <bool name="overwriteDupes">false</bool>
+      <str name="fields">name,features,cat</str>
+      <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
+    </processor>
+    <processor class="solr.LogUpdateProcessorFactory" />
+    <processor class="solr.RunUpdateProcessorFactory" />
+  </updateRequestProcessorChain>
+  -->
+
+
+  <!-- queryResponseWriter plugins... query responses will be written using the
+    writer specified by the 'wt' request parameter matching the name of a registered
+    writer.
+    The "default" writer is the default and will be used if 'wt' is not specified 
+    in the request. XMLResponseWriter will be used if nothing is specified here.
+    The json, python, and ruby writers are also available by default.
+
+    <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
+    <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
+    <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
+    <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
+    <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
+    <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
+
+    <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
+  -->
+
+  <!-- XSLT response writer transforms the XML output by any xslt file found
+       in Solr's conf/xslt directory.  Changes to xslt files are checked for
+       every xsltCacheLifetimeSeconds.  
+   -->
+  <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
+    <int name="xsltCacheLifetimeSeconds">5</int>
+  </queryResponseWriter>
+
+
+  <!-- example of registering a query parser
+  <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
+  -->
+
+  <!-- example of registering a custom function parser 
+  <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
+  -->
+
+  <!-- config for the admin interface -->
+  <admin>
+    <defaultQuery>solr</defaultQuery>
+
+    <!-- configure a healthcheck file for servers behind a loadbalancer
+    <healthcheck type="file">server-enabled</healthcheck>
+    -->
+  </admin>
+
+</config>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/spellings.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/spellings.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/spellings.txt	(revision 2882)
@@ -0,0 +1,2 @@
+pizza
+history
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/stopwords.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/stopwords.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/stopwords.txt	(revision 2882)
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+# a couple of test stopwords to test that the words are really being
+# configured from this file:
+stopworda
+stopwordb
+
+#Standard english stop words taken from Lucene's StopAnalyzer
+a
+an
+and
+are
+as
+at
+be
+but
+by
+for
+if
+in
+into
+is
+it
+no
+not
+of
+on
+or
+s
+such
+t
+that
+the
+their
+then
+there
+these
+they
+this
+to
+was
+will
+with
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/synonyms.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/synonyms.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/synonyms.txt	(revision 2882)
@@ -0,0 +1,31 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+#some test synonym mappings unlikely to appear in real input text
+aaa => aaaa
+bbb => bbbb1 bbbb2
+ccc => cccc1,cccc2
+a\=>a => b\=>b
+a\,a => b\,b
+fooaaa,baraaa,bazaaa
+
+# Some synonym groups specific to this example
+GB,gib,gigabyte,gigabytes
+MB,mib,megabyte,megabytes
+Television, Televisions, TV, TVs
+#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
+#after us won't split it into two words.
+
+# Synonym mappings can be used for spelling correction too
+pixima => pixma
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example.xsl	(revision 2882)
@@ -0,0 +1,132 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!-- 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<!-- 
+  Simple transform of Solr query results to HTML
+ -->
+<xsl:stylesheet version='1.0'
+    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+>
+
+  <xsl:output media-type="text/html; charset=UTF-8" encoding="UTF-8"/> 
+  
+  <xsl:variable name="title" select="concat('Solr search results (',response/result/@numFound,' documents)')"/>
+  
+  <xsl:template match='/'>
+    <html>
+      <head>
+        <title><xsl:value-of select="$title"/></title>
+        <xsl:call-template name="css"/>
+      </head>
+      <body>
+        <h1><xsl:value-of select="$title"/></h1>
+        <div class="note">
+          This has been formatted by the sample "example.xsl" transform -
+          use your own XSLT to get a nicer page
+        </div>
+        <xsl:apply-templates select="response/result/doc"/>
+      </body>
+    </html>
+  </xsl:template>
+  
+  <xsl:template match="doc">
+    <xsl:variable name="pos" select="position()"/>
+    <div class="doc">
+      <table width="100%">
+        <xsl:apply-templates>
+          <xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>
+        </xsl:apply-templates>
+      </table>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="doc/*[@name='score']" priority="100">
+    <xsl:param name="pos"></xsl:param>
+    <tr>
+      <td class="name">
+        <xsl:value-of select="@name"/>
+      </td>
+      <td class="value">
+        <xsl:value-of select="."/>
+
+        <xsl:if test="boolean(//lst[@name='explain'])">
+          <xsl:element name="a">
+            <!-- can't allow whitespace here -->
+            <xsl:attribute name="href">javascript:toggle("<xsl:value-of select="concat('exp-',$pos)" />");</xsl:attribute>?</xsl:element>
+          <br/>
+          <xsl:element name="div">
+            <xsl:attribute name="class">exp</xsl:attribute>
+            <xsl:attribute name="id">
+              <xsl:value-of select="concat('exp-',$pos)" />
+            </xsl:attribute>
+            <xsl:value-of select="//lst[@name='explain']/str[position()=$pos]"/>
+          </xsl:element>
+        </xsl:if>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="doc/arr" priority="100">
+    <tr>
+      <td class="name">
+        <xsl:value-of select="@name"/>
+      </td>
+      <td class="value">
+        <ul>
+        <xsl:for-each select="*">
+          <li><xsl:value-of select="."/></li>
+        </xsl:for-each>
+        </ul>
+      </td>
+    </tr>
+  </xsl:template>
+
+
+  <xsl:template match="doc/*">
+    <tr>
+      <td class="name">
+        <xsl:value-of select="@name"/>
+      </td>
+      <td class="value">
+        <xsl:value-of select="."/>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="*"/>
+  
+  <xsl:template name="css">
+    <script>
+      function toggle(id) {
+        var obj = document.getElementById(id);
+        obj.style.display = (obj.style.display != 'block') ? 'block' : 'none';
+      }
+    </script>
+    <style type="text/css">
+      body { font-family: "Lucida Grande", sans-serif }
+      td.name { font-style: italic; font-size:80%; }
+      td { vertical-align: top; }
+      ul { margin: 0px; margin-left: 1em; padding: 0px; }
+      .note { font-size:80%; }
+      .doc { margin-top: 1em; border-top: solid grey 1px; }
+      .exp { display: none; font-family: monospace; white-space: pre; }
+    </style>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_atom.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_atom.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_atom.xsl	(revision 2882)
@@ -0,0 +1,67 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!-- 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<!-- 
+  Simple transform of Solr query results to Atom
+ -->
+
+<xsl:stylesheet version='1.0'
+    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+  <xsl:output
+       method="xml"
+       encoding="utf-8"
+       media-type="text/xml; charset=UTF-8"
+  />
+
+  <xsl:template match='/'>
+    <xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
+    <feed xmlns="http://www.w3.org/2005/Atom">
+      <title>Example Solr Atom 1.0 Feed</title>
+      <subtitle>
+       This has been formatted by the sample "example_atom.xsl" transform -
+       use your own XSLT to get a nicer Atom feed.
+      </subtitle>
+      <author>
+        <name>Apache Solr</name>
+        <email>solr-user@lucene.apache.org</email>
+      </author>
+      <link rel="self" type="application/atom+xml" 
+            href="http://localhost:8983/solr/q={$query}&amp;wt=xslt&amp;tr=atom.xsl"/>
+      <updated>
+        <xsl:value-of select="response/result/doc[position()=1]/date[@name='timestamp']"/>
+      </updated>
+      <id>tag:localhost,2007:example</id>
+      <xsl:apply-templates select="response/result/doc"/>
+    </feed>
+  </xsl:template>
+    
+  <!-- search results xslt -->
+  <xsl:template match="doc">
+    <xsl:variable name="id" select="str[@name='id']"/>
+    <entry>
+      <title><xsl:value-of select="str[@name='name']"/></title>
+      <link href="http://localhost:8983/solr/select?q={$id}"/>
+      <id>tag:localhost,2007:<xsl:value-of select="$id"/></id>
+      <summary><xsl:value-of select="arr[@name='features']"/></summary>
+      <updated><xsl:value-of select="date[@name='timestamp']"/></updated>
+    </entry>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_rss.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_rss.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/example_rss.xsl	(revision 2882)
@@ -0,0 +1,66 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!-- 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<!-- 
+  Simple transform of Solr query results to RSS
+ -->
+
+<xsl:stylesheet version='1.0'
+    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+  <xsl:output
+       method="xml"
+       encoding="utf-8"
+       media-type="text/xml; charset=UTF-8"
+  />
+  <xsl:template match='/'>
+    <rss version="2.0">
+       <channel>
+	 <title>Example Solr RSS 2.0 Feed</title>
+         <link>http://localhost:8983/solr</link>
+         <description>
+          This has been formatted by the sample "example_rss.xsl" transform -
+          use your own XSLT to get a nicer RSS feed.
+         </description>
+         <language>en-us</language>
+         <docs>http://localhost:8983/solr</docs>
+         <xsl:apply-templates select="response/result/doc"/>
+       </channel>
+    </rss>
+  </xsl:template>
+  
+  <!-- search results xslt -->
+  <xsl:template match="doc">
+    <xsl:variable name="id" select="str[@name='id']"/>
+    <xsl:variable name="timestamp" select="date[@name='timestamp']"/>
+    <item>
+      <title><xsl:value-of select="str[@name='name']"/></title>
+      <link>
+        http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
+      </link>
+      <description>
+        <xsl:value-of select="arr[@name='features']"/>
+      </description>
+      <pubDate><xsl:value-of select="$timestamp"/></pubDate>
+      <guid>
+        http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
+      </guid>
+    </item>
+  </xsl:template>
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/luke.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/luke.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/solr_conf/solr/conf/xslt/luke.xsl	(revision 2882)
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+
+<!-- 
+  Display the luke request handler with graphs
+ -->
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns="http://www.w3.org/1999/xhtml"
+    version="1.0"
+    >
+    <xsl:output
+        method="html"
+        encoding="UTF-8"
+        media-type="text/html; charset=UTF-8"
+        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+    />
+
+    <xsl:variable name="title">Solr Luke Request Handler Response</xsl:variable>
+
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml">
+            <head>
+                <link rel="stylesheet" type="text/css" href="solr-admin.css"/>
+                <link rel="icon" href="favicon.ico" type="image/ico"/>
+                <link rel="shortcut icon" href="favicon.ico" type="image/ico"/>
+                <title>
+                    <xsl:value-of select="$title"/>
+                </title>
+                <xsl:call-template name="css"/>
+
+            </head>
+            <body>
+                <h1>
+                    <xsl:value-of select="$title"/>
+                </h1>
+                <div class="doc">
+                    <ul>
+                        <xsl:if test="response/lst[@name='index']">
+                            <li>
+                                <a href="#index">Index Statistics</a>
+                            </li>
+                        </xsl:if>
+                        <xsl:if test="response/lst[@name='fields']">
+                            <li>
+                                <a href="#fields">Field Statistics</a>
+                                <ul>
+                                    <xsl:for-each select="response/lst[@name='fields']/lst">
+                                        <li>
+                                            <a href="#{@name}">
+                                                <xsl:value-of select="@name"/>
+                                            </a>
+                                        </li>
+                                    </xsl:for-each>
+                                </ul>
+                            </li>
+                        </xsl:if>
+                        <xsl:if test="response/lst[@name='doc']">
+                            <li>
+                                <a href="#doc">Document statistics</a>
+                            </li>
+                        </xsl:if>
+                    </ul>
+                </div>
+                <xsl:if test="response/lst[@name='index']">
+                    <h2><a name="index"/>Index Statistics</h2>
+                    <xsl:apply-templates select="response/lst[@name='index']"/>
+                </xsl:if>
+                <xsl:if test="response/lst[@name='fields']">
+                    <h2><a name="fields"/>Field Statistics</h2>
+                    <xsl:apply-templates select="response/lst[@name='fields']"/>
+                </xsl:if>
+                <xsl:if test="response/lst[@name='doc']">
+                    <h2><a name="doc"/>Document statistics</h2>
+                    <xsl:apply-templates select="response/lst[@name='doc']"/>
+                </xsl:if>
+            </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="lst">
+        <xsl:if test="parent::lst">
+            <tr>
+                <td colspan="2">
+                    <div class="doc">
+                        <xsl:call-template name="list"/>
+                    </div>
+                </td>
+            </tr>
+        </xsl:if>
+        <xsl:if test="not(parent::lst)">
+            <div class="doc">
+                <xsl:call-template name="list"/>
+            </div>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template name="list">
+        <xsl:if test="count(child::*)>0">
+            <table>
+                <thead>
+                    <tr>
+                        <th colspan="2">
+                            <p>
+                                <a name="{@name}"/>
+                            </p>
+                            <xsl:value-of select="@name"/>
+                        </th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <xsl:choose>
+                        <xsl:when
+                            test="@name='histogram'">
+                            <tr>
+                                <td colspan="2">
+                                    <xsl:call-template name="histogram"/>
+                                </td>
+                            </tr>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:apply-templates/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </tbody>
+            </table>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template name="histogram">
+        <div class="doc">
+            <xsl:call-template name="barchart">
+                <xsl:with-param name="max_bar_width">50</xsl:with-param>
+                <xsl:with-param name="iwidth">800</xsl:with-param>
+                <xsl:with-param name="iheight">160</xsl:with-param>
+                <xsl:with-param name="fill">blue</xsl:with-param>
+            </xsl:call-template>
+        </div>
+    </xsl:template>
+
+    <xsl:template name="barchart">
+        <xsl:param name="max_bar_width"/>
+        <xsl:param name="iwidth"/>
+        <xsl:param name="iheight"/>
+        <xsl:param name="fill"/>
+        <xsl:variable name="max">
+            <xsl:for-each select="int">
+                <xsl:sort data-type="number" order="descending"/>
+                <xsl:if test="position()=1">
+                    <xsl:value-of select="."/>
+                </xsl:if>
+            </xsl:for-each>
+        </xsl:variable>
+        <xsl:variable name="bars">
+           <xsl:value-of select="count(int)"/>
+        </xsl:variable>
+        <xsl:variable name="bar_width">
+           <xsl:choose>
+             <xsl:when test="$max_bar_width &lt; ($iwidth div $bars)">
+               <xsl:value-of select="$max_bar_width"/>
+             </xsl:when>
+             <xsl:otherwise>
+               <xsl:value-of select="$iwidth div $bars"/>
+             </xsl:otherwise>
+           </xsl:choose>
+        </xsl:variable>
+        <table class="histogram">
+           <tbody>
+              <tr>
+                <xsl:for-each select="int">
+                   <td>
+                 <xsl:value-of select="."/>
+                 <div class="histogram">
+                  <xsl:attribute name="style">background-color: <xsl:value-of select="$fill"/>; width: <xsl:value-of select="$bar_width"/>px; height: <xsl:value-of select="($iheight*number(.)) div $max"/>px;</xsl:attribute>
+                 </div>
+                   </td> 
+                </xsl:for-each>
+              </tr>
+              <tr>
+                <xsl:for-each select="int">
+                   <td>
+                       <xsl:value-of select="@name"/>
+                   </td>
+                </xsl:for-each>
+              </tr>
+           </tbody>
+        </table>
+    </xsl:template>
+
+    <xsl:template name="keyvalue">
+        <xsl:choose>
+            <xsl:when test="@name">
+                <tr>
+                    <td class="name">
+                        <xsl:value-of select="@name"/>
+                    </td>
+                    <td class="value">
+                        <xsl:value-of select="."/>
+                    </td>
+                </tr>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="."/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="int|bool|long|float|double|uuid|date">
+        <xsl:call-template name="keyvalue"/>
+    </xsl:template>
+
+    <xsl:template match="arr">
+        <tr>
+            <td class="name">
+                <xsl:value-of select="@name"/>
+            </td>
+            <td class="value">
+                <ul>
+                    <xsl:for-each select="child::*">
+                        <li>
+                            <xsl:apply-templates/>
+                        </li>
+                    </xsl:for-each>
+                </ul>
+            </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="str">
+        <xsl:choose>
+            <xsl:when test="@name='schema' or @name='index' or @name='flags'">
+                <xsl:call-template name="schema"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:call-template name="keyvalue"/>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="schema">
+        <tr>
+            <td class="name">
+                <xsl:value-of select="@name"/>
+            </td>
+            <td class="value">
+                <xsl:if test="contains(.,'unstored')">
+                    <xsl:value-of select="."/>
+                </xsl:if>
+                <xsl:if test="not(contains(.,'unstored'))">
+                    <xsl:call-template name="infochar2string">
+                        <xsl:with-param name="charList">
+                            <xsl:value-of select="."/>
+                        </xsl:with-param>
+                    </xsl:call-template>
+                </xsl:if>
+            </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template name="infochar2string">
+        <xsl:param name="i">1</xsl:param>
+        <xsl:param name="charList"/>
+
+        <xsl:variable name="char">
+            <xsl:value-of select="substring($charList,$i,1)"/>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test="$char='I'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='I']"/> - </xsl:when>
+            <xsl:when test="$char='T'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='T']"/> - </xsl:when>
+            <xsl:when test="$char='S'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='S']"/> - </xsl:when>
+            <xsl:when test="$char='M'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='M']"/> - </xsl:when>
+            <xsl:when test="$char='V'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='V']"/> - </xsl:when>
+            <xsl:when test="$char='o'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='o']"/> - </xsl:when>
+            <xsl:when test="$char='p'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='p']"/> - </xsl:when>
+            <xsl:when test="$char='O'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='O']"/> - </xsl:when>
+            <xsl:when test="$char='L'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='L']"/> - </xsl:when>
+            <xsl:when test="$char='B'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='B']"/> - </xsl:when>
+            <xsl:when test="$char='C'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='C']"/> - </xsl:when>
+            <xsl:when test="$char='f'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='f']"/> - </xsl:when>
+            <xsl:when test="$char='l'">
+                <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='l']"/> -
+            </xsl:when>
+        </xsl:choose>
+
+        <xsl:if test="not($i>=string-length($charList))">
+            <xsl:call-template name="infochar2string">
+                <xsl:with-param name="i">
+                    <xsl:value-of select="$i+1"/>
+                </xsl:with-param>
+                <xsl:with-param name="charList">
+                    <xsl:value-of select="$charList"/>
+                </xsl:with-param>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+    <xsl:template name="css">
+        <style type="text/css">
+            <![CDATA[
+            td.name {font-style: italic; font-size:80%; }
+            .doc { margin: 0.5em; border: solid grey 1px; }
+            .exp { display: none; font-family: monospace; white-space: pre; }
+            div.histogram { background: none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;}
+            table.histogram { width: auto; vertical-align: bottom; }
+            table.histogram td, table.histogram th { text-align: center; vertical-align: bottom; border-bottom: 1px solid #ff9933; width: auto; }
+            ]]>
+        </style>
+    </xsl:template>
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/LICENSE.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/LICENSE.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/LICENSE.txt	(revision 2882)
@@ -0,0 +1,1086 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+==========================================================================
+Portions of Jetty 6 are bundled in the Solr example server.
+Jetty 6 includes a binary javax.servlet package licensed under the
+Common Development and Distribution License.
+--------------------------------------------------------------------------
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. Contributor means each individual or entity that creates or contributes to
+the creation of Modifications.
+
+1.2. Contributor Version means the combination of the Original Software, prior
+Modifications used by a Contributor (if any), and the Modifications made by
+that particular Contributor.
+
+1.3. Covered Software means (a) the Original Software, or (b) Modifications, or
+(c) the combination of files containing Original Software with files containing
+Modifications, in each case including portions thereof.
+
+1.4. Executable means the Covered Software in any form other than Source Code.
+
+1.5. Initial Developer means the individual or entity that first makes Original
+Software available under this License.
+
+1.6. Larger Work means a work which combines Covered Software or portions
+thereof with code not governed by the terms of this License.
+
+1.7. License means this document.
+
+1.8. Licensable means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently acquired,
+any and all of the rights conveyed herein.
+
+1.9. Modifications means the Source Code and Executable form of any of the
+following:
+
+A. Any file that results from an addition to, deletion from or modification of
+the contents of a file containing Original Software or previous Modifications;
+
+B. Any new file that contains any part of the Original Software or previous
+Modification; or
+
+C. Any new file that is contributed or otherwise made available under the terms
+of this License.
+
+1.10. Original Software means the Source Code and Executable form of computer
+software code that is originally released under this License.
+
+1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired,
+including without limitation, method, process, and apparatus claims, in any
+patent Licensable by grantor.
+
+1.12. Source Code means (a) the common form of computer software code in which
+modifications are made and (b) associated documentation included in or with
+such code.
+
+1.13. You (or Your) means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License. For legal
+entities, You includes any entity which controls, is controlled by, or is under
+common control with You. For purposes of this definition, control means (a)ï¿œthe
+power, direct or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b)ï¿œownership of more than fifty percent
+(50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+2.1. The Initial Developer Grant.  Conditioned upon Your compliance with
+Section 3.1 below and subject to third party intellectual property claims, the
+Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive
+license: (a) under intellectual property rights (other than patent or
+trademark) Licensable by Initial Developer, to use, reproduce, modify, display,
+perform, sublicense and distribute the Original Software (or portions thereof),
+with or without Modifications, and/or as part of a Larger Work; and (b) under
+Patent Claims infringed by the making, using or selling of Original Software,
+to make, have made, use, practice, sell, and offer for sale, and/or otherwise
+dispose of the Original Software (or portions thereof).  (c) The licenses
+granted in Sectionsï¿œ2.1(a) and (b) are effective on the date Initial Developer
+first distributes or otherwise makes the Original Software available to a third
+party under the terms of this License.  (d) Notwithstanding Sectionï¿œ2.1(b)
+above, no patent license is granted: (1)ï¿œfor code that You delete from the
+Original Software, or (2)ï¿œfor infringements caused by: (i)ï¿œthe modification of
+the Original Software, or (ii)ï¿œthe combination of the Original Software with
+other software or devices.
+
+2.2. Contributor Grant.  Conditioned upon Your compliance with Section 3.1
+below and subject to third party intellectual property claims, each Contributor
+hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under
+intellectual property rights (other than patent or trademark) Licensable by
+Contributor to use, reproduce, modify, display, perform, sublicense and
+distribute the Modifications created by such Contributor (or portions thereof),
+either on an unmodified basis, with other Modifications, as Covered Software
+and/or as part of a Larger Work; and (b) under Patent Claims infringed by the
+making, using, or selling of Modifications made by that Contributor either
+alone and/or in combination with its Contributor Version (or portions of such
+combination), to make, use, sell, offer for sale, have made, and/or otherwise
+dispose of: (1)ï¿œModifications made by that Contributor (or portions thereof);
+and (2)ï¿œthe combination of Modifications made by that Contributor with its
+Contributor Version (or portions of such combination).  (c) The licenses
+granted in Sectionsï¿œ2.2(a) and 2.2(b) are effective on the date Contributor
+first distributes or otherwise makes the Modifications available to a third
+party.  (d) Notwithstanding Sectionï¿œ2.2(b) above, no patent license is granted:
+(1)ï¿œfor any code that Contributor has deleted from the Contributor Version;
+(2)ï¿œfor infringements caused by: (i)ï¿œthird party modifications of Contributor
+Version, or (ii)ï¿œthe combination of Modifications made by that Contributor with
+other software (except as part of the Contributor Version) or other devices; or
+(3)ï¿œunder Patent Claims infringed by Covered Software in the absence of
+Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available in
+Executable form must also be made available in Source Code form and that Source
+Code form must be distributed only under the terms of this License. You must
+include a copy of this License with every copy of the Source Code form of the
+Covered Software You distribute or otherwise make available. You must inform
+recipients of any such Covered Software in Executable form as to how they can
+obtain such Covered Software in Source Code form in a reasonable manner on or
+through a medium customarily used for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed by
+the terms of this License. You represent that You believe Your Modifications
+are Your original creation(s) and/or You have sufficient rights to grant the
+rights conveyed by this License.
+
+3.3. Required Notices.  You must include a notice in each of Your Modifications
+that identifies You as the Contributor of the Modification. You may not remove
+or alter any copyright, patent or trademark notices contained within the
+Covered Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.  You may not offer or impose any terms on
+any Covered Software in Source Code form that alters or restricts the
+applicable version of this License or the recipients rights hereunder. You may
+choose to offer, and to charge a fee for, warranty, support, indemnity or
+liability obligations to one or more recipients of Covered Software. However,
+you may do so only on Your own behalf, and not on behalf of the Initial
+Developer or any Contributor. You must make it absolutely clear that any such
+warranty, support, indemnity or liability obligation is offered by You alone,
+and You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor as a
+result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.  You may distribute the Executable
+form of the Covered Software under the terms of this License or under the terms
+of a license of Your choice, which may contain terms different from this
+License, provided that You are in compliance with the terms of this License and
+that the license for the Executable form does not attempt to limit or alter the
+recipients rights in the Source Code form from the rights set forth in this
+License. If You distribute the Covered Software in Executable form under a
+different license, You must make it absolutely clear that any terms which
+differ from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and every
+Contributor for any liability incurred by the Initial Developer or such
+Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.  You may create a Larger Work by combining Covered Software
+with other code not governed by the terms of this License and distribute the
+Larger Work as a single product. In such a case, You must make sure the
+requirements of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions.  Sun Microsystems, Inc. is the initial license steward and
+may publish revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided in
+Section 4.3, no one other than the license steward has the right to modify this
+License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under which
+You originally received the Covered Software. If the Initial Developer includes
+a notice in the Original Software prohibiting it from being distributed or
+otherwise made available under any subsequent version of the License, You must
+distribute and make the Covered Software available under the terms of the
+version of the License under which You originally received the Covered
+Software. Otherwise, You may also choose to use, distribute or otherwise make
+the Covered Software available under the terms of any subsequent version of the
+License published by the license steward.  4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license for Your
+Original Software, You may create and use a modified version of this License if
+You: (a)ï¿œrename the license and remove any references to the name of the
+license steward (except to note that the license differs from this License);
+and (b)ï¿œotherwise make it clear that the license contains terms which differ
+from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT
+WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
+MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
+AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
+ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
+DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
+REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART
+OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT
+UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will terminate automatically
+if You fail to comply with terms herein and fail to cure such breach within 30
+days of becoming aware of the breach. Provisions which, by their nature, must
+remain in effect beyond the termination of this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory judgment
+actions) against Initial Developer or a Contributor (the Initial Developer or
+Contributor against whom You assert such claim is referred to as Participant)
+alleging that the Participant Software (meaning the Contributor Version where
+the Participant is a Contributor or the Original Software where the Participant
+is the Initial Developer) directly or indirectly infringes any patent, then any
+and all rights granted directly or indirectly to You by such Participant, the
+Initial Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sectionsï¿œ2.1 and/or 2.2 of this License shall, upon 60 days
+notice from Participant terminate prospectively and automatically at the
+expiration of such 60 day notice period, unless if within such 60 day period
+You withdraw Your claim with respect to the Participant Software against such
+Participant either unilaterally or pursuant to a written agreement with
+Participant.
+
+6.3. In the event of termination under Sectionsï¿œ6.1 or 6.2 above, all end user
+licenses that have been validly granted by You or any distributor hereunder
+prior to termination (excluding licenses granted to You by any distributor)
+shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
+ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
+FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN
+IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS
+LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
+LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND
+LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a commercial item, as that term is defined in
+48ï¿œC.F.R.ï¿œ2.101 (Oct. 1995), consisting of commercial computer software (as
+that term is defined at 48 C.F.R. ï¿œ252.227-7014(a)(1)) and commercial computer
+software documentation as such terms are used in 48ï¿œC.F.R.ï¿œ12.212 (Sept. 1995).
+Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
+(June 1995), all U.S. Government End Users acquire Covered Software with only
+those rights set forth herein. This U.S. Government Rights clause is in lieu
+of, and supersedes, any other FAR, DFAR, or other clause or provision that
+addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable, such
+provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to the
+extent applicable law, if any, provides otherwise), excluding such
+jurisdictions conflict-of-law provisions. Any litigation relating to this
+License shall be subject to the jurisdiction of the courts located in the
+jurisdiction and venue specified in a notice contained within the Original
+Software, with the losing party responsible for costs, including, without
+limitation, court costs and reasonable attorneys fees and expenses. The
+application of the United Nations Convention on Contracts for the International
+Sale of Goods is expressly excluded. Any law or regulation which provides that
+the language of a contract shall be construed against the drafter shall not
+apply to this License. You agree that You alone are responsible for compliance
+with the United States export administration regulations (and the export
+control laws and regulation of any other countries) when You use, distribute or
+otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is responsible
+for claims and damages arising, directly or indirectly, out of its utilization
+of rights under this License and You agree to work with Initial Developer and
+Contributors to distribute such responsibility on an equitable basis. Nothing
+herein is intended or shall be deemed to constitute any admission of liability.
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
+(CDDL) The GlassFish code released under the CDDL shall be governed by the laws
+of the State of California (excluding conflict-of-law provisions). Any
+litigation relating to this License shall be subject to the jurisdiction of the
+Federal Courts of the Northern District of California and the state courts of
+the State of California, with venue lying in Santa Clara County, California. 
+
+
+==========================================================================
+The following license applies to parts of the lucene-snowball jar
+that are generated from the snowball sources at http://snowball.tartarus.org/
+--------------------------------------------------------------------------
+The BSD License
+
+Copyright (c) 2001, Dr Martin Porter, Copyright (c) 2002, Richard Boulton
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+
+    * Neither the name of the <ORGANIZATION> nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================================
+The following license applies to easymock.jar
+--------------------------------------------------------------------------
+EasyMock 2 License (MIT License)
+Copyright (c) 2001-2007 OFFIS, Tammo Freese.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
+SOFTWARE. 
+
+==========================================================================
+The following license applies to the JQuery JavaScript library
+--------------------------------------------------------------------------
+Copyright (c) 2008 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+==========================================================================
+The following license applies to stax-utils.jar
+--------------------------------------------------------------------------
+Copyright (c) 2004, Christian Niles, unit12.net
+Copyright (c) 2004, Sun Microsystems, Inc.
+Copyright (c) 2006, John Kristian 
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of the listed copyright holders nor the names
+      of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written
+      permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================================
+The following license applies to JUnit
+--------------------------------------------------------------------------
+Common Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+      a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+      b) in the case of each subsequent Contributor:
+
+      i) changes to the Program, and
+
+      ii) additions to the Program;
+
+      where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. 
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+      a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+      b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. 
+
+      c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+      d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+      a) it complies with the terms and conditions of this Agreement; and
+
+      b) its license agreement:
+
+      i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; 
+
+      ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; 
+
+      iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+      iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. 
+
+When the Program is made available in source code form:
+
+      a) it must be made available under this Agreement; and 
+
+      b) a copy of this Agreement must be included with each copy of the Program. 
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+
+
+==========================================================================
+The following license applies to slf4j
+--------------------------------------------------------------------------
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+==========================================================================
+contrib/clustering
+==========================================================================
+Carrot2 Project
+
+Copyright (C) 2002-2008, Dawid Weiss, Stanislaw Osinski.
+Portions (C) Contributors listed in "carrot2.CONTRIBUTORS" file.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of  source code must  retain the above  copyright notice, this
+  list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice, this
+  list of conditions and the following  disclaimer in  the documentation  and/or
+  other materials provided with the distribution.
+
+- Neither the name  of the Poznan University  of Technology, Poznan, Poland  nor
+  the names  of  its contributors may  be used  to endorse  or promote  products
+  derived from this software without specific prior written permission.
+
+- We request that  you include in the  end-user documentation provided with  the
+  redistribution and/or in the software itself  an acknowledgement equivalent to
+  the following: "This  product  includes  software  developed  by  the  Carrot2
+  Project."
+
+- No algorithms or technical solutions in the project may be patented or claimed
+  proprietary.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"  AND
+ANY EXPRESS OR  IMPLIED WARRANTIES, INCLUDING,  BUT NOT LIMITED  TO, THE IMPLIED
+WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR  PURPOSE   ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE  FOR
+ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL  DAMAGES
+(INCLUDING, BUT  NOT LIMITED  TO, PROCUREMENT  OF SUBSTITUTE  GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS;  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND  ON
+ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY,  OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY WAY  OUT OF THE USE  OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================================
+EHCache
+/**
+ *  Copyright 2003-2008 Luck Consulting Pty Ltd
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+==========================================================================
+Google Collections
+/**
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+==========================================================================
+Jackson
+
+/**
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+
+
+===========================================================================
+Apache Tika Licenses - contrib/extraction
+---------------------------------------------------------------------------
+Apache Tika is licensed under the ASL 2.0.  See above for the text of the license
+
+APACHE TIKA SUBCOMPONENTS
+
+Apache Tika includes a number of subcomponents with separate copyright notices
+and license terms. Your use of these subcomponents is subject to the terms and
+conditions of the following licenses.
+
+Bouncy Castle libraries (bcmail and bcprov)
+
+    Copyright (c) 2000-2006 The Legion Of The Bouncy Castle
+    (http://www.bouncycastle.org)
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files
+    (the "Software"), to deal in the Software without restriction,
+    including without limitation the rights to use, copy, modify, merge,
+    publish, distribute, sublicense, and/or sell copies of the Software,
+    and to permit persons to whom the Software is furnished to do so,
+    subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+    OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+PDFBox library (pdfbox)
+
+    Copyright (c) 2003-2005, www.pdfbox.org
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation
+       and/or other materials provided with the distribution.
+    3. Neither the name of pdfbox; nor the names of its
+       contributors may be used to endorse or promote products derived from this
+       software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+    OF SUCH DAMAGE.
+
+FontBox and JempBox libraries (fontbox, jempbox)
+
+    Copyright (c) 2003-2005, www.fontbox.org
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation
+       and/or other materials provided with the distribution.
+    3. Neither the name of fontbox; nor the names of its
+       contributors may be used to endorse or promote products derived from this
+       software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+    OF SUCH DAMAGE.
+
+ICU4J library (icu4j)
+
+    Copyright (c) 1995-2005 International Business Machines Corporation
+    and others
+
+    All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies
+    of the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+    IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+    BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+    OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+    SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder shall
+    not be used in advertising or otherwise to promote the sale, use or other
+    dealings in this Software without prior written authorization of the
+    copyright holder.
+
+ASM library (asm)
+
+    Copyright (c) 2000-2005 INRIA, France Telecom
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of the copyright holders nor the names of its
+       contributors may be used to endorse or promote products derived from
+       this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+    THE POSSIBILITY OF SUCH DAMAGE.
+
+=================================================================================================
+The following license applies to JavaMail API 1.4.1 and JavaBeans Activation Framework (JAF) 1.1
+-------------------------------------------------------------------------------------------------
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 1.
+
+Definitions.
+
+1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
+
+1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
+
+1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
+
+1.4. Executable means the Covered Software in any form other than Source Code.
+
+1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
+
+1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
+
+1.7. License means this document.
+
+1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+1.9. Modifications means the Source Code and Executable form of any of the following: A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; B. Any new file that contains any part of the Original Software or previous Modification; or C. Any new file that is contributed or otherwise made available under the terms of this License.
+
+1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
+
+1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
+
+1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
+
+1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. License Grants.
+
+ 2.1. The Initial Developer Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof);
+
+ (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License;
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices.
+
+2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
+
+(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
+
+(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code. Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
+
+3.2. Modifications. The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
+
+3.3. Required Notices. You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms. You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions. You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works. You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
+
+4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
+
+4.3. Modified Versions. When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY. COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS. The Covered Software is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
+
+9. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/MANIFEST.MF	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/MANIFEST.MF	(revision 2882)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.8.0
+Created-By: 1.5.0_19-b02 (Sun Microsystems Inc.)
+Extension-Name: org.apache.solr
+Specification-Title: Apache Solr Search Server
+Specification-Version: 1.4.1
+Specification-Vendor: The Apache Software Foundation
+Implementation-Title: org.apache.solr
+Implementation-Version: 1.4.1 955763M - mark - 2010-06-17 18:06:52
+Implementation-Vendor: The Apache Software Foundation
+X-Compile-Source-JDK: 1.5
+X-Compile-Target-JDK: 1.5
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/NOTICE.txt
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/NOTICE.txt	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/NOTICE.txt	(revision 2882)
@@ -0,0 +1,254 @@
+==============================================================
+ Apache Solr
+ Copyright 2006-2008 The Apache Software Foundation
+==============================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Includes software from other Apache Software Foundation projects,
+including, but not limited to:
+  - Apache Lucene Java
+  - Apache Tomcat (lib/servlet-api-2.4.jar)
+  - Apache Commons
+  - Apache Geronimo (stax API jar)
+  - Apache Log4j (contrib/clustering)
+
+This product includes tests written with EasyMock Copyright 2001-2007
+Tammo Freese (http://www.easymock.org/)
+
+This product includes the JQuery JavaScript library created by John Resig.
+Copyright (c) 2008 John Resig, http://jquery.com/
+
+This product includes the stax-utils jar: https://stax-utils.dev.java.net/
+Copyright (c) 2004, Christian Niles, unit12.net
+Copyright (c) 2004, Sun Microsystems, Inc.
+Copyright (c) 2006, John Kristian 
+License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)
+
+This product includes a JUnit jar: http://junit.sourceforge.net/
+License: Common Public License - v 1.0 (http://junit.sourceforge.net/cpl-v10.html)
+
+This product includes the JavaMail API 1.4.1 jar: https://glassfish.dev.java.net/javaee5/mail/
+License: Common Development and Distribution License (CDDL) v1.0 (https://glassfish.dev.java.net/public/CDDLv1.0.html)
+
+This product includes the JavaBeans Activation Framework (JAF) 1.1 jar: http://java.sun.com/products/javabeans/jaf/index.jsp
+License: Common Development and Distribution License (CDDL) v1.0 (https://glassfish.dev.java.net/public/CDDLv1.0.html)
+
+This product includes the HSQL Database (HSQLDB) 1.8.0.10 jar: http://hsqldb.org/
+License: http://hsqldb.org/web/hsqlLicense.html
+
+
+=========================================================================
+==  Apache Lucene Notice                                               ==
+=========================================================================
+The snowball stemmers in
+  contrib/snowball/src/java/net/sf/snowball
+were developed by Martin Porter and Richard Boulton.
+The full snowball package is available from
+  http://snowball.tartarus.org/
+---
+
+This product includes/uses software, Woodstox (http://woodstox.codehaus.org),
+developed by Codehaus  (http://www.codehaus.org/)
+License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
+=========================================================================
+==  Woodstox Notice                                                    ==
+=========================================================================
+This product currently only contains code developed by authors
+of specific components, as identified by the source code files.
+
+Since product implements StAX API, it has dependencies to StAX API
+classes.
+
+For additional credits (generally to people who reported problems)
+see CREDITS file.
+---
+
+This product includes software developed by Mort Bay Consulting
+(specifically, Jetty 6.1.3, the bundled servlet container in example)
+The jboss integration module is not included.
+=========================================================================
+==     Jetty Notice                                                    ==
+=========================================================================
+==============================================================
+ Jetty Web Container 
+ Copyright 1995-2006 Mort Bay Consulting Pty Ltd
+==============================================================
+
+This product includes some software developed at The Apache Software 
+Foundation (http://www.apache.org/).
+
+The javax.servlet package used by Jetty is copyright 
+Sun Microsystems, Inc and Apache Software Foundation. It is 
+distributed under the Common Development and Distribution License.
+You can obtain a copy of the license at 
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+
+The UnixCrypt.java code ~Implements the one way cryptography used by
+Unix systems for simple password protection.  Copyright 1996 Aki Yoshida,
+modified April 2001  by Iris Van den Broeke, Daniel Deville.
+
+The default JSP implementation is provided by the Glassfish JSP engine
+from project Glassfish http://glassfish.dev.java.net.  Copyright 2005
+Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.
+
+Some portions of the code are Copyright:
+  2006 Tim Vernum 
+  1999 Jason Gilbert.
+
+The jboss integration module contains some LGPL code.
+
+=========================================================================
+==  SLF4J Notice -- http://www.slf4j.org/license.html                  ==
+=========================================================================
+
+Copyright (c) 2004-2008 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free  of charge, to any person obtaining
+a  copy  of this  software  and  associated  documentation files  (the
+"Software"), to  deal in  the Software without  restriction, including
+without limitation  the rights to  use, copy, modify,  merge, publish,
+distribute,  sublicense, and/or sell  copies of  the Software,  and to
+permit persons to whom the Software  is furnished to do so, subject to
+the following conditions:
+
+The  above  copyright  notice  and  this permission  notice  shall  be
+included in all copies or substantial portions of the Software.
+
+THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=========================================================================
+==  Apache Tika Notices                                                ==
+=========================================================================
+
+The following notices apply to the Apache Tika libraries in contrib/extraction/lib:
+
+This product includes software developed by the following copyright owners:
+
+Copyright (c) 2000-2006 The Legion Of The Bouncy Castle
+(http://www.bouncycastle.org)
+
+Copyright (c) 2003-2005, www.pdfbox.org
+
+Copyright (c) 2003-2005, www.fontbox.org
+
+Copyright (c) 1995-2005 International Business Machines Corporation and others
+
+Copyright (c) 2000-2005 INRIA, France Telecom
+ 
+
+=========================================================================
+==     Carrot2 Notice                                                  ==
+=========================================================================
+Copyright (C) 2002-2008, Dawid Weiss, Stanislaw Osinski.
+Portions (C) Contributors listed in "carrot2.CONTRIBUTORS" file.
+All rights reserved.
+
+This product includes software developed by the Carrot2 Project.
+
+See http://project.carrot2.org/
+
+=========================================================================
+==     EHCache Notice                                                  ==
+=========================================================================
+Copyright 2003-2008 Luck Consulting Pty Ltd
+
+This product includes software developed by the EHCache Project
+
+See ????
+
+=========================================================================
+==     Google Collections Notice                                       ==
+=========================================================================
+
+Copyright ???? Google, Inc.
+
+This product includes software developed by the Google Collections project.
+
+See ????
+
+=========================================================================
+==     Jackson Notice                                                  ==
+=========================================================================
+Copyright ????
+
+This product includes software developed by the Jackson project.
+
+See ????
+
+=========================================================================
+==     HSQLDB Notice                                                   ==
+=========================================================================
+
+For content, code, and products originally developed by Thomas Mueller and the Hypersonic SQL Group:
+
+Copyright (c) 1995-2000 by the Hypersonic SQL Group.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of the Hypersonic SQL Group nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE HYPERSONIC SQL GROUP,
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This software consists of voluntary contributions made by many individuals on behalf of the
+Hypersonic SQL Group.
+
+For work added by the HSQL Development Group (a.k.a. hsqldb_lic.txt):
+
+Copyright (c) 2001-2005, The HSQL Development Group
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of the HSQL Development Group nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/context.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/context.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/META-INF/context.xml	(revision 2882)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<!-- Solr server context file
+
+path : solr server context path. If u is the url of the web server, the solr
+server will be reachable at u/path
+
+solr/home : the top level directory which is created on unpacking the solr 
+server war file. The solr server will store it's data in the tree starting at 
+this directory.
+
+Please refer to http://wiki.apache.org/solr for more information on how the 
+solr server should be configured.  
+
+-->
+
+
+
+<Context path="/vlo_solr" debug="0" crossContext="true">
+  <Environment name="solr/home" 
+               type="java.lang.String" 
+               value="${vlo.solr.home}/${vlo.solr.conf}" 
+               override="true"/>
+</Context>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/web.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/web.xml	(revision 2882)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<web-app>
+
+  <!-- Uncomment if you are trying to use a Resin version before 3.0.19.
+    Their XML implementation isn't entirely compatible with Xerces.
+    Below are the implementations to use with Sun's JVM.
+  <system-property javax.xml.xpath.XPathFactory=
+             "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
+  <system-property javax.xml.parsers.DocumentBuilderFactory=
+             "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
+  <system-property javax.xml.parsers.SAXParserFactory=
+             "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
+   -->
+
+  <!-- People who want to hardcode their "Solr Home" directly into the
+       WAR File can set the JNDI property here...
+   -->
+  <!--
+    <env-entry>
+       <env-entry-name>solr/home</env-entry-name>
+       <env-entry-value>/put/your/solr/home/here</env-entry-value>
+       <env-entry-type>java.lang.String</env-entry-type>
+    </env-entry>
+   -->
+   
+  <!-- Any path (name) registered in solrconfig.xml will be sent to that filter -->
+  <filter>
+    <filter-name>SolrRequestFilter</filter-name>
+    <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
+    <!-- If you are wiring Solr into a larger web application which controls
+         the web context root, you will probably want to mount Solr under
+         a path prefix (app.war with /app/solr mounted into it, for example).
+         You will need to put this prefix in front of the SolrDispatchFilter
+         url-pattern mapping too (/solr/*), and also on any paths for
+         legacy Solr servlet mappings you may be using.
+         For the admin JSP's to work properly in a path-prefixed configuration,
+         the admin folder containing the JSPs needs to be under the app context root
+         named to match the path-prefix.  For example:
+
+            .war
+               xxx
+                 admin
+                   stats.jsp
+    -->
+    <!--
+    <init-param>
+      <param-name>path-prefix</param-name>
+      <param-value>/xxx</param-value>
+    </init-param>
+    -->
+  </filter>
+
+  <filter-mapping>
+    <!--
+      NOTE: When using multicore, /admin JSP URLs with a core specified
+      such as /solr/coreName/admin/stats.jsp get forwarded by a
+      RequestDispatcher to /solr/admin/stats.jsp with the specified core
+      put into request scope keyed as "org.apache.solr.SolrCore".
+
+      It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
+      configured to also filter on forwards.  Do not configure
+      this dispatcher as <dispatcher>FORWARD</dispatcher>.
+    -->
+    <filter-name>SolrRequestFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <!-- Otherwise it will continue to the old servlets -->
+  
+  <servlet>
+    <servlet-name>SolrServer</servlet-name>
+    <display-name>Solr</display-name>
+    <description>Solr Server</description>
+    <servlet-class>org.apache.solr.servlet.SolrServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+
+  <servlet>
+    <servlet-name>SolrUpdate</servlet-name>
+    <display-name>SolrUpdate</display-name>
+    <description>Solr Update Handler</description>
+    <servlet-class>org.apache.solr.servlet.SolrUpdateServlet</servlet-class>
+    <load-on-startup>2</load-on-startup>
+  </servlet>
+
+  <servlet>
+    <servlet-name>Logging</servlet-name>
+    <servlet-class>org.apache.solr.servlet.LogLevelSelection</servlet-class>
+  </servlet>
+
+  <!-- @Deprecated -->
+  <servlet>
+    <servlet-name>ping</servlet-name>
+    <jsp-file>/admin/ping.jsp</jsp-file>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>SolrServer</servlet-name>
+    <url-pattern>/select/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>SolrUpdate</servlet-name>
+    <url-pattern>/update/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
+    <servlet-name>Logging</servlet-name>
+    <url-pattern>/admin/logging</url-pattern>
+  </servlet-mapping>
+
+  <!-- @Deprecated -->
+  <servlet-mapping>
+    <servlet-name>ping</servlet-name>
+    <url-pattern>/admin/ping</url-pattern>
+  </servlet-mapping>
+
+  <!-- @Deprecated -->
+  <servlet-mapping>
+    <servlet-name>Logging</servlet-name>
+    <url-pattern>/admin/logging.jsp</url-pattern>
+  </servlet-mapping>
+  
+  <mime-mapping>
+    <extension>.xsl</extension>
+    <!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
+    <mime-type>application/xslt+xml</mime-type>
+  </mime-mapping>
+
+</web-app>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/weblogic.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/weblogic.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/WEB-INF/weblogic.xml	(revision 2882)
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<weblogic-web-app
+    xmlns="http://www.bea.com/ns/weblogic/90"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
+
+    <container-descriptor>
+	<filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
+    </container-descriptor>
+
+</weblogic-web-app>
+
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/_info.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/_info.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/_info.jsp	(revision 2882)
@@ -0,0 +1,118 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrConfig,
+                 org.apache.solr.core.SolrCore,
+                 org.apache.solr.schema.IndexSchema,
+                 java.io.File"%>
+<%@ page import="java.net.InetAddress"%>
+<%@ page import="java.io.StringWriter"%>
+<%@ page import="org.apache.solr.core.Config"%>
+<%@ page import="org.apache.solr.common.util.XML"%>
+<%@ page import="org.apache.solr.common.SolrException"%>
+<%@ page import="org.apache.lucene.LucenePackage"%>
+<%@ page import="java.net.UnknownHostException" %>
+
+<%!
+  // only try to figure out the hostname once in a static block so 
+  // we don't have a potentially slow DNS lookup on every admin request
+  static InetAddress addr = null;
+  static String hostname = "unknown";
+  static {
+    try {
+      addr = InetAddress.getLocalHost();
+      hostname = addr.getCanonicalHostName();
+    } catch (UnknownHostException e) {
+      //default to unknown
+    }
+  }
+%>
+
+<%
+  // 
+  SolrCore  core = (SolrCore) request.getAttribute("org.apache.solr.SolrCore");
+  if (core == null) {
+    response.sendError( 404, "missing core name in path" );
+    return;
+  }
+    
+  SolrConfig solrConfig = core.getSolrConfig();
+  int port = request.getServerPort();
+  IndexSchema schema = core.getSchema();
+
+  // enabled/disabled is purely from the point of a load-balancer
+  // and has no effect on local server function.  If there is no healthcheck
+  // configured, don't put any status on the admin pages.
+  String enabledStatus = null;
+  String enabledFile = solrConfig.get("admin/healthcheck/text()",null);
+  boolean isEnabled = false;
+  if (enabledFile!=null) {
+    isEnabled = new File(enabledFile).exists();
+  }
+
+  String collectionName = schema!=null ? schema.getName():"unknown";
+
+  String defaultSearch = "";
+  { 
+    StringWriter tmp = new StringWriter();
+    XML.escapeCharData
+      (solrConfig.get("admin/defaultQuery/text()", ""), tmp);
+    defaultSearch = tmp.toString();
+  }
+
+  String solrImplVersion = "";
+  String solrSpecVersion = "";
+  String luceneImplVersion = "";
+  String luceneSpecVersion = "";
+
+  { 
+    Package p;
+    StringWriter tmp;
+
+    p = SolrCore.class.getPackage();
+
+    tmp = new StringWriter();
+    solrImplVersion = p.getImplementationVersion();
+    if (null != solrImplVersion) {
+      XML.escapeCharData(solrImplVersion, tmp);
+      solrImplVersion = tmp.toString();
+    }
+    tmp = new StringWriter();
+    solrSpecVersion = p.getSpecificationVersion() ;
+    if (null != solrSpecVersion) {
+      XML.escapeCharData(solrSpecVersion, tmp);
+      solrSpecVersion = tmp.toString();
+    }
+  
+    p = LucenePackage.class.getPackage();
+
+    tmp = new StringWriter();
+    luceneImplVersion = p.getImplementationVersion();
+    if (null != luceneImplVersion) {
+      XML.escapeCharData(luceneImplVersion, tmp);
+      luceneImplVersion = tmp.toString();
+    }
+    tmp = new StringWriter();
+    luceneSpecVersion = p.getSpecificationVersion() ;
+    if (null != luceneSpecVersion) {
+      XML.escapeCharData(luceneSpecVersion, tmp);
+      luceneSpecVersion = tmp.toString();
+    }
+  }
+  
+  String cwd=System.getProperty("user.dir");
+  String solrHome= solrConfig.getInstanceDir();
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/action.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/action.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/action.jsp	(revision 2882)
@@ -0,0 +1,94 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.common.util.XML"%>
+<%@ page import="org.apache.solr.core.SolrCore,
+                 org.apache.solr.schema.IndexSchema,
+                 java.io.File,
+                 java.net.InetAddress,
+                 java.net.UnknownHostException"%>
+<%@ page import="java.util.Date"%>
+<%@include file="header.jsp" %>
+<%
+
+  String action = request.getParameter("action");
+  String enableActionStatus = "";
+  boolean isValid = false;
+
+  if (action != null) {
+    // Validate fname
+    if ("Enable".compareTo(action) == 0) isValid = true;
+    if ("Disable".compareTo(action) == 0) isValid = true;
+  }
+  if (isValid) {
+    if ("Enable".compareTo(action) == 0) {
+      try {
+        File enableFile = new File(enabledFile);
+        if (enableFile.createNewFile()) {
+          enableActionStatus += "Enable Succeeded (enable file ";
+          enableActionStatus += enabledFile;
+          enableActionStatus += " created)";
+        } else {
+          enableActionStatus += "Already Enabled";
+        }
+      } catch(Exception e) {
+          enableActionStatus += "Enable Failed: " + e.toString();
+      }
+    }
+    if ("Disable".compareTo(action) == 0) {
+      try {
+        File enableFile = new File(enabledFile);
+        if (enableFile.delete()) {
+          enableActionStatus = "Disable Succeeded (enable file ";
+          enableActionStatus += enabledFile;
+          enableActionStatus += " removed)";
+        } else {
+          enableActionStatus = "Already Disabled";
+        }
+      } catch(Exception e) {
+          enableActionStatus += "Disable Failed: " + e.toString();
+      }
+    }
+  } else {
+    enableActionStatus = "Illegal Action";
+  }
+  // :TODO: might want to rework this so any logging change happens *after*
+  SolrCore.log.info(enableActionStatus);
+%>
+<br clear="all">
+<table>
+  <tr>
+    <td>
+      <H3>Action:</H3>
+    </td>
+    <td>
+      <% XML.escapeCharData(action, out); %><br>
+    </td>
+  </tr>
+  <tr>
+    <td>
+      <H4>Result:</H4>
+    </td>
+    <td>
+      <% XML.escapeCharData(enableActionStatus, out); %><br>
+    </td>
+  </tr>
+</table>
+<br><br>
+    <a href=".">Return to Admin Page</a>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.jsp	(revision 2882)
@@ -0,0 +1,498 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.lucene.analysis.Analyzer,
+                 org.apache.lucene.analysis.Token,
+                 org.apache.lucene.analysis.TokenStream,
+                 org.apache.lucene.index.Payload,
+                 org.apache.lucene.analysis.CharReader,
+                 org.apache.lucene.analysis.CharStream,
+                 org.apache.solr.analysis.CharFilterFactory,
+                 org.apache.solr.analysis.TokenFilterFactory,
+                 org.apache.solr.analysis.TokenizerChain,
+                 org.apache.solr.analysis.TokenizerFactory,
+                 org.apache.solr.schema.FieldType,
+                 org.apache.solr.schema.SchemaField,
+                 org.apache.solr.common.util.XML,
+                 javax.servlet.jsp.JspWriter,java.io.IOException
+                "%>
+<%@ page import="java.io.Reader"%>
+<%@ page import="java.io.StringReader"%>
+<%@ page import="java.util.*"%>
+<%@ page import="java.math.BigInteger" %>
+
+<%-- $Id: analysis.jsp 824045 2009-10-11 10:04:01Z koji $ --%>
+<%-- $Source: /cvs/main/searching/org.apache.solrolarServer/resources/admin/analysis.jsp,v $ --%>
+<%-- $Name:  $ --%>
+
+<%@include file="header.jsp" %>
+
+<%
+  // is name a field name or a type name?
+  String nt = request.getParameter("nt");
+  if (nt==null || nt.length()==0) nt="name"; // assume field name
+  nt = nt.toLowerCase().trim();
+  String name = request.getParameter("name");
+  if (name==null || name.length()==0) name="";
+  String val = request.getParameter("val");
+  if (val==null || val.length()==0) val="";
+  String qval = request.getParameter("qval");
+  if (qval==null || qval.length()==0) qval="";
+  String verboseS = request.getParameter("verbose");
+  boolean verbose = verboseS!=null && verboseS.equalsIgnoreCase("on");
+  String qverboseS = request.getParameter("qverbose");
+  boolean qverbose = qverboseS!=null && qverboseS.equalsIgnoreCase("on");
+  String highlightS = request.getParameter("highlight");
+  boolean highlight = highlightS!=null && highlightS.equalsIgnoreCase("on");
+%>
+
+<br clear="all">
+
+<h2>Field Analysis</h2>
+
+<form method="POST" action="analysis.jsp" accept-charset="UTF-8">
+<table>
+<tr>
+  <td>
+	<strong>Field
+          <select name="nt">
+	  <option <%= nt.equals("name") ? "selected=\"selected\"" : "" %> >name</option>
+	  <option <%= nt.equals("type") ? "selected=\"selected\"" : "" %>>type</option>
+          </select></strong>
+  </td>
+  <td>
+	<input class="std" name="name" type="text" value="<% XML.escapeCharData(name, out); %>">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Field value (Index)</strong>
+  <br/>
+  verbose output
+  <input name="verbose" type="checkbox"
+     <%= verbose ? "checked=\"true\"" : "" %> >
+    <br/>
+  highlight matches
+  <input name="highlight" type="checkbox"
+     <%= highlight ? "checked=\"true\"" : "" %> >
+  </td>
+  <td>
+	<textarea class="std" rows="8" cols="70" name="val"><% XML.escapeCharData(val,out); %></textarea>
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Field value (Query)</strong>
+  <br/>
+  verbose output
+  <input name="qverbose" type="checkbox"
+     <%= qverbose ? "checked=\"true\"" : "" %> >
+  </td>
+  <td>
+	<textarea class="std" rows="1" cols="70" name="qval"><% XML.escapeCharData(qval,out); %></textarea>
+  </td>
+</tr>
+<tr>
+
+  <td>
+  </td>
+
+  <td>
+	<input class="stdbutton" type="submit" value="analyze">
+  </td>
+
+</tr>
+</table>
+</form>
+
+
+<%
+  SchemaField field=null;
+
+  if (name!="") {
+    if (nt.equals("name")) {
+      try {
+        field = schema.getField(name);
+      } catch (Exception e) {
+        out.print("<strong>Unknown Field: ");
+        XML.escapeCharData(name, out);
+        out.println("</strong>");
+      }
+    } else {
+       FieldType t = schema.getFieldTypes().get(name);
+       if (null == t) {
+        out.print("<strong>Unknown Field Type: ");
+        XML.escapeCharData(name, out);
+        out.println("</strong>");
+       } else {
+         field = new SchemaField("fakefieldoftype:"+name, t);
+       }
+    }
+  }
+
+  if (field!=null) {
+    HashSet<Tok> matches = null;
+    if (qval!="" && highlight) {
+      Reader reader = new StringReader(qval);
+      Analyzer analyzer =  field.getType().getQueryAnalyzer();
+      TokenStream tstream = analyzer.reusableTokenStream(field.getName(),reader);
+      tstream.reset();
+      List<Token> tokens = getTokens(tstream);
+      matches = new HashSet<Tok>();
+      for (Token t : tokens) { matches.add( new Tok(t,0)); }
+    }
+
+    if (val!="") {
+      out.println("<h3>Index Analyzer</h3>");
+      doAnalyzer(out, field, val, false, verbose,matches);
+    }
+    if (qval!="") {
+      out.println("<h3>Query Analyzer</h3>");
+      doAnalyzer(out, field, qval, true, qverbose,null);
+    }
+  }
+
+%>
+
+
+</body>
+</html>
+
+
+<%!
+  private static void doAnalyzer(JspWriter out, SchemaField field, String val, boolean queryAnalyser, boolean verbose, Set<Tok> match) throws Exception {
+
+    FieldType ft = field.getType();
+     Analyzer analyzer = queryAnalyser ?
+             ft.getQueryAnalyzer() : ft.getAnalyzer();
+     if (analyzer instanceof TokenizerChain) {
+       TokenizerChain tchain = (TokenizerChain)analyzer;
+       CharFilterFactory[] cfiltfacs = tchain.getCharFilterFactories();
+       TokenizerFactory tfac = tchain.getTokenizerFactory();
+       TokenFilterFactory[] filtfacs = tchain.getTokenFilterFactories();
+
+       if( cfiltfacs != null ){
+         String source = val;
+         for(CharFilterFactory cfiltfac : cfiltfacs ){
+           CharStream reader = CharReader.get(new StringReader(source));
+           reader = cfiltfac.create(reader);
+           if(verbose){
+             writeHeader(out, cfiltfac.getClass(), cfiltfac.getArgs());
+             source = writeCharStream(out, reader);
+           }
+         }
+       }
+
+       TokenStream tstream = tfac.create(tchain.charStream(new StringReader(val)));
+       List<Token> tokens = getTokens(tstream);
+       if (verbose) {
+         writeHeader(out, tfac.getClass(), tfac.getArgs());
+       }
+
+       writeTokens(out, tokens, ft, verbose, match);
+
+       for (TokenFilterFactory filtfac : filtfacs) {
+         if (verbose) {
+           writeHeader(out, filtfac.getClass(), filtfac.getArgs());
+         }
+
+         final Iterator<Token> iter = tokens.iterator();
+         tstream = filtfac.create( new TokenStream() {
+           public Token next() throws IOException {
+             return iter.hasNext() ? iter.next() : null;
+           }
+          }
+         );
+         tokens = getTokens(tstream);
+
+         writeTokens(out, tokens, ft, verbose, match);
+       }
+
+     } else {
+       TokenStream tstream = analyzer.reusableTokenStream(field.getName(),new StringReader(val));
+       tstream.reset();
+       List<Token> tokens = getTokens(tstream);
+       if (verbose) {
+         writeHeader(out, analyzer.getClass(), new HashMap<String,String>());
+       }
+       writeTokens(out, tokens, ft, verbose, match);
+     }
+  }
+
+
+  static List<Token> getTokens(TokenStream tstream) throws IOException {
+    List<Token> tokens = new ArrayList<Token>();
+    while (true) {
+      Token t = tstream.next();
+      if (t==null) break;
+      tokens.add(t);
+    }
+    return tokens;
+  }
+
+
+  private static class Tok {
+    Token token;
+    int pos;
+    Tok(Token token, int pos) {
+      this.token=token;
+      this.pos=pos;
+    }
+
+    public boolean equals(Object o) {
+      return ((Tok)o).token.termText().equals(token.termText());
+    }
+    public int hashCode() {
+      return token.termText().hashCode();
+    }
+    public String toString() {
+      return token.termText();
+    }
+  }
+
+  private static interface ToStr {
+    public String toStr(Object o);
+  }
+
+  private static void printRow(JspWriter out, String header, List[] arrLst, ToStr converter, boolean multival, boolean verbose, Set<Tok> match) throws IOException {
+    // find the maximum number of terms for any position
+    int maxSz=1;
+    if (multival) {
+      for (List lst : arrLst) {
+        maxSz = Math.max(lst.size(), maxSz);
+      }
+    }
+
+
+    for (int idx=0; idx<maxSz; idx++) {
+      out.println("<tr>");
+      if (idx==0 && verbose) {
+        if (header != null) {
+          out.print("<th NOWRAP rowspan=\""+maxSz+"\">");
+          XML.escapeCharData(header,out);
+          out.println("</th>");
+        }
+      }
+
+      for (int posIndex=0; posIndex<arrLst.length; posIndex++) {
+        List<Tok> lst = arrLst[posIndex];
+        if (lst.size() <= idx) continue;
+        if (match!=null && match.contains(lst.get(idx))) {
+          out.print("<td class=\"highlight\"");
+        } else {
+          out.print("<td class=\"debugdata\"");
+        }
+
+        // if the last value in the column, use up
+        // the rest of the space via rowspan.
+        if (lst.size() == idx+1 && lst.size() < maxSz) {
+          out.print("rowspan=\""+(maxSz-lst.size()+1)+'"');
+        }
+
+        out.print('>');
+
+        XML.escapeCharData(converter.toStr(lst.get(idx)), out);
+        out.print("</td>");
+      }
+
+      out.println("</tr>");
+    }
+
+  }
+
+  static String isPayloadString( Payload p ) {
+  	String sp = new String( p.getData() );
+	for( int i=0; i < sp.length(); i++ ) {
+	if( !Character.isDefined( sp.charAt(i) ) || Character.isISOControl( sp.charAt(i) ) )
+	  return "";
+	}
+	return "(" + sp + ")";
+  }
+
+  static void writeHeader(JspWriter out, Class clazz, Map<String,String> args) throws IOException {
+    out.print("<h4>");
+    out.print(clazz.getName());
+    XML.escapeCharData("   "+args,out);
+    out.println("</h4>");
+  }
+
+
+
+  // readable, raw, pos, type, start/end
+  static void writeTokens(JspWriter out, List<Token> tokens, final FieldType ft, boolean verbose, Set<Tok> match) throws IOException {
+
+    // Use a map to tell what tokens are in what positions
+    // because some tokenizers/filters may do funky stuff with
+    // very large increments, or negative increments.
+    HashMap<Integer,List<Tok>> map = new HashMap<Integer,List<Tok>>();
+    boolean needRaw=false;
+    int pos=0;
+    for (Token t : tokens) {
+      if (!t.termText().equals(ft.indexedToReadable(t.termText()))) {
+        needRaw=true;
+      }
+
+      pos += t.getPositionIncrement();
+      List lst = map.get(pos);
+      if (lst==null) {
+        lst = new ArrayList(1);
+        map.put(pos,lst);
+      }
+      Tok tok = new Tok(t,pos);
+      lst.add(tok);
+    }
+
+    List<Tok>[] arr = (List<Tok>[])map.values().toArray(new ArrayList[map.size()]);
+
+    /* Jetty 6.1.3 miscompiles this generics version...
+    Arrays.sort(arr, new Comparator<List<Tok>>() {
+      public int compare(List<Tok> toks, List<Tok> toks1) {
+        return toks.get(0).pos - toks1.get(0).pos;
+      }
+    }
+    */
+
+    Arrays.sort(arr, new Comparator() {
+      public int compare(Object toks, Object toks1) {
+        return ((List<Tok>)toks).get(0).pos - ((List<Tok>)toks1).get(0).pos;
+      }
+    }
+
+
+    );
+
+    out.println("<table width=\"auto\" class=\"analysis\" border=\"1\">");
+
+    if (verbose) {
+      printRow(out,"term position", arr, new ToStr() {
+        public String toStr(Object o) {
+          return Integer.toString(((Tok)o).pos);
+        }
+      }
+              ,false
+              ,verbose
+              ,null);
+    }
+
+
+    printRow(out,"term text", arr, new ToStr() {
+      public String toStr(Object o) {
+        return ft.indexedToReadable( ((Tok)o).token.termText() );
+      }
+    }
+            ,true
+            ,verbose
+            ,match
+   );
+
+    if (needRaw) {
+      printRow(out,"raw text", arr, new ToStr() {
+        public String toStr(Object o) {
+          // page is UTF-8, so anything goes.
+          return ((Tok)o).token.termText();
+        }
+      }
+              ,true
+              ,verbose
+              ,match
+      );
+    }
+
+    if (verbose) {
+      printRow(out,"term type", arr, new ToStr() {
+        public String toStr(Object o) {
+          String tt =  ((Tok)o).token.type();
+          if (tt == null) {
+             return "null";
+          } else {
+             return tt;
+          }
+        }
+      }
+              ,true
+              ,verbose,
+              null
+      );
+    }
+
+    if (verbose) {
+      printRow(out,"source start,end", arr, new ToStr() {
+        public String toStr(Object o) {
+          Token t = ((Tok)o).token;
+          return Integer.toString(t.startOffset()) + ',' + t.endOffset() ;
+        }
+      }
+              ,true
+              ,verbose
+              ,null
+      );
+    }
+
+    if (verbose) {
+      printRow(out,"payload", arr, new ToStr() {
+        public String toStr(Object o) {
+          Token t = ((Tok)o).token;
+          Payload p = t.getPayload();
+          if( null != p ) {
+            BigInteger bi = new BigInteger( p.getData() );
+            String ret = bi.toString( 16 );
+            if (ret.length() % 2 != 0) {
+              // Pad with 0
+              ret = "0"+ret;
+            }
+            ret += isPayloadString( p );
+            return ret;
+          }
+          return "";			
+        }
+      }
+              ,true
+              ,verbose
+              ,null
+      );
+    }
+    
+    out.println("</table>");
+  }
+
+  static String writeCharStream(JspWriter out, CharStream input) throws IOException {
+    out.println("<table width=\"auto\" class=\"analysis\" border=\"1\">");
+    out.println("<tr>");
+
+    out.print("<th NOWRAP>");
+    XML.escapeCharData("text",out);
+    out.println("</th>");
+
+    final int BUFFER_SIZE = 1024;
+    char[] buf = new char[BUFFER_SIZE];
+    int len = 0;
+    StringBuilder sb = new StringBuilder();
+    do {
+      len = input.read( buf, 0, BUFFER_SIZE );
+      if( len > 0 )
+        sb.append(buf, 0, len);
+    } while( len == BUFFER_SIZE );
+    out.print("<td class=\"debugdata\">");
+    XML.escapeCharData(sb.toString(),out);
+    out.println("</td>");
+    
+    out.println("</tr>");
+    out.println("</table>");
+    return sb.toString();
+  }
+
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/analysis.xsl	(revision 2882)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<!-- $URL$ -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output
+    method="html"
+    indent="yes"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+        <link rel="icon" href="favicon.ico" type="image/ico"></link>
+        <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title>SOLR Info</title>
+      </head>
+      <body>
+        <a href="">
+          <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR"/>
+  </a>
+        <h1>Solr Admin (<xsl:value-of select="solr/meta/collection" />)</h1>
+        <div style="margin-top: 1em;">
+          <h2>Field Analysis</h2>
+          <xsl:apply-templates/>
+          <a href=".">Return to Admin Page</a>
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:include href="meta.xsl"/>
+
+  <xsl:template match="solr/analysis/form">
+  <form method="POST" action="analysis.jsp">
+    <table>
+      <tr>
+        <td>
+        <strong>Field name</strong>
+        </td>
+        <td>
+          <input class="std" name="name" type="text" value="{field}"/>
+        </td>
+      </tr>
+      <tr>
+        <td>
+        <strong>Field value (Index)</strong>
+        <br/>
+        verbose output <input name="verbose" type="checkbox" checked="true"/>
+        <br/>
+        highlight matches <input name="highlight" type="checkbox" checked="true"/>
+        </td>
+        <td>
+        <textarea class="std" rows="8" cols="70" name="val"><xsl:value-of select="fieldIndexValue" /></textarea>
+        </td>
+      </tr>
+      <tr>
+        <td>
+        <strong>Field value (Query)</strong>
+        <br/>
+        verbose output <input name="qverbose" type="checkbox" checked="true"/>
+        </td>
+        <td>
+        <textarea class="std" rows="1" cols="70" name="qval"><xsl:value-of select="fieldQueryValue" /></textarea>
+        </td>
+      </tr>
+      <tr>
+        <td>
+        </td>
+        <td>
+          <input class="stdbutton" type="submit" value="analyze"/>
+        </td>
+      </tr>
+    </table>
+  </form>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/indexAnalyzer">
+  <h4>Index Analyzer</h4>
+  <xsl:for-each select="factory">
+    <h5 style="margin-left: 1em;"><xsl:apply-templates select="@class"/></h5>
+    <xsl:apply-templates/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/indexAnalyzer/factory/args">
+  <div style="margin-left: 2em; font-weight: bold;">{
+  <xsl:for-each select="arg">
+    <xsl:apply-templates select="@name"/>=<xsl:value-of select="."/>, 
+  </xsl:for-each>
+  }</div>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/indexAnalyzer/factory/tokens">
+<div style="margin-left: 2em;">
+  <table width="auto" class="analysis" border="1">
+    <tr>
+      <th>text</th>
+      <th>type</th>
+      <th>position</th>
+      <th>start</th>
+      <th>end</th>
+    </tr>
+  <xsl:for-each select="token">
+    <tr>
+      <td><xsl:value-of select="."/></td>
+      <td><xsl:apply-templates select="@type"/></td>
+      <td><xsl:apply-templates select="@pos"/></td>
+      <td><xsl:apply-templates select="@start"/></td>
+      <td><xsl:apply-templates select="@end"/></td>
+    </tr>
+  </xsl:for-each>
+  </table>
+</div>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/queryAnalyzer">
+  <h4>Query Analyzer</h4>
+  <xsl:for-each select="factory">
+    <h5 style="margin-left: 1em;"><xsl:apply-templates select="@class"/></h5>
+    <xsl:apply-templates/>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/queryAnalyzer/factory/args">
+  <div style="margin-left: 2em; font-weight: bold;">{
+  <xsl:for-each select="arg">
+    <xsl:apply-templates select="@name"/>=<xsl:value-of select="."/>, 
+  </xsl:for-each>
+  }</div>
+</xsl:template>
+
+<xsl:template match="solr/analysis/results/queryAnalyzer/factory/tokens">
+<div style="margin-left: 2em;">
+  <table width="auto" class="analysis" border="1">
+    <tr>
+      <th>text</th>
+      <th>type</th>
+      <th>position</th>
+      <th>start</th>
+      <th>end</th>
+    </tr>
+  <xsl:for-each select="token">
+    <tr>
+      <td><xsl:value-of select="."/></td>
+      <td><xsl:apply-templates select="@type"/></td>
+      <td><xsl:apply-templates select="@pos"/></td>
+      <td><xsl:apply-templates select="@start"/></td>
+      <td><xsl:apply-templates select="@end"/></td>
+    </tr>
+  </xsl:for-each>
+  </table>
+</div>
+</xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/dataimport.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/dataimport.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/dataimport.jsp	(revision 2882)
@@ -0,0 +1,54 @@
+<%@ page import="org.apache.solr.request.SolrRequestHandler" %>
+<%@ page import="java.util.Map" %>
+<%@ page import="org.apache.solr.handler.dataimport.DataImportHandler" %>
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%-- do a verbatim include so we can use the local vars --%>
+<%@include file="_info.jsp"%>
+<html>
+<%
+  String handler = request.getParameter("handler");
+
+  if (handler == null) {
+    Map<String, SolrRequestHandler> handlers = core.getRequestHandlers();
+%>
+<head>
+  <title>DataImportHandler Interactive Development</title>
+  <link rel="stylesheet" type="text/css" href="solr-admin.css">
+</head>
+<body>
+Select handler:
+<ul>
+<%
+    for (String key : handlers.keySet()) {
+      if (handlers.get(key) instanceof DataImportHandler) { %>
+  <li><a href="dataimport.jsp?handler=<%=key%>"><%=key%></a></li>
+<%
+      }
+    }
+%>
+</ul>
+</body>
+<% } else { %>
+
+<frameset cols = "50%, 50%">
+  <frame src ="debug.jsp?handler=<%=handler%>" />
+  <frame src ="../select?qt=<%=handler%>&command=status"  name="result"/>
+</frameset>
+<% } %>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/debug.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/debug.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/debug.jsp	(revision 2882)
@@ -0,0 +1,106 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%-- do a verbatim include so we can use the local vars --%>
+<%@include file="_info.jsp"%>
+<html>
+<head>
+<title>DataImportHandler Interactive Development</title>
+<link rel="stylesheet" type="text/css" href="solr-admin.css">
+<link rel="icon" href="favicon.ico" type="image/ico"></link>
+<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+<script src="jquery-1.2.3.min.js"></script>
+</head>
+<body>
+<h1>DataImportHandler Development Console</h1>
+<%
+  String handler = request.getParameter("handler");  // must be specified
+%>
+<form action="../select" target="result" method="get">
+<input type="hidden" name="debug" value="on"/>
+<input type="hidden" name="qt" value="<%=handler%>"/>
+<table>
+  <tr>
+    <th>Handler: </th>
+    <td><%=handler%> <a href="dataimport.jsp" target="_top">change handler</a></td>
+  </tr>
+	<tr>
+		<td colspan="2">
+		<table width="100%">
+			<tr>
+				<td>
+					<select name="command">
+						<option value="full-import" selected="selected">full-import</option>
+						<option value="delta-import">delta-import</option>
+					</select>
+				</td>
+				<td><strong>Verbose</strong>&nbsp;<input
+					name="verbose" type="checkbox"></td>
+				<td><strong>Commit</strong>&nbsp;<input
+					name="commit" type="checkbox"></td>
+				<td><strong>Clean</strong>&nbsp;<input
+					name="clean" type="checkbox"></td>
+				<td><strong>Start Row</strong>&nbsp;<input
+					name="start" size="4" type="text" value="0"></td>
+				<td><strong>No. of Rows</strong>&nbsp;<input name="rows"
+					type="text" size="4" value="10"></td>
+			</tr>
+		</table>
+		</td>
+	<tr>
+		<td><strong>data config xml</strong></td>
+		<td><input class="stdbutton" type="submit" value="debug now">
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2"><textarea id="txtDataConfig" rows="30" cols="80" name="dataConfig"></textarea></td>
+    <script type="text/javascript" language="javascript">
+        $.get("../select?qt=<%=handler%>&command=show-config", function(data){
+            $('#txtDataConfig').attr('value', data);
+        });
+    </script>
+	</tr>
+</table>
+</form>
+<form action="../select" target="result" method="get">
+	<input type="hidden" name="clean" value="false">
+	<input type="hidden" name="commit" value="true">
+  <input type="hidden" name="qt" value="<%=handler%>"/>
+	<input class="stdbutton" type="submit" name="command" value="full-import">
+	<input class="stdbutton" type="submit" name="command" value="delta-import">
+	<input class="stdbutton" type="submit" name="command" value="status">
+	<input class="stdbutton" type="submit" name="command" value="reload-config">
+	<input class="stdbutton" type="submit" name="command" value="abort">
+</form>
+<form action="../select" target="result" method="get">
+	<input type="hidden" name="q" value="*:*">
+	<input type="hidden" name="start" value="0">
+	<input type="hidden" name="rows" value="0">
+	<input class="stdbutton" type="submit" value="Documents Count">
+</form>
+<form action="../select" target="result" method="get">
+  <input type="hidden" name="qt" value="<%=handler%>"/>
+	<input type="hidden" name="verbose" value="true">
+	<input type="hidden" name="clean" value="true">
+	<input type="hidden" name="commit" value="true">
+	<input type="hidden" name="command" value="full-import">
+	<input class="stdbutton" type="submit" value="Full Import with Cleaning">
+</form>
+
+<a href="index.jsp" target="_parent">Return to Admin Page</a>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/distributiondump.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/distributiondump.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/distributiondump.jsp	(revision 2882)
@@ -0,0 +1,160 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+
+<%@ page import="org.apache.solr.core.SolrCore,
+                 org.apache.solr.schema.IndexSchema,
+                 java.io.BufferedReader,
+                 java.io.File,
+                 java.io.FilenameFilter,
+                 java.io.FileReader,
+                 java.net.InetAddress,
+                 java.net.UnknownHostException,
+                 java.util.Date"%>
+
+<%@include file="header.jsp" %>
+
+<%
+  File slaveinfo = new File(solrHome + "logs/snappuller.status");
+
+  StringBuffer buffer = new StringBuffer();
+  StringBuffer buffer2 = new StringBuffer();
+  String mode = "";
+
+  if (slaveinfo.canRead()) {
+    // Slave instance
+    mode = "Slave";
+    File slavevers = new File(solrHome + "logs/snapshot.current");
+    BufferedReader inforeader = new BufferedReader(new FileReader(slaveinfo));
+    BufferedReader versreader = new BufferedReader(new FileReader(slavevers));
+    buffer.append("<tr>\n" +
+                    "<td>\n" +
+                      "Version:" +
+                    "</td>\n" +
+                    "<td>\n")
+          .append(    versreader.readLine())
+          .append(  "<td>\n" +
+                    "</td>\n" +
+                  "</tr>\n" +
+                  "<tr>\n" +
+                    "<td>\n" +
+                      "Status:" +
+                    "</td>\n" +
+                    "<td>\n")
+          .append(    inforeader.readLine())
+          .append(  "</td>\n" +
+                  "</tr>\n");
+  } else {
+    // Master instance
+    mode = "Master";
+    File masterdir = new File(solrHome + "logs/clients");
+    FilenameFilter sfilter = new FilenameFilter() {
+        public boolean accept(File dir, String name) {
+            return name.startsWith("snapshot.status");
+        }
+    };
+    FilenameFilter cfilter = new FilenameFilter() {
+        public boolean accept(File dir, String name) {
+            return name.startsWith("snapshot.current");
+        }
+    };
+    File[] clients = masterdir.listFiles(cfilter);
+    if (clients == null) {
+      buffer.append("<tr>\n" +
+                      "<td>\n" +
+                      "</td>\n" +
+                      "<td>\n" +
+                        "No distribution info present" +
+                      "</td>\n" +
+                    "</tr>\n");
+    } else {
+      buffer.append("<h4>Client Snapshot In Use:</h4>\n" +
+                    "<tr>\n" +
+                      "<th>\n" +
+                      "Client" +
+                      "</th>\n" +
+                      "<th>\n" +
+                      "Version" +
+                      "</th>\n" +
+                    "</tr>\n");
+      int i = 0;
+      while (i < clients.length) {
+        String fileName=clients[i].toString();
+        int p=fileName.indexOf("snapshot.current");
+        String clientName=fileName.substring(p+17);
+        BufferedReader reader = new BufferedReader(new FileReader(clients[i]));
+        buffer.append("<tr>\n" +
+                        "<td>\n" +
+                        clientName +
+                        "</td>\n" +
+                        "<td>\n")
+              .append(    reader.readLine())
+              .append(  "</td>\n" +
+                      "</tr>\n" +
+                      "<tr>\n" +
+                      "</tr>\n");
+        i++;
+      }
+      clients = masterdir.listFiles(sfilter);
+      if (clients!=null) {
+        buffer.append("</table>\n" +
+                      "<h4>Client Snapshot Distribution Status:</h4>\n" +
+                      "<table>\n" +
+                      "<tr>\n" +
+                        "<th>\n" +
+                        "Client" +
+                        "</th>\n" +
+                        "<th>\n" +
+                        "Status" +
+                        "</th>\n" +
+                      "</tr>\n");
+        i = 0;
+        while (i < clients.length) {
+          String fileName=clients[i].toString();
+          int p=fileName.indexOf("snapshot.status");
+          String clientName=fileName.substring(p+16);
+          BufferedReader reader = new BufferedReader(new FileReader(clients[i]));
+          buffer.append("<tr>\n" +
+                          "<td>\n" +
+                          clientName +
+                          "</td>\n" +
+                          "<td>\n")
+                .append(    reader.readLine())
+                .append(  "</td>\n" +
+                        "</tr>\n" +
+                        "<tr>\n" +
+                        "</tr>\n");
+          i++;
+        }
+      }
+    }
+  }
+%>
+
+
+<br clear="all">
+<h2>Distribution Info: <%= mode %> Server</h2>
+<br clear="all" />
+(<a href="http://wiki.apache.org/solr/CollectionDistribution">What Is This Page?</a>)
+<br clear="all" />
+<table>
+<%= buffer %>
+</table>
+<br><br>
+    <a href=".">Return to Admin Page</a>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/form.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/form.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/form.jsp	(revision 2882)
@@ -0,0 +1,137 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@include file="header.jsp" %>
+
+<br clear="all">
+<form name="queryForm" method="GET" action="../select" accept-charset="UTF-8">
+<!-- these are good defaults to have if people bookmark the resulting
+     URLs, but they should not show up in the form since they are very
+     output type specific.
+  -->
+<input name="indent" type="hidden" value="on">
+<input name="version" type="hidden" value="2.2">
+
+<table>
+<tr>
+  <td>
+	<strong>Solr/Lucene Statement</strong>
+  </td>
+  <td>
+	<textarea rows="5" cols="60" name="q"><%= defaultSearch %></textarea>
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Filter Query</strong>
+  </td>
+  <td>
+	<textarea rows="2" cols="60" name="fq"></textarea>
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Start Row</strong>
+  </td>
+  <td>
+	<input name="start" type="text" value="0">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Maximum Rows Returned</strong>
+  </td>
+  <td>
+	<input name="rows" type="text" value="10">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Fields to Return</strong>
+  </td>
+  <td>
+	<input name="fl" type="text" value="*,score">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Query Type</strong>
+  </td>
+  <td>
+	<input name="qt" type="text" value="standard">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Output Type</strong>
+  </td>
+  <td>
+	<input name="wt" type="text" value="standard">
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Debug: enable</strong>
+  </td>
+  <td>
+	<input name="debugQuery" type="checkbox" >
+  <em><font size="-1">  Note: you may need to "view source" in your browser to see explain() correctly indented.</font></em>
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Debug: explain others</strong>
+  </td>
+  <td>
+	<input name="explainOther" type="text" >
+  <em><font size="-1">  Apply original query scoring to matches of this query to see how they compare.</font></em>
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Enable Highlighting</strong>
+  </td>
+  <td>
+	<input name="hl" type="checkbox" >
+  </td>
+</tr>
+<tr>
+  <td>
+	<strong>Fields to Highlight</strong>
+  </td>
+  <td>
+	<input name="hl.fl" type="text" >
+  </td>
+</tr>
+<tr>
+  <td>
+  </td>
+  <td>
+    <input class="stdbutton" type="submit" value="search" onclick="if (queryForm.q.value.length==0) { alert('no empty queries, please'); return false; } else { queryForm.submit(); } ">
+  </td>
+</tr>
+</table>
+</form>
+<br clear="all">
+<em>
+This form demonstrates the most common query options available for the
+built in Query Types.  Please consult the Solr Wiki for additional
+Query Parameters.
+</em>
+
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-file.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-file.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-file.jsp	(revision 2882)
@@ -0,0 +1,72 @@
+<%@ page contentType="text/plain; charset=utf-8" pageEncoding="UTF-8" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.Config,
+                 org.apache.solr.core.SolrCore,
+                 org.apache.solr.core.SolrConfig,
+                 java.io.InputStream,
+                 java.io.InputStreamReader,
+                 java.io.Reader,
+                 java.util.StringTokenizer,
+                 java.util.logging.Logger"%>
+<%!
+  static Logger log = Logger.getLogger(SolrCore.class.getName());
+%>
+<%
+  // NOTE -- this file will be removed in a future release
+  log.warning("Using deprecated JSP: " + request.getRequestURL().append("?").append(request.getQueryString()) + " -- check the ShowFileRequestHandler"  );
+
+  Object ocore = request.getAttribute("org.apache.solr.SolrCore");
+  SolrCore core = ocore instanceof SolrCore? (SolrCore) ocore : SolrCore.getSolrCore();
+  String fname = request.getParameter("file");
+  String optional = request.getParameter("optional");
+  String gettableFiles = core.getSolrConfig().get("admin/gettableFiles","");
+  StringTokenizer st = new StringTokenizer(gettableFiles);
+  InputStream is;
+  boolean isValid = false;
+  boolean isOptional = false;
+  if (fname != null) {
+    // Validate fname
+    while(st.hasMoreTokens()) {
+      if (st.nextToken().compareTo(fname) == 0) isValid = true;
+    }
+  }
+  if (optional!=null && optional.equalsIgnoreCase("y")) {
+    isOptional=true;
+  }
+  if (isValid) {
+    try {
+    is= core.getSolrConfig().openResource(fname);
+    Reader input = new InputStreamReader(is);
+    char[] buf = new char[4096];
+    while (true) {
+      int len = input.read(buf);
+      if (len<=0) break;
+      out.write(buf,0,len);
+    }
+    }
+    catch (RuntimeException re) {
+      if (!isOptional) {
+        throw re;
+      }
+    }
+  } else {
+    out.println("<ERROR>");
+    out.println("Permission denied for file "+ fname);
+    out.println("</ERROR>");
+  }
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-properties.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-properties.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/get-properties.jsp	(revision 2882)
@@ -0,0 +1,24 @@
+<%@ page contentType="text/plain;charset=UTF-8" language="java" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%
+  java.util.Enumeration e = System.getProperties().propertyNames();
+  while(e.hasMoreElements()) {
+    String prop = (String)e.nextElement();
+    out.println(prop + " = " + System.getProperty(prop));
+  }
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/header.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/header.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/header.jsp	(revision 2882)
@@ -0,0 +1,41 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<html>
+<head>
+<%
+request.setCharacterEncoding("UTF-8");
+%>
+<%@include file="_info.jsp" %>
+<script>
+var host_name="<%= hostname %>"
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<link rel="stylesheet" type="text/css" href="solr-admin.css">
+<link rel="icon" href="favicon.ico" type="image/ico"></link>
+<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+<title>Solr admin page</title>
+</head>
+
+<body>
+<a href="."><img border="0" align="right" height="78" width="142" src="solr_small.png" alt="Solr"></a>
+<h1>Solr Admin (<%= collectionName %>)
+<%= enabledStatus==null ? "" : (isEnabled ? " - Enabled" : " - Disabled") %> </h1>
+
+<%= hostname %>:<%= port %><br/>
+cwd=<%= cwd %>  SolrHome=<%= solrHome %>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/index.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/index.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/index.jsp	(revision 2882)
@@ -0,0 +1,156 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+
+<%-- $Id: index.jsp 793088 2009-07-10 19:37:30Z hossman $ --%>
+<%-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ --%>
+<%-- $Name:  $ --%>
+
+<%@ page import="java.util.Date" %>
+<%@ page import="java.util.List" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="org.apache.solr.request.SolrRequestHandler"%>
+<%@ page import="org.apache.solr.handler.ReplicationHandler" %>
+
+<%-- jsp:include page="header.jsp"/ --%>
+<%-- do a verbatim include so we can use the local vars --%>
+<%@include file="header.jsp" %>
+<%boolean replicationhandler = !core.getRequestHandlers(ReplicationHandler.class).isEmpty();%>
+<br clear="all">
+<table>
+
+<tr>
+  <td>
+	<h3>Solr</h3>
+  </td>
+  <td>
+    <% if (null != core.getSchemaResource()) { %>
+    [<a href="file/?file=<%=core.getSchemaResource()%>">Schema</a>]
+    <% }
+       if (null != core.getConfigResource()) { %>
+    [<a href="file/?file=<%=core.getConfigResource()%>">Config</a>]
+    <% } %>
+    [<a href="analysis.jsp?highlight=on">Analysis</a>]
+    [<a href="schema.jsp">Schema Browser</a>] <%if(replicationhandler){%>[<a href="replication/index.jsp">Replication</a>]<%}%>
+    <br>
+    [<a href="stats.jsp">Statistics</a>]
+    [<a href="registry.jsp">Info</a>]
+    [<a href="distributiondump.jsp">Distribution</a>]
+    [<a href="ping">Ping</a>]
+    [<a href="logging">Logging</a>]
+  </td>
+</tr>
+
+<%-- List the cores (that arent this one) so we can switch --%>
+<% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
+  if (cores!=null) {
+    Collection<String> names = cores.getCoreNames();
+    if (names.size() > 1) {%><tr><td><strong>Cores:</strong><br></td><td><%
+    for (String name : names) {
+    %>[<a href="../../<%=name%>/admin/"><%=name%></a>]<%         
+  }%></td></tr><%
+}}%>
+
+<tr>
+  <td>
+    <strong>App server:</strong><br>
+  </td>
+  <td>
+    [<a href="get-properties.jsp">Java Properties</a>]
+    [<a href="threaddump.jsp">Thread Dump</a>]
+  <%
+    if (enabledFile!=null)
+    if (isEnabled) {
+  %>
+  [<a href="action.jsp?action=Disable">Disable</a>]
+  <%
+    } else {
+  %>
+  [<a href="action.jsp?action=Enable">Enable</a>]
+  <%
+    }
+  %>
+  </td>
+</tr>
+
+
+<%
+ // a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML
+ out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) );
+%>
+
+</table><P>
+
+
+<table>
+<tr>
+  <td>
+	<h3>Make a Query</h3>
+  </td>
+  <td>
+[<a href="form.jsp">Full Interface</a>]
+  </td>
+  
+</tr>
+<tr>
+  <td>
+  Query String:
+  </td>
+  <td colspan=2>
+	<form name=queryForm method="GET" action="../select/" accept-charset="UTF-8">
+        <textarea class="std" rows="4" cols="40" name="q"><%= defaultSearch %></textarea>
+        <input name="version" type="hidden" value="2.2">
+	<input name="start" type="hidden" value="0">
+	<input name="rows" type="hidden" value="10">
+	<input name="indent" type="hidden" value="on">
+        <br><input class="stdbutton" type="submit" value="search" 
+        	onclick="if (queryForm.q.value.length==0) { alert('no empty queries, please'); return false; } else { queryForm.submit(); } ">
+	</form>
+  </td>
+</tr>
+</table><p>
+
+<table>
+<tr>
+  <td>
+	<h3>Assistance</h3>
+  </td>
+  <td>
+	[<a href="http://lucene.apache.org/solr/">Documentation</a>]
+	[<a href="http://issues.apache.org/jira/browse/SOLR">Issue Tracker</a>]
+	[<a href="mailto:solr-user@lucene.apache.org">Send Email</a>]
+	<br>
+        [<a href="http://wiki.apache.org/solr/SolrQuerySyntax">Solr Query Syntax</a>]
+  </td>
+</tr>
+<tr>
+  <td>
+  </td>
+  <td>
+  Current Time: <%= new Date() %>
+  </td>
+</tr>
+<tr>
+  <td>
+  </td>
+  <td>
+  Server Start At: <%= new Date(core.getStartTime()) %>
+  </td>
+</tr>
+</table>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/jquery-1.2.3.min.js
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/jquery-1.2.3.min.js	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/jquery-1.2.3.min.js	(revision 2882)
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.3 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
+ * $Rev: 4663 $
+ */
+(function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else
+selector=[];}}else
+return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.3",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem)ret=i;});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],name)||undefined;else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return!selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length)data=jQuery.data(this[0],key);return data==null&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==1){target=this;i=0;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){if(target===options[name])continue;if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType)target[name]=jQuery.extend(target[name],options[name]);else if(options[name]!=undefined)target[name]=options[name];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
+script.appendChild(document.createTextNode(data));head.appendChild(script);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object)if(callback.apply(object[name],args)===false)break;}else
+for(var i=0,length=object.length;i<length;i++)if(callback.apply(object[i],args)===false)break;}else{if(object.length==undefined){for(var name in object)if(callback.call(object[name],name,object[name])===false)break;}else
+for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&elem.style&&elem.style[name])ret=elem.style[name];else if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem))ret=getComputedStyle.getPropertyValue(name);else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(var i=0;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem=elem.toString();if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array")for(var i=0,length=array.length;i<length;i++)ret.push(array[i]);else
+ret=array.slice(0);return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]==elem)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
+for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv&&callback(elems[i],i)||inv&&!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!==null&&value!=undefined){if(value.constructor!=Array)value=[value];ret=ret.concat(value);}}return ret;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval!=undefined)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event)data.unshift(this.fix({type:type,target:elem}));data[0].type=type;if(exclusive)data[0].exclusive=true;if(jQuery.isFunction(jQuery.data(elem,"handle")))val=jQuery.data(elem,"handle").apply(elem,data);if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(!elem)return undefined;type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&jQuery.css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})();
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/meta.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/meta.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/meta.xsl	(revision 2882)
@@ -0,0 +1,34 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output
+    method="html"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    indent="yes"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+  <xsl:template match="solr/meta">
+    <xsl:value-of select="host" />:<xsl:value-of select="port" />
+    cwd=<xsl:value-of select="cwd" /> SolrHome=<xsl:value-of select="solrHome" />
+  </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.jsp	(revision 2882)
@@ -0,0 +1,52 @@
+<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrConfig,
+                 org.apache.solr.core.SolrCore,
+                 org.apache.solr.common.SolrException"%>
+<%@ page import="org.apache.solr.request.LocalSolrQueryRequest"%>
+<%@ page import="org.apache.solr.request.SolrQueryResponse"%>
+<%@ page import="org.apache.solr.request.ServletSolrParams"%>
+<%@ page import="org.apache.solr.request.SolrQueryRequest"%>
+
+<%@include file="_info.jsp" %>
+<?xml-stylesheet type="text/xsl" href="ping.xsl"?>
+
+<solr>
+  <core><%=core.getName()%></core>
+  <ping>
+<%
+  SolrQueryRequest req = core.getPingQueryRequest();
+  SolrQueryResponse resp = new SolrQueryResponse();
+  try {
+    core.execute(req,resp);
+    if (resp.getException() == null) {
+// No need for explicit status in the body, when the standard HTTP
+// response codes already transmit success/failure message
+      out.println("<status>200</status>");
+    }
+    else if (resp.getException() != null) {
+     throw resp.getException();
+    }
+  } catch (Throwable t) {
+     throw t;
+  } finally {
+      req.close();
+  }
+%>
+  </ping>
+</solr>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/ping.xsl	(revision 2882)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<!-- $URL$ -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output
+    method="html"
+    indent="yes"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+	<link rel="icon" href="favicon.ico" type="image/ico"></link>
+	<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title>Solr Admin: Ping</title>
+      </head>
+      <body>
+        <a href=".">
+	   <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR">
+	   </img>
+	</a>
+        <h1>Solr Admin (<xsl:value-of select="solr/meta/collection" />)</h1>
+        <div style="margin-top: 1em;">
+          <xsl:apply-templates/>
+        <div>
+        </div>
+          <a href=".">Return to Admin Page</a>
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:include href="meta.xsl"/>
+
+  <xsl:template match="solr/ping">
+  <table>
+    <tr>
+      <td>
+        <H3>Ping</H3>
+      </td>
+      <td>
+        <xsl:value-of select="error" />
+      </td>
+    </tr>
+  </table>
+  </xsl:template>
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/raw-schema.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/raw-schema.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/raw-schema.jsp	(revision 2882)
@@ -0,0 +1,38 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrCore,
+                 org.apache.solr.schema.IndexSchema"%>
+<%@ page import="java.io.InputStreamReader"%>
+<%@ page import="java.io.Reader"%>
+<%@ page import="java.util.logging.Logger"%>
+<%@ page contentType="text/plain;charset=UTF-8" language="java" %>
+<%@include file="_info.jsp" %>
+<%!
+  static Logger log = Logger.getLogger(SolrCore.class.getName());
+%>
+<%
+  // NOTE -- this file will be removed in a future release
+  log.warning("Using deprecated JSP: " + request.getRequestURL().append("?").append(request.getQueryString()) + " -- check the ShowFileRequestHandler"  );
+
+  Reader input = new InputStreamReader(schema.getInputStream());
+  char[] buf = new char[4096];
+  while (true) {
+    int len = input.read(buf);
+    if (len<=0) break;
+    out.write(buf,0,len);
+  }
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.jsp	(revision 2882)
@@ -0,0 +1,107 @@
+<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrInfoMBean,
+                 org.apache.solr.core.SolrInfoRegistry,
+                 java.net.URL,
+                 java.util.Date,
+                 java.util.Map"%>
+<?xml-stylesheet type="text/xsl" href="registry.xsl"?>
+
+<%@include file="_info.jsp" %>
+
+<solr>
+  <core><%= core.getName()%></core>
+  <schema><%= collectionName %></schema>
+  <host><%= hostname %></host>
+  <now><%= new Date().toString() %></now>
+  <start><%= new Date(core.getStartTime()) %></start>
+  <solr-spec-version><%= solrSpecVersion %></solr-spec-version>
+  <solr-impl-version><%= solrImplVersion %></solr-impl-version>
+  <lucene-spec-version><%= luceneSpecVersion %></lucene-spec-version>
+  <lucene-impl-version><%= luceneImplVersion %></lucene-impl-version>
+  <solr-info>
+<%
+for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
+%>
+    <<%= cat.toString() %>>
+<%
+ Map<String, SolrInfoMBean> reg = core.getInfoRegistry();
+ synchronized(reg) {
+  for (Map.Entry<String,SolrInfoMBean> entry : reg.entrySet()) {
+    String key = entry.getKey();
+    SolrInfoMBean m = entry.getValue();
+
+    if (m.getCategory() != cat) continue;
+
+    String na     = "None Provided";
+    String name   = (m.getName()!=null ? m.getName() : na);
+    String vers   = (m.getVersion()!=null ? m.getVersion() : na);
+    String desc   = (m.getDescription()!=null ? m.getDescription() : na);
+    String srcId  = (m.getSourceId()!=null ? m.getSourceId() : na);
+    String src = (m.getSource()!=null ? m.getSource() : na);
+    // print
+%>
+      <entry>
+        <name>
+          <%= key %>
+        </name>
+        <class>
+          <%= name %>
+        </class>
+        <version>
+          <%= vers %>
+        </version>
+        <description>
+          <%= desc %>
+        </description>
+        <sourceid>
+          <%= srcId %>
+        </sourceid>
+        <source>
+          <%= src %>
+        </source>
+
+<%
+    URL[] urls = m.getDocs();
+    if ((urls != null) && (urls.length != 0)) {
+%>
+        <urls>
+<%
+      for (URL u : urls) {
+%>
+          <url>
+            <%= u.toString() %>
+          </url>
+<%
+      }
+%>
+        </urls>
+<%
+    }
+%>
+      </entry>
+<%
+  }
+ }
+%>
+    </<%= cat.toString() %>>
+<%
+}
+%>
+  </solr-info>
+</solr>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/registry.xsl	(revision 2882)
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id: registry.xsl 815587 2009-09-16 01:57:15Z gsingers $ -->
+<!-- $URL: https://svn.apache.org/repos/asf/lucene/solr/branches/branch-1.4/src/webapp/web/admin/registry.xsl $ -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+
+  <xsl:output
+    method="html"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    indent="yes"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+	<link rel="icon" href="favicon.ico" type="image/ico"></link>
+	<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title>SOLR Info</title>
+      </head>
+      <body>
+        <a href=".">
+	   <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR">
+	   </img>
+	</a>
+        <h1>SOLR Info (<xsl:value-of select="solr/schema" />)</h1>
+          <xsl:value-of select="solr/host" />
+          <br clear="all" />
+        <xsl:apply-templates/>
+        <br /><br />
+        <a href="">Return to Admin Page</a>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="solr">
+  <table>
+    <tr>
+      <td>
+        <H3>Category</H3>
+      </td>
+      <td>
+        [<a href="#core">Core</a>]
+        [<a href="#cache">Cache</a>]
+        [<a href="#query">Query</a>]
+        [<a href="#update">Update</a>]
+        [<a href="#highlighting">Highlighting</a>]
+        [<a href="#other">Other</a>]
+      </td>
+    </tr>
+    <tr><td></td>
+      <td>Solr Specification Version: 
+          <xsl:value-of select="solr-spec-version" />
+      </td>
+    </tr>
+    <tr><td></td>
+      <td>Solr Implementation Version: 
+          <xsl:value-of select="solr-impl-version" />
+      </td>
+    </tr>
+    <tr><td></td>
+      <td>Lucene Specification Version: 
+          <xsl:value-of select="lucene-spec-version" />
+      </td>
+    </tr>
+    <tr><td></td>
+      <td>Lucene Implementation Version: 
+          <xsl:value-of select="lucene-impl-version" />
+      </td>
+    </tr>
+    <tr>
+      <td>
+      </td>
+      <td>
+        Current Time: <xsl:value-of select="now" />
+      </td>
+    </tr>
+    <tr>
+      <td>
+      </td>
+      <td>
+        Server Start Time:<xsl:value-of select="start" />
+      </td>
+    </tr>
+  </table>
+  <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="solr/*" priority="-1" />
+
+  <xsl:template match="solr/solr-info">
+  <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CORE">
+    <br />
+    <a name="core"><h2>Core</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CORE/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CACHE">
+    <br />
+    <a name="cache"><h2>Cache</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CACHE/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/QUERYHANDLER">
+    <br />
+    <a name="query"><h2>Query Handlers</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/QUERYHANDLER/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/UPDATEHANDLER">
+    <br />
+    <a name="update"><h2>Update Handlers</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/UPDATEHANDLER/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+  <xsl:template match="solr/solr-info/HIGHLIGHTING">
+    <br />
+    <a name="highlighting"><h2>Highlighting</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+  <xsl:template match="solr/solr-info/HIGHLIGHTING/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+
+  <xsl:template match="solr/solr-info/OTHER">
+    <br />
+    <a name="other"><h2>Other</h2></a>
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+    <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/OTHER/entry">
+      <xsl:for-each select="*">
+        <tr>
+          <td align="right">
+            <strong><xsl:value-of select="name()"/>:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="."/>&#xa0;</tt>
+          </td>
+        </tr>
+      </xsl:for-each>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/header.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/header.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/header.jsp	(revision 2882)
@@ -0,0 +1,89 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<!-- $Id: header.jsp 809125 2009-08-29 12:46:54Z noble $ -->
+<%@ page import="org.apache.solr.common.util.NamedList,
+				 org.apache.solr.common.util.SimpleOrderedMap,
+				 org.apache.solr.request.LocalSolrQueryRequest,
+				 org.apache.solr.request.SolrQueryResponse,
+				 org.apache.solr.request.SolrRequestHandler,
+                                 java.util.Map"%>
+<%@ page import="org.apache.solr.handler.ReplicationHandler" %>
+<%
+request.setCharacterEncoding("UTF-8");
+%>
+
+<html>
+<head>
+
+<%@include file="../_info.jsp" %>
+
+<script>
+var host_name="<%= hostname %>"
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<link rel="stylesheet" type="text/css" href="../solr-admin.css">
+<link rel="icon" href="../favicon.ico" type="image/ico" />
+<link rel="shortcut icon" href="../favicon.ico" type="image/ico" />
+<title>Solr replication admin page</title>
+<script type="text/javascript" src="../jquery-1.2.3.min.js"></script>
+
+<%!
+public NamedList executeCommand(String command, SolrCore core, SolrRequestHandler rh){
+    NamedList namedlist = new SimpleOrderedMap();
+    namedlist.add("command", command);
+    LocalSolrQueryRequest solrqreq = new LocalSolrQueryRequest(core, namedlist);
+    SolrQueryResponse rsp = new SolrQueryResponse();
+    core.execute(rh, solrqreq, rsp);
+    namedlist = rsp.getValues();
+	return namedlist;
+}
+%>
+
+<%
+final Map<String,SolrRequestHandler> all = core.getRequestHandlers(ReplicationHandler.class);
+  if(all.isEmpty()){
+    response.sendError( 404, "No ReplicationHandler registered" );
+    return;
+  }
+
+// :HACK: we should be more deterministic if multiple instances
+final SolrRequestHandler rh = all.values().iterator().next();
+
+NamedList namedlist = executeCommand("details",core,rh);
+NamedList detailsMap = (NamedList)namedlist.get("details");
+%>
+</head>
+
+<body>
+<a href=".."><img border="0" align="right" height="78" width="142" src="../solr_small.png" alt="Solr"></a>
+<h1>Solr replication (<%= collectionName %>) 
+
+<%
+if(detailsMap != null){
+  if( "true".equals(detailsMap.get("isMaster")) && "true".equals(detailsMap.get("isSlave")))
+    out.println(" Master & Slave");
+  else if("true".equals(detailsMap.get("isMaster")))
+    out.println(" Master");
+  else if("true".equals(detailsMap.get("isSlave")))
+    out.println(" Slave");
+}
+%></h1>
+
+<%= hostname %>:<%= port %><br/>
+cwd=<%= cwd %>  SolrHome=<%= solrHome %>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/index.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/index.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/replication/index.jsp	(revision 2882)
@@ -0,0 +1,378 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.util.Date" %>
+
+
+<%-- do a verbatim include so we can use the local vars --%>
+<%@include file="header.jsp"%>
+
+<br clear="all" />
+(<a href="http://wiki.apache.org/solr/SolrReplication">What Is This Page?</a>)
+<br clear="all" />
+<table>
+
+<%
+
+  final SolrCore solrcore = core;
+
+%>
+<%
+NamedList slave = null, master = null;
+if (detailsMap != null)
+   if ("true".equals(detailsMap.get("isSlave")))
+       if(detailsMap.get("slave") != null){
+           slave = (NamedList)detailsMap.get("slave");%>
+<tr>
+  <td>
+    <strong>Master</strong>
+  </td>
+  <td>
+    <%=slave.get("masterUrl")%>
+    <%
+    NamedList nl = (NamedList) slave.get("masterDetails");
+    if(nl == null)
+    	out.print(" - <b>Unreachable</b>");
+    %>
+  </td>
+</tr>
+<%
+    if (nl != null) {         
+      nl = (NamedList) nl.get("master");
+      if(nl != null){      
+  %>
+<tr>  
+  <td>
+  </td>
+  <td>Latest Index Version:<%=nl.get("indexVersion")%>, Generation: <%=nl.get("generation")%>
+  </td>
+</tr>
+<tr>
+  <td></td>
+  <td>Replicatable Index Version:<%=nl.get("replicatableIndexVersion")%>, Generation: <%=nl.get("replicatableGeneration")%>
+  </td>
+</tr>
+<%
+}
+}%>
+
+<tr>
+  <td>
+    <strong>Poll Interval</strong>
+  </td>
+  <td>
+    <%=slave.get("pollInterval")%>
+  </td>
+</tr>
+<%}%>
+
+<tr>
+  <td>
+    <strong>Local Index</strong>
+  </td>
+  <td>
+    <%
+      if (detailsMap != null)
+        out.println("Index Version: " + detailsMap.get("indexVersion") + ", Generation: " + detailsMap.get("generation"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <% if (null != core.getIndexDir()) {
+      File dir = new File(core.getIndexDir());
+      out.println("Location: " + dir.getCanonicalPath());
+    }%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td><% if (detailsMap != null)
+    out.println("Size: " + detailsMap.get("indexSize"));
+  %>
+  </td>
+</tr>
+
+<%
+  if (detailsMap != null)
+    if ("true".equals(detailsMap.get("isMaster"))) 
+       if(detailsMap.get("master") != null){
+           master = (NamedList) detailsMap.get("master");
+%>
+
+<tr>
+  <td></td>
+  <td>
+    <%out.println("Config Files To Replicate: " + master.get("confFiles"));%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <%out.println("Trigger Replication On: " + master.get("replicateAfter")); %>
+  </td>
+</tr>
+<%}%>
+
+<%
+  if ("true".equals(detailsMap.get("isSlave")))
+    if (slave != null) {%>
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      out.println("Times Replicated Since Startup: " + slave.get("timesIndexReplicated"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      out.println("Previous Replication Done At: " + slave.get("indexReplicatedAt"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      out.println("Config Files Replicated At: " + slave.get("confFilesReplicatedAt"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      out.println("Config Files Replicated: " + slave.get("confFilesReplicated"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      out.println("Times Config Files Replicated Since Startup: " + slave.get("timesConfigReplicated"));
+    %>
+  </td>
+</tr>
+
+<tr>
+  <td>
+  </td>
+  <td>
+    <%
+      if (slave.get("nextExecutionAt") != null)
+        if (slave.get("nextExecutionAt") != "")
+          out.println("Next Replication Cycle At: " + slave.get("nextExecutionAt"));
+        else if ("true".equals(slave.get("isPollingDisabled")))
+          out.println("Next Replication Cycle At: Polling disabled.");
+        else {
+          NamedList nl1 = (NamedList) slave.get("masterDetails");
+          if(nl1 != null){
+          	NamedList nl2 = (NamedList) nl1.get("master");
+          	if(nl2 != null)
+          		out.println("Next Replication Cycle At: After " + nl2.get("replicateAfter") + " on master.");
+          }
+        }
+    %>
+  </td>
+</tr>
+
+<%
+  if ("true".equals(slave.get("isReplicating"))) {
+%>
+<tr>
+  <td><strong>Current Replication Status</strong>
+
+  <td>
+    <%out.println("Start Time: " + slave.get("replicationStartTime"));%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <%
+      out.println("Files Downloaded: " + slave.get("numFilesDownloaded") + " / " + slave.get("numFilesToDownload"));%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <%
+      out.println("Downloaded: " + slave.get("bytesDownloaded") + " / " + slave.get("bytesToDownload") + " [" + slave.get("totalPercent") + "%]");%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <%
+      out.println("Downloading File: " + slave.get("currentFile") + ", Downloaded: " + slave.get("currentFileSizeDownloaded") + " / " + slave.get("currentFileSize") + " [" + slave.get("currentFileSizePercent") + "%]");%>
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <%
+      out.println("Time Elapsed: " + slave.get("timeElapsed") + ", Estimated Time Remaining: " + slave.get("timeRemaining") + ", Speed: " + slave.get("downloadSpeed") + "/s");%>
+  </td>
+</tr>
+<%}%>
+
+<tr>
+  <td><strong>Controls</strong>
+  </td>
+  <td><%
+    String pollVal = request.getParameter("poll");
+    if (pollVal != null)
+      if (pollVal.equals("disable"))
+        executeCommand("disablepoll", core, rh);
+      else if (pollVal.equals("enable"))
+        executeCommand("enablepoll", core, rh);
+    if(slave != null)
+    	if ("false".equals(slave.get("isPollingDisabled"))) {
+  %>
+
+    <form name=polling method="POST" action="./index.jsp" accept-charset="UTF-8">
+      <input name="poll" type="hidden" value="disable">
+      <input class="stdbutton" type="submit" value="Disable Poll">
+    </form>
+
+    <%}%>
+    <%
+      if(slave != null)
+      	if ("true".equals(slave.get("isPollingDisabled"))) {
+    %>
+
+    <form name=polling method="POST" action="./index.jsp" accept-charset="UTF-8">
+      <input name="poll" type="hidden" value="enable">
+      <input class="stdbutton" type="submit" value="Enable Poll">
+    </form>
+    <%
+      }
+    %>
+
+  </td>
+</tr>
+
+<tr>
+  <td></td>
+  <td>
+    <form name=replicate method="POST" action="./index.jsp" accept-charset="UTF-8">
+      <input name="replicate" type="hidden" value="now">
+      <input name="replicateButton" class="stdbutton" type="submit" value="Replicate Now">
+    </form>
+    <%
+      if(slave != null)
+      	if ("true".equals(slave.get("isReplicating"))) {
+    %>
+    <script type="text/javascript">
+      document["replicate"].replicateButton.disabled = true;
+      document["replicate"].replicateButton.className = 'stdbuttondis';
+    </script>
+    <form name=abort method="POST" action="./index.jsp" accept-charset="UTF-8">
+      <input name="abort" type="hidden" value="stop">
+      <input name="abortButton" class="stdbutton" type="submit" value="Abort">
+    </form>
+
+    <%} else {%>
+    <script type="text/javascript">
+      document["replicate"].replicateButton.disabled = false;
+      document["replicate"].replicateButton.className = 'stdbutton';
+    </script>
+    <%
+      }
+      String replicateParam = request.getParameter("replicate");
+      String abortParam = request.getParameter("abort");
+      if (replicateParam != null)
+        if (replicateParam.equals("now")) {
+          executeCommand("fetchindex", solrcore, rh);
+        }
+      if (abortParam != null)
+        if (abortParam.equals("stop")) {
+          executeCommand("abortfetch", solrcore, rh);
+        }
+    %>
+  </td>
+
+</tr>
+
+<%}%>
+
+<%-- List the cores (that arent this one) so we can switch --%>
+<% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer) request.getAttribute("org.apache.solr.CoreContainer");
+  if (cores != null) {
+    Collection<String> names = cores.getCoreNames();
+    if (names.size() > 1) {%>
+<tr>
+  <td><strong>Cores:</strong><br></td>
+  <td><%
+    for (String name : names) {
+  %>[<a href="../../../<%=name%>/admin/index.jsp"><%=name%>
+  </a>]<%
+    }%></td>
+</tr>
+<%
+    }
+  }%>
+
+
+</table>
+<P>
+
+<p>
+
+<table>
+  <tr>
+    <td>
+    </td>
+    <td>
+      Current Time: <%= new Date() %>
+    </td>
+  </tr>
+  <tr>
+    <td>
+    </td>
+    <td>
+      Server Start At: <%= new Date(core.getStartTime()) %>
+    </td>
+  </tr>
+</table>
+
+<br>
+<a href="..">Return to Admin Page</a>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/schema.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/schema.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/schema.jsp	(revision 2882)
@@ -0,0 +1,657 @@
+<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+
+<%-- $Id: index.jsp 608150 2008-01-02 17:15:30Z ryan $ --%>
+<%-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ --%>
+<%-- $Name:  $ --%>
+  
+<script src="jquery-1.2.3.min.js"></script>
+<script>
+
+(function($, libName) {
+  var solr = {
+    
+    //The default location of the luke handler relative to this page
+    // Can be overridden in the init(url) method
+    pathToLukeHandler: 'luke',  
+    
+    // Base properties to hold schema information
+    schemaInfo: {},
+    schemaFields: {},
+    schemaDynamicFields: {},
+    schemaTypes: {},
+    schemaFlags: {},
+    
+    //The basic function to call to make the initail JSON calls
+    // takes one option parameter, the path to the luke handler
+    // if undefined, it will use the default, 'luke', which means
+    // this is being called from the same relative URL path
+    init: function(pathToLukeHandler) {
+      if (pathToLukeHandler != undefined) {
+        solr.pathToLukeHandler = pathToLukeHandler;
+      }
+      solr.loadSchema(function() {
+        solr.loadFromLukeHandler(function () {
+          solr.createMenu('menu');
+          solr.displaySchemaInfo();
+        });
+      });
+
+    },
+    
+    //load the Schema from the LukeRequestHandler
+    // this loads every field, and in each field the copy source/dests and flags
+    // we also load the list of field types, and the list of flags
+    loadSchema: function(func) {
+			$.getJSON(solr.pathToLukeHandler +'?show=schema&wt=json', function(data) {
+        //populate all non field/type/flag data in the info block
+        $.each(data.index, function(i, item) {
+          solr.schemaInfo[i] = item;
+        });
+        
+        //LukeRequestHandler places these two attributes outside of the "index" node, but
+        // we want it here so we can more easily display it in the "HOME" block
+        solr.schemaInfo['uniqueKeyField'] = data.schema.uniqueKeyField;
+        solr.schemaInfo['defaultSearchField'] = data.schema.defaultSearchField;
+        //a one-off hack, because the directory string is so long and unbroken
+        // that it can break CSS layouts
+        solr.schemaInfo['directory'] = solr.schemaInfo['directory'].substring(0, solr.schemaInfo['directory'].indexOf('@')+1) + ' ' +  solr.schemaInfo['directory'].substring(solr.schemaInfo['directory'].indexOf('@') +1);
+        
+        // populate the list of fields
+				$.each(data.schema.fields, function(i,item){
+					solr.schemaFields[i]=item;
+     		});
+        // populate the list of field types
+	      $.each(data.schema.types, function(type, ft) {
+          solr.schemaTypes[type] = ft;
+        });
+        //populate the list of dynamic fields
+        $.each(data.schema.dynamicFields, function(i, dynField) {
+          solr.schemaDynamicFields[i] = dynField;
+        });
+        //populate the list of flags, so we can convert flags to text in display
+      	$.each(data.info.key, function(i, flag) {
+      		solr.schemaFlags[i] = flag;
+ 	    	});
+        
+        //LukeRequestHandler returns copyFields src/dest as the entire toString of the field
+        // we only need the field name, so here we loop through the fields, and replace the full
+        // field definitions with the name in the copySources/copyDests properties
+        $.each(solr.schemaFields, function(i, field) {
+          $.each(['copySources', 'copyDests'], function(i, copyProp) {
+            var newFields = new Array();
+            $.each(field[copyProp], function(i, fullName) {
+              newFields.push(fullName.substring(fullName.lastIndexOf(':')+1, fullName.indexOf('{')));
+            });
+            field[copyProp] = newFields;
+          });
+        
+        });
+        //An additional optional callback
+        // used in init to trigger the 2nd call to LukeRequestHandler only
+        // after the first one is finished
+        if ($.isFunction(func)) {
+          func(solr);
+        }
+      });
+    },
+
+    //further populates the loaded schema with information gathered
+    // from the no argument LukeRequestHandler
+    loadFromLukeHandler: function(func) {
+      $.getJSON(solr.pathToLukeHandler+'?wt=json', function(data) {
+        $.each(data.fields, function(i, item) {
+          var field = solr.schemaFields[i];
+          
+          //If undefined, then we have a dynamicField which does not show up
+          // in the LukeRequestHandler show=schema variant
+          if (field == undefined) {
+            field = item;
+            //Attach this field to its dynamicField
+            var base = field.dynamicBase;
+            var dynField = solr.schemaDynamicFields[base];
+
+            //Some fields in a multicore setting have no dynamic base, either
+            // the name of the core is a field that has no type or flags
+            if (dynField != undefined) {
+            	var synFields = dynField['fields'];
+	            if (synFields== undefined) {
+    	          synFields= new Array();
+        	    }
+            	synFields.push(i);
+            	dynField['fields'] = synFields;
+            }
+            solr.schemaFields[i] = item;
+          }
+          //Populate other data in this field that would not have been loaded in
+          // the show=schema variant
+          $.each(item, function(k, v) {
+            if (k == 'topTerms' || k == 'histogram') {
+              solr.schemaFields[i][k] = solr.lukeArrayToHash(v);
+            } else {
+              solr.schemaFields[i][k] = v;
+            }
+          });
+        });
+        //another optional callback; used in the init case to lay out the page
+        // after the data is loaded
+        if ($.isFunction(func)) {
+          func();
+        }
+      });
+    },
+    //some elements in the JSON response are arrays, where odd/even elements
+    // are the name/value, and convert it to a standard map/associative array
+    // incoming: ['foo', 'bar', 'bat', 'baz']
+    // output: {'foo':'bar', 'bat':baz'}
+    lukeArrayToHash: function(termsArr) {
+        var hash = new Object();
+				var temp;
+        //topTerms comes in as an array, with odd indexes the field name
+        // and even indexes the number
+				$.each(termsArr, function(i, item) {
+					if (i%2 ==0) {
+						temp = item;
+					} else {
+						hash[temp] = item;
+					} 
+				});
+				return hash;
+    },
+    
+    //gets the top Terms via an Ajax call the LukeRequestHandler for that field
+    // The callback is used here to redraw the table after the ajax call returns
+		getTopTerms: function(fieldName, numTerms, func) {
+      if (numTerms == undefined) {
+        var numTerms = 10;
+      }
+      if (isNaN(numTerms) || numTerms <=0 || numTerms.indexOf('.') != -1) {
+        return;
+      }
+			$.getJSON(solr.pathToLukeHandler+'?fl='+fieldName+'&wt=json&numTerms='+numTerms, function(data) {                  
+				solr.schemaFields[fieldName]['topTerms'] = solr.lukeArrayToHash(data.fields[fieldName].topTerms);
+        if ($.isFunction(func)) {
+          func(solr.schemaFields[fieldName]['topTerms'], fieldName);
+        }
+			});
+		},
+    
+    // Displays the SchemaInfo in the main content panel
+    // dispayed on data load, and also when 'Home' is clicked
+    displaySchemaInfo: function() {
+      $('#mainInfo').html('');
+      $('#topTerms').html('');
+      $('#histogram').html('');      
+      $('#mainInfo').append(solr.createSimpleText('Schema Information'));
+      //Make sure the uniqueKeyField and defaultSearchFields come first
+      $.each({'Unique Key':'uniqueKeyField', 'Default Search Field':'defaultSearchField'}, function(text, prop) {
+          if (solr.schemaInfo[prop] != undefined) {
+            $('#mainInfo').append(solr.createNameValueText(text, function(p) {
+              p.appendChild(solr.createLink(solr.schemaInfo[prop], solr.schemaInfo[prop]));
+              return p;
+            }));
+          } 
+      });
+      $.each(solr.schemaInfo, function(i, item) {
+        if (i == 'uniqueKeyField' || i == 'defaultSearchField') {
+          //noop; we took care of this above
+        } else {
+          $('#mainInfo').append(solr.createNameValueText(i, item));
+        }
+      });
+      //Close all menus when we display schema home
+      solr.toggleMenus(undefined, ['fields', 'types', 'dynFields']);
+    },
+    
+    // display a dynamic field in the main content panel
+    displayDynamicField: function(dynamicPattern) {
+      var df = solr.schemaDynamicFields[dynamicPattern];
+      $('#mainInfo').html('');
+      $('#topTerms').html('');
+      $('#histogram').html('');
+      $('#mainInfo').append(solr.createSimpleText('Dynamic Field: ' + dynamicPattern));
+      $('#mainInfo').append(solr.createNameValueText('Fields', function(p) {
+        if (df.fields != undefined) {
+          $.each(df.fields, function(i, item) {
+            p.appendChild(solr.createLink(item, item));
+          });
+        } else {
+          p.appendChild(document.createTextNode(' None currently in index'));
+        }
+        return p;
+      }));
+      var ft = solr.schemaTypes[df.type];
+      $('#mainInfo').append(solr.createNameValueText('Field Type', function(p) {
+        p.appendChild(solr.createLink(df.type, df.type, solr.displayFieldType));
+        return p;
+      }));
+      if (df.flags != undefined) {
+        $('#mainInfo').append(solr.createNameValueText('Properties', solr.createTextFromFlags(df.flags, df.type)));
+      }
+      solr.displayAnalyzer(ft.indexAnalyzer, 'Index Analyzer', true);
+      solr.displayAnalyzer(ft.queryAnalyzer, 'Query Analyzer', true);
+
+      solr.toggleMenus('dynFields', ['fields', 'types'], dynamicPattern);
+    },
+    
+    // display a field type in the main area
+    displayFieldType: function(typeName) {
+      var ft = solr.schemaTypes[typeName];
+      $('#mainInfo').html('');
+      $('#topTerms').html('');
+      $('#histogram').html('');
+			$('#mainInfo').append(solr.createSimpleText('Field Type: ' + typeName));
+        $('#mainInfo').append(solr.createNameValueText('Fields', function(p) {
+          if (ft.fields != undefined) {
+            $.each(ft.fields, function(i, item) {
+              if (solr.schemaFields[item] != undefined) {
+                p.appendChild(solr.createLink(item, item));
+              } else {
+                p.appendChild(solr.createLink(item, item, solr.displayDynamicField));
+              }
+              p.appendChild(document.createTextNode(' '));
+            });
+          } else {
+            p.appendChild(document.createTextNode('No fields in index'));
+          }
+          return p;
+        }));
+      $('#mainInfo').append(solr.createNameValueText('Tokenized', ft.tokenized));
+      $('#mainInfo').append(solr.createNameValueText('Class Name', ft.className));
+
+      solr.displayAnalyzer(ft.indexAnalyzer, 'Index Analyzer');
+      solr.displayAnalyzer(ft.queryAnalyzer, 'Query Analyzer');
+      solr.toggleMenus('types', ['fields', 'dynFields'], typeName);
+    },
+    
+    //Displays information about an Analyzer in the main content area
+    displayAnalyzer: function(analyzer, type, shouldCollapse) {
+      var tid = type.replace(' ', '');
+      var collapse = shouldCollapse && (analyzer.tokenizer != undefined || analyzer.filters != undefined);
+      $('#mainInfo').append(solr.createNameValueText(type, function(p) {
+        p.appendChild(document.createTextNode(analyzer.className + ' '));
+        if (collapse) {
+          p.appendChild(solr.createLink(type, 'Details', function() {
+            $('#'+tid).toggle("slow");
+          }));
+        }
+        return p;
+      }));
+      var adiv = document.createElement('div');
+      adiv.id=tid;
+      adiv.className='analyzer';
+      if (collapse) {
+        adiv.style.display='none';
+      }
+      if (analyzer.tokenizer != undefined) {
+        adiv.appendChild(solr.createNameValueText("Tokenizer Class", analyzer.tokenizer.className));
+      }
+      if (analyzer.filters != undefined) {
+        adiv.appendChild(solr.createNameValueText('Filters', ''));
+        var f = document.createElement('ol');
+        $.each(analyzer.filters, function(i, item) {
+          var fil = document.createElement('li');
+          var filterText = item.className;
+          if (item.args != undefined) {
+            filterText += ' args:{'
+            $.each(item.args, function(fi, fitem) {
+              filterText += fi + ': ' + fitem + ' ';
+            });
+            filterText +='}';
+            fil.innerHTML = filterText;
+            f.appendChild(fil);
+          }
+        });
+        adiv.appendChild(f);
+      }
+      $('#mainInfo').append(adiv);
+    },
+    
+    // display information about a Field in the main content area
+    // and its TopTerms and Histogram in related divs
+		displayField: function(fieldName) {
+      var field = solr.schemaFields[fieldName];
+      var isDynamic = field.dynamicBase != undefined ? true : false;
+      var ft;
+      var ftName;
+      $('#mainInfo').html('');  
+      $('#topTerms').html('');
+      $('#histogram').html('');
+      $('#mainInfo').append(solr.createSimpleText('Field: ' + fieldName));
+      
+      //For regular fields, we take their properties; for dynamicFields,
+      // we take them from their dynamicField definitions
+      if (isDynamic) {
+        ftName = solr.schemaDynamicFields[field.dynamicBase].type
+        $('#mainInfo').append(solr.createNameValueText('Dynamically Created From Pattern', function(p) {
+          p.appendChild(solr.createLink(field.dynamicBase, field.dynamicBase, solr.displayDynamicField));
+          return p;
+        }));
+      } else {
+        ftName = field.type;
+      }			
+      ft = solr.schemaTypes[field.type];
+      $('#mainInfo').append(solr.createNameValueText('Field Type', function(p) {
+        p.appendChild(solr.createLink(ftName, ftName, solr.displayFieldType));
+        return p;
+      }));
+			if (solr.schemaFlags != '') {
+        $.each({'flags':'Properties', 'schema':'Schema', 'index':'Index'}, function(prop, text) {
+          if (field[prop] != undefined) {
+            $('#mainInfo').append(solr.createNameValueText(text, solr.createTextFromFlags(field[prop], ft)));
+          }
+        });
+      }    
+      $.each({'copySources':'Copied From', 'copyDests':'Copied Into'}, function(prop, text) {
+        if (field[prop] != undefined && field[prop] != '') {
+          $('#mainInfo').append(solr.createNameValueText(text, function(p) {
+            $.each(field[prop], function(i, item) {
+              p.appendChild(solr.createLink(item, item));
+              p.appendChild(document.createTextNode(' '));
+            });
+            return p;
+          }));
+        }
+      });
+      if (field.positionIncrementGap != undefined) {
+        $('#mainInfo').append(solr.createNameValueText('Position Increment Gap', field.positionIncrementGap));
+      }
+      solr.displayAnalyzer(ft.indexAnalyzer, 'Index Analyzer', true);
+      solr.displayAnalyzer(ft.queryAnalyzer, 'Query Analyzer', true);
+      if (field.docs != undefined) {
+        $('#mainInfo').append(solr.createNameValueText('Docs', field.docs));
+      }
+      if (field.distinct != undefined) {
+        $('#mainInfo').append(solr.createNameValueText('Distinct', field.distinct));
+      }
+
+      if (field.topTerms != undefined) {
+        solr.displayTopTerms(field.topTerms, fieldName);
+      }
+
+      if (field.histogram != undefined) {
+        solr.drawHistogram(field.histogram);
+      }
+      solr.toggleMenus('fields', ['types', 'dynFields'], fieldName);
+		},	
+
+    //utility method to create a single sentence list of properties from a flag set
+    // or pass it on, if the flags are (unstored field)
+		createTextFromFlags: function(fieldFlags, fieldType) {
+			var value;
+      if (fieldFlags != '(unstored field)') {
+        var value = '';      
+        for (var i=0;i<fieldFlags.length;i++) {
+          if (fieldFlags.charAt(i) != '-') {
+            value += solr.schemaFlags[fieldFlags.charAt(i)];
+          value += ', ';
+          }
+        }
+        value = value.substring(0, value.length-2);
+			} else {
+      value = fieldFlags;
+      }
+			return value;
+		},
+
+    //Store the currently highlighted menu item, as otherwise we
+    // must traverse all li menu items, which is very slow on schemas with
+    // large number of fields
+    // for example $('#menu ul li').siblings().removeClass('selected');
+    currentlyHighlightedMenuId: undefined,
+    
+    //add a highlight to the currently selected menu item, and remove
+    // the highlights from all other menu items
+    highlightMenuItem: function(idToSelect) {
+      if (solr.currentlyHighlightedMenuId != undefined) {
+        $('#'+solr.currentlyHighlightedMenuId).removeClass('selected');
+      }
+      $('#'+idToSelect).addClass('selected');
+      solr.currentlyHighlightedMenuId = idToSelect;
+    },
+    
+    //Opens one menu group, close the others, and optionally highlight one
+    // item, which should be in the opened menu
+    toggleMenus: function(idToShow, idsToHide, idToSelect) {
+      if (idToSelect != undefined) {
+        solr.highlightMenuItem(idToShow + idToSelect);
+      }
+      $('#'+idToShow).show("slow");
+      $.each(idsToHide, function(i, idToHide) {
+        $('#'+idToHide).hide("slow");
+      });
+    },
+    
+    //A utility method to create a paragraph, which takes two arguments;
+    // an opening text, and either text or a callback function to follow
+    // any callback function must return the node passed into it
+    createNameValueText: function(openingText, func) {
+      var p = document.createElement('p');
+      p.appendChild(solr.createSimpleText(openingText + ': ', 'b'));
+      return solr.applyFuncToNode(p, func);
+    },
+
+    //utility method to create an HTML text element node
+    // with the literal text to place, and an optional function to apply
+    // any callback function must return the node passed into it 
+    createSimpleText: function(text, n, func) {
+      if (n == undefined) {
+        n = 'h2';
+      }
+      var no= document.createElement(n);
+      no.appendChild(document.createTextNode(text));
+      return solr.applyFuncToNode(no, func);
+    },
+    
+    //Utility method that applies a function or a string to append
+    // an additional child to a node
+    applyFuncToNode: function(no, func) {
+      if ($.isFunction(func)) {
+        no = func(no);
+      } else {
+        // if it is not a function, append it as a string
+        if (func != undefined) {
+          no.appendChild(document.createTextNode(' ' + func));
+        }
+      }
+      return no;
+    },
+        
+    //show a table of top terms for a given field
+    displayTopTerms: function(topTerms, fieldName) {
+        $('#topTerms').html('');
+        var tbl = document.createElement('table');
+        tbl.className='topTerms';
+        var thead= document.createElement('thead');
+        var headerRow = document.createElement('tr');
+        $.each(['term', 'frequency'], function() {
+          var cell = document.createElement('th');
+          cell.innerHTML= this;
+          headerRow.appendChild(cell);
+        });
+        thead.appendChild(headerRow);
+        tbl.appendChild(thead);
+        var tbody = document.createElement('tbody');
+        
+        var numTerms = 0;
+        $.each(topTerms, function(term, count) {
+          var c1 = $('<td>').text(term);
+          var c2 = $('<td>').text(count);
+          var row = $('<tr>').append(c1).append(c2);
+          tbody.appendChild(row.get(0));
+          numTerms++;
+        });
+        tbl.appendChild(tbody);
+        
+        //create a header along with an input widget so the user
+        // can request a different number of Top Terms
+        var h2 = document.createElement('h2');
+        h2.appendChild(document.createTextNode('Top   '));
+        var termsGetter = document.createElement('input');
+        termsGetter.type='text';
+        termsGetter.size=5;
+        termsGetter.value=numTerms;
+        
+        termsGetter.onchange=function() {
+            solr.getTopTerms(fieldName, this.value, solr.displayTopTerms);
+        }
+        h2.appendChild(termsGetter);
+        h2.appendChild(document.createTextNode(' Terms'));
+        $('#topTerms').append(h2);
+        
+        document.getElementById('topTerms').appendChild(tbl);
+        $('#topTerms').append(tbl);
+    },
+    
+    //draws a histogram, taking a map of values and an optional total height and width for the table
+    drawHistogram: function(histogram, totalHeightArg, totalWidthArg) {
+      $('#histogram').html('');
+      $('#histogram').append(solr.createSimpleText('Histogram'));
+      var max = 0;
+      var bars =0;
+      //find the # of columns and max value in the histogram 
+      // so we can create an appropriately scaled chart
+      $.each(histogram, function(i, item) {
+        if (item > max) max = item;
+        bars += 1;
+      });
+      if (max ==0) {
+        $('#histogram').append(solr.createNameValueText('No histogram available'));
+      } else {
+        var totalHeight = totalHeightArg == undefined ? 208 : totalHeightArg;
+        var totalWidth = totalWidthArg == undefined ? 160 : totalWidthArg;
+        var tbl = document.createElement('table');
+        tbl.style.width=totalWidth+'px';
+        tbl.className = 'histogram';
+        var h = document.createElement('tbody');
+        var r = document.createElement('tr');
+        var r2 = document.createElement('tr');
+        $.each(histogram, function(i, item) {
+          var c = document.createElement('td');
+          c.innerHTML=item+'<div style="width:'+totalWidth/bars+'px;height:'+(item*totalHeight/max)+'px;background:blue">&nbsp</div>';
+          r.appendChild(c);
+          var c2 = document.createElement('td');
+          c2.innerHTML='' + i;
+          r2.appendChild(c2);
+        });
+        h.appendChild(r);
+        h.appendChild(r2);
+        tbl.appendChild(h);
+        $('#histogram').append(tbl);
+      }
+    },
+    
+    //dynamically creates a link to be appended
+    createLink: function(idToDisplay, linkText, linkFunction) {
+      var link = document.createElement('a');
+      if (!$.isFunction(linkFunction)) {
+        linkFunction = solr.displayField
+      }
+      link.onclick=function() {
+        linkFunction(idToDisplay);
+        return false;
+      };
+      link.href='#';
+      link.innerHTML=linkText;
+      return link;
+    },
+    
+    //Creates a menu header that can expand or collapse its children
+    createMenuHeader: function(text, idToShow, idsToHide) {
+      var head = document.createElement('h3');
+      var a = document.createElement('a');
+      a.onclick=function() {
+        solr.toggleMenus(idToShow, idsToHide);
+        return false;
+      };
+      a.href='#';
+      a.innerHTML=text;
+      head.appendChild(a);
+      return head;
+    },
+    
+    //Creates an element in a menu (e.g. each field in a list of fields)
+    createMenuItem: function(tagName, text, link, type, func) {
+        var fieldEle = document.createElement('li');
+        fieldEle.id=type+text;
+        var funct = func == undefined ? undefined : func;
+        fieldEle.appendChild(solr.createLink(text, link, funct));
+        return fieldEle;
+    },
+    
+    //populates the menu div
+    createMenu: function(menuId) {
+      var m = $('#'+menuId);
+      var home = document.createElement('h2');
+      home.appendChild(solr.createLink('Home', 'Home', solr.displaySchemaInfo));
+      m.append(home);
+      m.append(solr.createMenuHeader('Fields', 'fields', ['types', 'dynFields']));
+      var fields= document.createElement('ul');
+      fields.style.display='none';
+      fields.id = 'fields';
+      $.each(solr.schemaFields, function(i, item) {
+        fields.appendChild(solr.createMenuItem('li', i, i, fields.id));
+      });
+      m.append(fields);
+      m.append(solr.createMenuHeader('Dynamic Fields', 'dynFields', ['fields', 'types']));
+      var dyns = document.createElement('ul');
+      dyns.style.display = 'none';
+      dyns.id = 'dynFields';
+      $.each(solr.schemaDynamicFields, function(i, item) {
+        dyns.appendChild(solr.createMenuItem('li', i,i, dyns.id, solr.displayDynamicField));
+      });
+      m.append(dyns);
+      m.append(solr.createMenuHeader('Field Types', 'types', ['fields', 'dynFields']));
+      var types = document.createElement('ul');
+      types.style.display='none';
+      types.id='types';
+      $.each(this.schemaTypes, function(i, item) {
+        types.appendChild(solr.createMenuItem('li', i, i,types.id, solr.displayFieldType));
+      });
+      m.append(types);
+    }
+   };
+   
+	window[libName] = solr;
+})(jQuery, 'solr');
+$(document).ready(function() {
+  solr.init();
+});
+    
+$(window).unload( function() {
+  solr = null;
+  $('#mainInfo').html('');
+  $('#menu').html('');
+  $('#topTerms').html('');
+  $('#histogram').html('');
+});
+  
+</script>
+<%-- do a verbatim include so we can use the local vars --%>
+<%@include file="header.jsp" %>
+<div id="schemaTop">
+<h2>Schema Browser | See <a href="file/?file=schema.xml">Raw Schema.xml</a></h2>
+</div>
+<div id="menu"></div>
+<div id="content">
+<div id="mainInfo"><h2>Please wait...loading and parsing Schema Information from LukeRequestHandler</h2><p>If it does not load or your browser is not javascript or ajax-capable, you may wish to examine your schema using the <a href="luke?wt=xslt&tr=luke.xsl">Server side transformed LukeRequestHandler</a> or the raw <a href="file/?file=schema.xml">schema.xml</a> instead.</div>
+<div id="topTerms"></div>
+<div id="histogram"></div>
+</div>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/solr-admin.css
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/solr-admin.css	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/solr-admin.css	(revision 2882)
@@ -0,0 +1,215 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+h1, h2, h3, h4, h5 {
+   display: block;
+   font-family: ITC Officina Sans Book, Terminator Two, Helvetica, Arial, sans-serif;
+   font-style: bold;
+   margin: 0;
+}
+
+strong {
+   font-family: ITC Officina Sans Book, Terminator Two, Helvetica, Arial, sans-serif;
+   font-style: bold;
+   margin: 0;
+}
+
+input.std, textarea.std {
+   color: black;
+   border: 2px inset #ff9933;
+   background-color: #ffffff;
+   width:450px;
+   max-width:450px;
+}
+
+input.stdbutton {
+   font-family: ITC Officina Sans Book, Helvetica, Arial, sans-serif;
+   font-style: bold;
+   font-size: 11;
+   text-transform: capitalize;
+   color: black;
+   background-color: #dddddd;
+   border: groove #ff9933;
+}
+
+input.stdbutton:hover {
+   color: #0000ff;
+   border: groove #0000ff;
+}
+
+input.stdbuttondis{
+   font-family: ITC Officina Sans Book, Helvetica, Arial, sans-serif;
+   font-style: bold;
+   font-size: 11;
+   text-transform: capitalize;
+   color: #8B8B83;
+   background-color: #dddddd;
+   border: groove #8B8B83;
+}
+
+body {
+   background-color: #bbbbbb;
+}
+
+table {
+   display: table;
+   background-color: #FAF7E4;
+   width: 100%;
+   border-top: 4px solid #666666;
+   border-left: 2px solid #666666;
+   text-align: left;
+   vertical-align: top;
+   cellpadding-right: 8px;
+}
+
+table.responseHeader, table.analysis {
+   width: auto;
+}
+
+table {
+   border-collapse: collapse
+}
+
+tr > td:first-child {
+   width: 30%;
+}
+
+td.debugdata, td.highlight, td.responseHeader {
+   width: auto;
+}
+
+td.highlight {
+   background:	#ccccff;
+}
+
+td.responseHeader {
+   width: auto;
+   text-align: right;
+}
+
+td.responseHeader + td {
+   text-align: left;
+   font-family: Courier;
+}
+
+
+th, td {
+   text-align: left;
+   vertical-align: top;
+   border-bottom: 1px solid #ff9933;
+}
+
+a {
+   text-decoration:	none;
+   font-weight:	bold;
+   font-size:	11px;
+   background:	#FAF7E4;
+   text-transform: uppercase;
+}
+		
+a:link {	
+   color:	#0000aa;
+}			
+					
+a:visited {	
+   color:	#0000ff;
+}			
+								
+a:active {
+   color:	#4444ff;
+}			
+
+a:hover {
+   color:	#0000ff;
+   background:	#ccccff;
+}			
+
+a:offsite {	
+   color:	#0000aa;
+}		 
+
+table.analysis th, table.analysis td {
+border-right:1px solid black;
+}
+
+/**
+  * styles for the schema browser
+  */
+
+table.topTerms {
+  width: 450px;
+}
+
+table.histogram {
+   vertical-align: bottom;
+}
+
+table.histogram td, table.histogram th {
+   text-align: center;
+   vertical-align: bottom;
+   border-bottom: 1px solid #ff9933;
+   width: auto;
+}
+
+#menu {
+  background-color: #FAF7E4;
+  height:100%;
+  min-height:100%;
+  width:140px;
+  float:left;
+  margin-right:20px
+}
+#menu h3 {
+  padding-left:10px;
+}
+#menu ul {
+  list-style: none;
+  text-align: right;
+  margin: 0;
+  padding: 0
+}
+#menu li.header {
+  text-align: left;
+}
+#menu li {
+  border: 1px solid #ff9933;
+  margin: 0
+}
+#menu li a {
+  display:block;
+}
+#menu li.selected a {
+  background-color: #ccccff
+}
+#menu a:hover {
+  background: #ccccff
+}
+
+#schemaTop {
+  border-bottom:1px black solid;
+}
+
+#content {
+  margin-left: 160px;
+}
+#topTerms {
+  float:left;
+  margin-right:40px;
+}
+div.analyzer {
+  margin-left:20px;
+}
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.jsp	(revision 2882)
@@ -0,0 +1,92 @@
+<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrInfoMBean,
+                 org.apache.solr.core.SolrInfoRegistry,
+                 org.apache.solr.common.util.NamedList,
+                 java.util.Date,
+                 java.util.Map"%>
+<?xml-stylesheet type="text/xsl" href="stats.xsl"?>
+<%@include file="_info.jsp" %>
+
+
+<solr>
+  <%  
+  if (core.getName() != null) { %> 
+	  <core><% XML.escapeCharData(core.getName(), out); %></core> 
+  <% } %>
+  <schema><% XML.escapeCharData(collectionName, out); %></schema>
+  <host><% XML.escapeCharData(hostname, out); %></host>
+  <now><% XML.escapeCharData(new Date().toString(), out); %></now>
+  <start><% XML.escapeCharData(new Date(core.getStartTime()).toString(), out); %></start>
+  <solr-info>
+<%
+for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
+%>
+    <<%= cat.toString() %>>
+<%
+ Map<String,SolrInfoMBean> reg = core.getInfoRegistry();
+  for (Map.Entry<String,SolrInfoMBean> entry : reg.entrySet()) {
+    String key = entry.getKey();
+    SolrInfoMBean m = entry.getValue();
+
+    if (m.getCategory() != cat) continue;
+
+    NamedList nl = m.getStatistics();
+    if ((nl != null) && (nl.size() != 0)) {
+      String na     = "None Provided";
+      String name   = (m.getName()!=null ? m.getName() : na);
+      String vers   = (m.getVersion()!=null ? m.getVersion() : na);
+      String desc   = (m.getDescription()!=null ? m.getDescription() : na);
+%>
+    <entry>
+      <name>
+        <% XML.escapeCharData(key, out); %>
+      </name>
+      <class>
+        <% XML.escapeCharData(name, out); %>
+      </class>
+      <version>
+        <% XML.escapeCharData(vers, out); %>
+      </version>
+      <description>
+        <% XML.escapeCharData(desc, out); %>
+      </description>
+      <stats>
+<%
+      for (int i = 0; i < nl.size() ; i++) {
+%>
+        <stat name="<% XML.escapeAttributeValue(nl.getName(i), out);  %>" >
+          <% XML.escapeCharData(nl.getVal(i).toString(), out); %>
+        </stat>
+<%
+      }
+%>
+      </stats>
+    </entry>
+<%
+    }
+%>
+<%
+  }
+%>
+    </<%= cat.toString() %>>
+<%
+}
+%>
+  </solr-info>
+</solr>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/stats.xsl	(revision 2882)
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id: stats.xsl 728842 2008-12-23 01:45:23Z koji $ -->
+<!-- $URL: https://svn.apache.org/repos/asf/lucene/solr/branches/branch-1.4/src/webapp/web/admin/stats.xsl $ -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+
+  <xsl:output
+    method="html"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    indent="yes"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+
+  <xsl:template match="/">
+    <xsl:variable name="title">
+      <!-- no whitespace before the colon -->
+      Solr Statistics<xsl:if test="solr/core">:
+         <xsl:value-of select="solr/core"/>
+      </xsl:if>
+(<xsl:value-of select="solr/schema" />)
+    </xsl:variable>
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+	<link rel="icon" href="favicon.ico" type="image/ico"></link>
+	<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title><xsl:value-of select="$title"/></title>
+      </head>
+      <body>
+        <a href=".">
+	   <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR">
+	   </img>
+	</a>
+        <h1><xsl:value-of select="$title"/></h1>
+          <xsl:value-of select="solr/host" />
+          <br clear="all" />
+        <xsl:apply-templates/>
+        <br /><br />
+        <a href=".">Return to Admin Page</a>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="solr">
+  <table>
+    <tr>
+      <td>
+        <H3>Category</H3>
+      </td>
+      <td>
+        [<a href="#core">Core</a>]
+        [<a href="#cache">Cache</a>]
+        [<a href="#query">Query</a>]
+        [<a href="#update">Update</a>]
+        [<a href="#highlight">Highlighting</a>]
+        [<a href="#other">Other</a>]
+      </td>
+    </tr>
+    <tr>
+      <td>
+      </td>
+      <td>
+        Current Time: <xsl:value-of select="now" />
+      </td>
+    </tr>
+    <tr>
+      <td>
+      </td>
+      <td>
+        Server Start Time: <xsl:value-of select="start" />
+      </td>
+    </tr>
+    <xsl:apply-templates select="*" mode="header" />
+  </table>
+  <xsl:apply-templates select="solr-info" mode="main" />
+  </xsl:template>
+
+  <!-- catch all in case new header info gets added to XML -->
+  <xsl:template match="solr/*" mode="header" priority="-10">
+    <tr>
+      <td>
+      </td>
+      <td>
+        <xsl:value-of select="local-name()" />: <xsl:value-of select="text()" />
+      </td>
+    </tr>
+  </xsl:template>
+
+  <!-- things we've already explicitly taken care of -->
+  <xsl:template match="solr/schema"    mode="header" />
+  <xsl:template match="solr/core"      mode="header" />
+  <xsl:template match="solr/host"      mode="header" />
+  <xsl:template match="solr/now"       mode="header" />
+  <xsl:template match="solr/start"     mode="header" />
+  <xsl:template match="solr/solr-info" mode="header" />
+
+  <xsl:template match="solr/solr-info" mode="main">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/*">
+    <br />
+    <xsl:apply-templates select="." mode="sub-header" />
+    <table>
+        <tr>
+          <td align="right">
+            &#xa0;
+          </td>
+          <td>
+          </td>
+        </tr>
+        <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CORE" mode="sub-header">
+    <a name="core"><h2>Core</h2></a>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/CACHE" mode="sub-header">
+    <a name="cache"><h2>Cache</h2></a>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/QUERYHANDLER" mode="sub-header">
+    <a name="query"><h2>Query Handlers</h2></a>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/UPDATEHANDLER" mode="sub-header">
+    <a name="update"><h2>Update Handlers</h2></a>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/HIGHLIGHTING" mode="sub-header">
+    <a name="highlight"><h2>Highlighting</h2></a>
+  </xsl:template>
+
+  <!-- catch all for new types of plugins -->
+  <xsl:template match="solr/solr-info/*" mode="sub-header" priority="-10">
+    <h2><xsl:value-of select="local-name()"/></h2>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/OTHER" mode="sub-header">
+    <a name="other"><h2>Other</h2></a>
+  </xsl:template>
+
+  <xsl:template match="solr/solr-info/*/entry">
+        <tr>
+          <td align="right">
+            <strong>name:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="name"/>&#xa0;</tt>
+          </td>
+        </tr>
+        <tr>
+          <td align="right">
+            <strong>class:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="class"/>&#xa0;</tt>
+          </td>
+        </tr>
+        <tr>
+          <td align="right">
+            <strong>version:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="version"/>&#xa0;</tt>
+          </td>
+        </tr>
+        <tr>
+          <td align="right">
+            <strong>description:&#xa0;</strong>
+          </td>
+          <td>
+            <tt><xsl:value-of select="description"/>&#xa0;</tt>
+          </td>
+        </tr>
+        <tr>
+          <td align="right">
+            <strong>stats:&#xa0;</strong>
+          </td>
+          <td>
+            <xsl:for-each select="stats/stat[@name]">
+              <xsl:value-of select="@name"/>
+              <xsl:text> : </xsl:text>
+              <xsl:variable name="name" select="@name" />
+              <xsl:value-of select="." /><br />
+            </xsl:for-each>
+          </td>
+        </tr>
+        <tr>
+          <td align="right">
+          </td>
+          <td>
+          </td>
+        </tr>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/tabular.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/tabular.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/tabular.xsl	(revision 2882)
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id: tabular.xsl 728842 2008-12-23 01:45:23Z koji $ -->
+<!-- $URL: https://svn.apache.org/repos/asf/lucene/solr/branches/branch-1.4/src/webapp/web/admin/tabular.xsl $ -->
+
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+
+  <xsl:output
+    method="html"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    indent="yes"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+        <link rel="icon" href="favicon.ico" type="image/ico"></link>
+        <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title>SOLR Search Results</title>
+      </head>
+      <body>
+        <a href=".">
+           <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR">
+           </img>
+        </a>
+        <h1>SOLR Search Results</h1>
+          <br clear="all" />
+        <xsl:apply-templates/>
+        <br /><br />
+        <a href=".">Return to Admin Page</a>
+      </body>
+    </html>
+  </xsl:template>
+
+
+  <xsl:template match="responseHeader">
+    <table name="responseHeader">
+      <xsl:apply-templates/>
+    </table>
+  </xsl:template>
+
+
+  <xsl:template match="status">
+    <tr>
+      <td name="responseHeader"><strong>Status:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of></td>
+    </tr>
+  </xsl:template>
+
+
+  <xsl:template match="numFields">
+    <tr>
+      <td name="responseHeader"><strong>Number of Fields:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of></td>
+    </tr>
+  </xsl:template>
+
+
+  <xsl:template match="numRecords">
+    <tr>
+      <td name="responseHeader"><strong>Records Returned:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of></td>
+    </tr>
+  </xsl:template>
+
+
+  <xsl:template match="numFound">
+    <tr>
+      <td name="responseHeader"><strong>Records Found:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of></td>
+    </tr>
+  </xsl:template>
+
+
+  <xsl:template match="QTime">
+    <tr>
+      <td name="responseHeader"><strong>Query time:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of>(ms)</td>
+    </tr>
+  </xsl:template>
+
+  <!-- YCS.. match everything.  How to match only what is not
+       matched above???
+    -->
+  <xsl:template match="responseHeader/*">
+    <tr>
+      <td name="responseHeader"><strong><xsl:value-of select="name(.)"></xsl:value-of>:&#xa0;</strong></td>
+      <td><xsl:value-of select="."></xsl:value-of></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="responseBody">
+    <br></br><br></br>
+    <table border="2">
+
+      <!-- table headers -->
+      <tr>
+        <xsl:for-each select="record[1]/field">
+          <th><xsl:value-of select="name"></xsl:value-of></th>
+        </xsl:for-each>
+      </tr>
+
+      <!-- table rows -->
+      <xsl:for-each select="record">
+        <tr>
+          <xsl:for-each select="field">
+            <td><xsl:value-of select="value"></xsl:value-of>&#xa0;</td>
+          </xsl:for-each>
+        </tr>
+      </xsl:for-each>
+
+    </table>
+
+
+  </xsl:template>
+
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.jsp	(revision 2882)
@@ -0,0 +1,110 @@
+<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page import="org.apache.solr.core.SolrCore,
+                 java.lang.management.ManagementFactory,
+                 java.lang.management.ThreadMXBean,
+                 java.lang.management.ThreadInfo,
+                 java.io.IOException,
+                 org.apache.solr.common.util.XML"%>
+<%@include file="_info.jsp" %>
+
+
+<?xml-stylesheet type="text/xsl" href="threaddump.xsl"?>
+<%!
+  static ThreadMXBean tmbean = ManagementFactory.getThreadMXBean();
+%>
+<solr>
+  <core><%= collectionName %></core>
+  <system>
+  <jvm>
+    <version><%=System.getProperty("java.vm.version")%></version>
+    <name><%=System.getProperty("java.vm.name")%></name>
+  </jvm>
+  <threadCount>
+    <current><%=tmbean.getThreadCount()%></current>
+    <peak><%=tmbean.getPeakThreadCount()%></peak>
+    <daemon><%=tmbean.getDaemonThreadCount()%></daemon>
+  </threadCount>
+<%
+  long[] tids;
+  ThreadInfo[] tinfos;
+  tids = tmbean.findMonitorDeadlockedThreads();
+  if (tids != null) {
+      out.println("  <deadlocks>");
+      tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
+      for (ThreadInfo ti : tinfos) {
+          printThreadInfo(ti, out);
+      }
+      out.println("  </deadlocks>");
+  }
+%>
+<%
+  tids = tmbean.getAllThreadIds();
+  tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
+  out.println("  <threadDump>");
+  for (ThreadInfo ti : tinfos) {
+     printThreadInfo(ti, out);
+  }
+  out.println("  </threadDump>");
+%>
+  </system>
+</solr>
+
+<%!
+  static void printThreadInfo(ThreadInfo ti, JspWriter out) throws IOException {
+      long tid = ti.getThreadId();
+      out.println("    <thread>");
+      out.println("      <id>" + tid + "</id>");
+      out.print("      <name>");
+      XML.escapeCharData(ti.getThreadName(), out);
+      out.println("</name>");
+      out.println("      <state>" + ti.getThreadState() + "</state>");
+      if (ti.getLockName() != null) {
+          out.println("      <lock>" + ti.getLockName() + "</lock>");
+      }
+      if (ti.isSuspended()) {
+          out.println("      <suspended/>");
+      }
+      if (ti.isInNative()) {
+          out.println("      <inNative/>");
+      }
+      if (tmbean.isThreadCpuTimeSupported()) {
+          out.println("      <cpuTime>" + formatNanos(tmbean.getThreadCpuTime(tid)) + "</cpuTime>");
+          out.println("      <userTime>" + formatNanos(tmbean.getThreadUserTime(tid)) + "</userTime>");
+      }
+
+      if (ti.getLockOwnerName() != null) {
+          out.println("      <owner>");
+          out.println("        <name>" + ti.getLockOwnerName() + "</name>");
+          out.println("        <id>" + ti.getLockOwnerId() + "</id>");
+          out.println("      </owner>");
+      }
+      out.println("      <stackTrace>");
+      for (StackTraceElement ste : ti.getStackTrace()) {
+          out.print("        <line>");
+          XML.escapeCharData("at " + ste.toString(), out);
+          out.println("        </line>");
+      }
+      out.println("      </stackTrace>");
+      out.println("    </thread>");
+  }
+
+  static String formatNanos(long ns) {
+      return String.format("%.4fms", ns / (double) 1000000);
+  }
+%>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.xsl
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.xsl	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/admin/threaddump.xsl	(revision 2882)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<!-- $URL$ -->
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output
+    method="html"
+    indent="yes"
+    encoding="utf-8"
+    media-type="text/html; charset=UTF-8"
+    doctype-public="-//W3C//DTD HTML 4.01//EN"
+    doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
+        <link rel="icon" href="favicon.ico" type="image/ico"></link>
+        <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+        <title>SOLR Info</title>
+      </head>
+      <body>
+        <a href=".">
+          <img border="0" align="right" height="78" width="142" src="solr_small.png" alt="SOLR"/>
+        </a>
+        <h1>Solr Admin (<xsl:value-of select="solr/meta/collection" />)</h1>
+        <h2>Thread Dump</h2>
+        <div style="margin-top: 1em;">
+          <table>
+            <xsl:apply-templates/>
+          </table>
+          <a href=".">Return to Admin Page</a>
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:include href="meta.xsl"/>
+
+  <xsl:template match="solr/system/jvm">
+    <tr>
+      <td><xsl:value-of select="name"/> <xsl:value-of select="version"/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="solr/system/threadCount">
+    <tr>
+      <td>
+        Thread Count:
+        current=<xsl:value-of select="current"/>,
+        peak=<xsl:value-of select="peak"/>,
+        daemon=<xsl:value-of select="daemon"/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="solr/system/threadDump">
+    <div>Full Thread Dump:</div>
+    <xsl:for-each select="thread">
+      <!-- OG: TODO: add suspended/native conditionals -->
+      <tr>
+        <td style="margin-left: 1em; font-weight: bold;">
+          '<xsl:value-of select="name"/>' 
+          Id=<xsl:value-of select="id"/>, 
+          <xsl:value-of select="state"/> 
+          on lock=<xsl:value-of select="lock"/>, 
+          total cpu time=<xsl:value-of select="cpuTime"/> 
+          user time=<xsl:value-of select="userTime"/>
+        </td>
+      </tr>
+      <xsl:apply-templates select="stackTrace"/>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="stackTrace">
+    <tr>
+      <td style="margin-left: 1em;">
+        <xsl:for-each select="line">
+          <xsl:value-of select="."/><br/>
+        </xsl:for-each>
+      </td>
+    </tr>
+  </xsl:template>
+
+</xsl:stylesheet>
Index: /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/index.jsp
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/index.jsp	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_solr/src/main/webapp/index.jsp	(revision 2882)
@@ -0,0 +1,42 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="solr-admin.css">
+<link rel="icon" href="favicon.ico" type="image/ico"></link>
+<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
+<title>Welcome to Solr</title>
+</head>
+
+<body>
+<h1>Welcome to Solr!</h1>
+<a href="."><img border="0" align="right" height="78" width="142" src="admin/solr_small.png" alt="Solr"/></a>
+
+<% 
+  org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
+  if( cores != null
+   && cores.getCores().size() > 0 // HACK! check that we have valid names...
+   && cores.getCores().iterator().next().getName().length() != 0 ) { 
+    for( org.apache.solr.core.SolrCore core : cores.getCores() ) {%>
+<a href="<%= core.getName() %>/admin/">Admin <%= core.getName() %></a><br/>
+<% }} else { %>
+<a href="admin/">Solr Admin</a>
+<% } %>
+
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/pom.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/pom.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/pom.xml	(revision 2882)
@@ -0,0 +1,175 @@
+<?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>
+        <artifactId>vlo_parent</artifactId>
+        <groupId>eu.clarin.cmdi</groupId>
+        <version>2.13</version>
+    </parent>
+
+    <groupId>eu.clarin.cmdi</groupId>
+    
+    <artifactId>vlo_web_app</artifactId>
+    
+    <version>2.13</version>
+    
+    <packaging>war</packaging>
+
+    <name>vlo_web_app</name>
+
+    <properties>
+        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <version>6.1.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>eu.clarin.cmdi</groupId>
+            <artifactId>vlo</artifactId>
+            <version>2.13</version>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>javax</groupId>
+            <artifactId>javaee-web-api</artifactId>
+            <version>6.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.10</version>
+            <scope>test</scope>
+            <type>jar</type>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <excludes>
+                    <exclude>**/*.java</exclude> <!-- java not needed in the package -->
+                </excludes>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.2</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                    <compilerArguments>
+                        <endorseddirs>${endorsed.dir}</endorseddirs>
+                    </compilerArguments>
+                </configuration>
+            </plugin>
+            
+            
+            <plugin>
+                <!-- add the remote resources plugin to obtain the cmdi2xhtml.xml
+                     file from the vlo_importer module. For more information
+                     on this plugin, please refer the Apache Maven Project website
+                -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-remote-resources-plugin</artifactId>
+                <version>1.4</version>
+                <configuration>
+                    <resourceBundles>
+                        <resourceBundle>eu.clarin.cmdi:vlo:${project.version}</resourceBundle>
+                    </resourceBundles>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>process</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.1.1</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    
+                    <!-- Add the cmdi2xhtml file from the vlo_importer module
+                         to the web application archive file. Please note that
+                         the file will only be included in the archive: the file
+                         will not show up in the web application module in the
+                         Netbeans IDE.
+                    -->
+                    
+                    <srcFiles>
+                        <srcFile>${project.build.directory}/src/main/resources/cmdi2xhtml.xsl</srcFile>
+                    </srcFiles>
+                </configuration>
+            </plugin>
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${endorsed.dir}</outputDirectory>
+                            <silent>true</silent>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>javax</groupId>
+                                    <artifactId>javaee-endorsed-api</artifactId>
+                                    <version>6.0</version>
+                                    <type>jar</type>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/buildwar.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assemblyJ</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        
+    </build>
+</project>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/assembly/buildwar.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/assembly/buildwar.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/assembly/buildwar.xml	(revision 2882)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<assembly>
+    <id>deployment</id>
+    <formats>
+        <format>dir</format>
+    </formats>
+    
+    <fileSets>
+        <fileSet>
+            <directory>
+                src/main/webapp                
+            </directory>
+            <includes>
+                <include>**/*.*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
+    
+    <files>
+        <file>
+            <source>${basedir}/target/${artifactId}-${version}.war</source>
+            <destName>${artifactId}-${version}.war</destName>
+        </file>
+    </files>
+</assembly>
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java	(revision 2882)
@@ -0,0 +1,116 @@
+package eu.clarin.cmdi.vlo;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import eu.clarin.cmdi.vlo.config.VloContextConfig;
+import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
+import eu.clarin.cmdi.vlo.pages.FacetedSearchPage;
+import javax.servlet.ServletContext;
+import org.apache.wicket.protocol.http.WebApplication;
+
+/**
+ * {@literal VLO} web application.
+ *
+ * The web application class defines an object representing the VLO web
+ * application. 
+ * 
+ * Because the VloWebApplication class extends WebApplication, a class instance
+ * will reside inside a web server container. By running the Start class
+ * however, an instance of the application will reside outside a server
+ * container.
+ */
+public class VloWebApplication extends WebApplication {
+
+    private SearchResultsDao searchResults;
+    
+    /**
+     * Flag indicating whether or not the application object lives in a web
+     * server context.
+     */
+    boolean inContext;
+
+    /**
+     * Method that will be invoked when the application starts.
+     */
+    @Override
+    public void init() {
+
+        if (inContext) {
+            
+            // get the servlet's context
+            
+            ServletContext servletContext;
+            servletContext = this.getServletContext();
+            
+            /*
+             * Send the application context to the configuration object to
+             * enable it to read an external {@literal VloConfig.xml}
+             * configuration file.
+             */
+            
+            VloContextConfig.switchToExternalConfig(servletContext);
+        }
+
+        // start the application
+
+        searchResults = new SearchResultsDao();
+    }
+
+    /**
+     * Web application constructor.
+     *
+     * Create an application instance configured to be living inside a web
+     * server container.
+     */
+    public VloWebApplication() {
+
+        /*
+         * Read the application's packaged configuration. 
+         * 
+         * Because on instantiation a web application cannot said to be living 
+         * in a web server context, parameters defined in the context can only 
+         * be added to the configuration later, in this case: when the {@literal
+         * init()} method will be invoked.
+         */
+        
+        VloConfig.readPackagedConfig();
+
+        // let the {@literal init()} method know that there will be a context
+
+        inContext = true;  
+    }
+
+    /**
+     * Web application constructor.
+     *
+     * Allows for the creation of an application instance that does not rely on
+     * a web server context. When send the message 'false', this constructor
+     * will create an object that will not look for an external configuration
+     * file; it will exclusively rely on the packaged configuration. Typically,
+     * the application's tests will send false to the application constructor.
+     * 
+     * @param inContext If and only if this parameter equals true. later on, the
+     * {@literal init} method will try to determine the web server's container 
+     * context so that, if it is defined in it, an external configuration can be
+     * switched to. 
+     */
+    public VloWebApplication(Boolean inContext) {
+
+        // remember that the application does not live in a web server context
+        
+        this.inContext = inContext;
+
+        searchResults = new SearchResultsDao();
+    }
+
+    /**
+     * @see org.apache.wicket.Application#getHomePage()
+     */
+    @Override
+    public Class<FacetedSearchPage> getHomePage() {
+        return FacetedSearchPage.class;
+    }
+
+    public SearchResultsDao getSearchResultsDao() {
+        return searchResults;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.properties	(revision 2882)
@@ -0,0 +1,28 @@
+# Definition of message text. Please refer to the eu.clarin.cmdi.vlo.Resources
+# file for a defintion the keys to the values defined here.
+basePage.image.alt=Click here to reset the search
+backToResult=back to results
+description=description
+facetedBrowserResources=Faceted Browser Resources
+field=Field
+more=more
+name=name
+next=>
+noResourceFound=No Resources found
+openInOriginalContext=open in original context
+originalContextNotAvailable=no original context available
+prev=<
+quickNavTo=Quick navigation to
+resources=Resources
+results=Results
+resultNotFound=Result could not be found
+search=search
+searchPage=Search Page
+subcategoriesIn=Subcategories in
+value=Value
+VLO_home=VLO Home
+youWillBeRedirectedTo=You will be redirected to the
+landingPage=Landing page
+landingPages= Landing pages
+searchPage=Search page
+searchPages= Search pages
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/AutoCompleteDao.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/AutoCompleteDao.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/AutoCompleteDao.java	(revision 2882)
@@ -0,0 +1,43 @@
+package eu.clarin.cmdi.vlo.dao;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.client.solrj.response.SpellCheckResponse.Suggestion;
+
+/**
+ * DAO that delivers suggestions for incomplete terms (autocomplete function)
+ * 
+ * @author Thomas Eckart
+ *
+ */
+public class AutoCompleteDao extends SolrDao {
+	
+	/**
+	 * Returns list of suggestions for incomplete input (used for autocomplete function)
+	 * @param input user input
+	 * @return list of suggestions
+	 */
+	public List<String> getChoices(String input) {
+		List<String> choices = new ArrayList<String>();
+		
+		SolrQuery query = new SolrQuery();
+		query.setQuery(input.toLowerCase());
+		query.setQueryType("/suggest");
+		QueryResponse response = fireQuery(query);
+		if(response.getSpellCheckResponse() != null) {
+			List<Suggestion> suggestions = response.getSpellCheckResponse().getSuggestions();
+			if(suggestions.size() > 0) {
+				Iterator<String> iter = suggestions.get(0).getAlternatives().iterator();
+				while(iter.hasNext()) {
+					choices.add(iter.next());
+				}
+			}
+		}
+		
+		return choices;
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/DaoLocator.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/DaoLocator.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/DaoLocator.java	(revision 2882)
@@ -0,0 +1,14 @@
+package eu.clarin.cmdi.vlo.dao;
+
+import eu.clarin.cmdi.vlo.VloWebApplication;
+import org.apache.wicket.RequestCycle;
+
+public final class DaoLocator {
+
+    public static SearchResultsDao getSearchResultsDao()
+    {
+        VloWebApplication app = (VloWebApplication)RequestCycle.get().getApplication();
+        return app.getSearchResultsDao();
+    }
+    
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SearchResultsDao.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SearchResultsDao.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SearchResultsDao.java	(revision 2882)
@@ -0,0 +1,48 @@
+package eu.clarin.cmdi.vlo.dao;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.common.SolrDocumentList;
+
+public class SearchResultsDao extends SolrDao {
+
+    //private final static Logger LOG = LoggerFactory.getLogger(SearchResultsDao.class);
+
+    private QueryResponse response;
+
+    public SearchResultsDao() {
+	super();
+    }
+
+    public SolrDocumentList getResults(SolrQuery query) {
+	setDefaultSortField(query);
+	response = fireQuery(query);
+	SolrDocumentList results = response.getResults();
+	return results;
+    }
+
+    public List<FacetField> getFacets(SolrQuery query) {
+	response = fireQuery(query);
+	return response.getFacetFields();
+    }
+
+    public SolrDocumentList getDocIdList(SolrQuery query) {
+	setDefaultSortField(query);
+	query.setFields(FacetConstants.FIELD_ID);
+	query.setFacet(false);
+	query.setStart(0);
+	query.setRows(Integer.MAX_VALUE);
+	QueryResponse queryResponse = fireQuery(query);
+	return queryResponse.getResults();
+    }
+
+    private void setDefaultSortField(SolrQuery query) {
+	if (query.getSortField() == null) {
+	    query.setSortField(FacetConstants.FIELD_NAME, SolrQuery.ORDER.asc);
+	}
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SolrDao.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SolrDao.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/dao/SolrDao.java	(revision 2882)
@@ -0,0 +1,57 @@
+package eu.clarin.cmdi.vlo.dao;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.net.MalformedURLException;
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.client.solrj.util.ClientUtils;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SolrDao {
+
+    private final static Logger LOG = LoggerFactory.getLogger(SolrDao.class);
+    private final CommonsHttpSolrServer solrServer;
+
+    public SolrDao() {
+        String solrUrl;
+        solrUrl = VloConfig.getSolrUrl();
+        try {
+            solrServer = new CommonsHttpSolrServer(solrUrl);
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("URL: " + solrUrl, e);
+        }
+    }
+
+    protected CommonsHttpSolrServer getSolrserver() {
+        return solrServer;
+    }
+
+    protected QueryResponse fireQuery(SolrQuery query) {
+        try {
+            return solrServer.query(query);
+        } catch (SolrServerException e) {
+            LOG.error("Error getting data:", e);
+            throw new RuntimeException(e);
+        }
+    }
+
+    public SolrDocument getSolrDocument(String docId) {
+        SolrDocument result = null;
+        SolrQuery query = new SolrQuery();
+        query.setQuery("id:" + ClientUtils.escapeQueryChars(docId));
+        query.setFields("*");
+        SolrDocumentList docs = fireQuery(query).getResults();
+        if (docs.getNumFound() > 1) {
+            LOG.error("Error: found multiple documents for id (will return first one): " + docId + " \nDocuments found: " + docs);
+            result = docs.get(0);
+        } else if (docs.getNumFound() == 1) {
+            result = docs.get(0);
+        }
+        return result;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.html	(revision 2882)
@@ -0,0 +1,28 @@
+<wicket:panel>
+    <div class="alphaNavigation">
+        <ul>
+            <li><wicket:message key="quickNavTo" >[quick navigation]</wicket:message>: </li>
+            <li wicket:id="alphabeticalView">
+                <a wicket:id="refLink"><span wicket:id="character">[character]</span></a>
+            </li>
+        </ul>
+    </div>
+    <br>
+    <br>
+    <div class="facetBody">
+        <div class="facetLeftPanel">
+            <div class="sortedFacet" wicket:id="sortedDataViewLeft">
+                <div wicket:id="anchorPanel"/>
+                <div wicket:id="valueList"/>
+            </div>
+        </div>
+        <div class="facetRightPanel">
+            <div class="sortedFacet" wicket:id="sortedDataViewRight">
+                <div wicket:id="anchorPanel"/>
+                <div wicket:id="valueList"/>
+            </div>
+        </div>
+    </div>
+    <br>
+    <br>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AlphabeticalPanel.java	(revision 2882)
@@ -0,0 +1,143 @@
+package eu.clarin.cmdi.vlo.pages;
+
+/**
+ *
+ * @author paucas
+ */
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.markup.repeater.RepeatingView;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.model.Model;
+
+public class AlphabeticalPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+    private final List<String> foundCharacters = new LinkedList<String>();
+    private final Integer facetMinOccurs;
+
+    public AlphabeticalPanel(String id, IDataProvider data, final SearchPageQuery query, Integer facetMinOccurs) {
+        super(id);
+        this.facetMinOccurs = facetMinOccurs;
+
+        RepeatingView sortedDataViewLeft = new RepeatingView("sortedDataViewLeft");
+        RepeatingView sortedDataViewRight = new RepeatingView("sortedDataViewRight");
+        TreeMap<Character, List<Count>> dataMap = transposeToMap(data);
+        int numberOfKeys = 0;
+        for (Entry entry : dataMap.entrySet()) {
+            if (numberOfKeys < dataMap.size() / 2) {
+                sortedDataViewLeft.add(categoryContainer(sortedDataViewLeft, entry, query));
+                numberOfKeys++;
+            } else {
+                sortedDataViewRight.add(categoryContainer(sortedDataViewRight, entry, query));
+            }
+        }
+
+        ListView<String> alphabeticalView = new ListView<String>("alphabeticalView", new Model((Serializable) foundCharacters)) {
+
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            protected void populateItem(ListItem<String> item) {
+                final String character = item.getModelObject();
+                ExternalLink link = new ExternalLink("refLink", "#" + character);
+                link.add(new Label("character", character));
+                item.add(link);
+            }
+        };
+        add(alphabeticalView);
+        add(sortedDataViewLeft);
+        add(sortedDataViewRight);
+    }
+
+    private WebMarkupContainer categoryContainer(RepeatingView parentView, Entry entry, SearchPageQuery query) {
+        WebMarkupContainer container = new WebMarkupContainer(parentView.newChildId());
+        Character charSet = (Character) entry.getKey();
+        if (Character.isLetter(charSet)) {
+            container.add(new AnchorPanel("anchorPanel", charSet.toString()));
+            foundCharacters.add(charSet.toString());
+        } else if (Character.isDigit(charSet) & !foundCharacters.contains("0...9")) {
+            container.add(new AnchorPanel("anchorPanel", "0...9"));
+            foundCharacters.add("0...9");
+        } else if (!Character.isLetterOrDigit(charSet) & !foundCharacters.contains("Other")) {
+            container.add(new AnchorPanel("anchorPanel", "Other"));
+            foundCharacters.add("Other");
+        }
+        RepeatingView charView = new RepeatingView("valueList");
+        List<Count> countList = (List<Count>) entry.getValue();
+        for (Count c : countList) {
+            charView.add(new FacetLinkPanel(charView.newChildId(), new Model<Count>(c), query));
+            container.add(charView);
+        }
+        return container;
+    }
+
+    /**
+     * 
+     * @param data
+     * @return
+     */
+    private TreeMap<Character, List<Count>> transposeToMap(IDataProvider data) {
+        TreeMap<Character, List<Count>> dataMap = new TreeMap<Character, List<Count>>(new CharGroupComparator());
+        Iterator<? extends Count> iter = data.iterator(0, data.size());
+        List<Count> numericalCount = new ArrayList<Count>();
+        List<Count> otherCount = new ArrayList<Count>();
+        while (iter.hasNext()) {
+            Count count = iter.next();
+            if(count.getCount() < facetMinOccurs)
+            	continue;
+            Character key = count.getName().trim().charAt(0);
+            if (Character.isDigit(key)) {
+                numericalCount.add(count);
+            } else if (!Character.isLetterOrDigit(key)) {
+                otherCount.add(count);
+            } else if (!dataMap.containsKey(key)) {
+                List<Count> countList = new ArrayList<Count>();
+                countList.add(count);
+                dataMap.put(Character.toUpperCase(key), countList);
+            } else {
+                dataMap.get(key).add(count);
+            }
+        }
+        if (!numericalCount.isEmpty()) {
+            dataMap.put('0', numericalCount);
+        }
+        if (!otherCount.isEmpty()) {
+            dataMap.put('!', otherCount);
+        }
+        return dataMap;
+    }
+
+    /**
+     *
+     */
+    private class CharGroupComparator implements Comparator<Character> {
+
+        @Override
+        public int compare(Character a, Character b) {
+            if (Character.isLetter(a) & !Character.isLetter(b)) {
+                return -1;
+            } else if (Character.isLetter(a) && Character.isLetter(b)) {
+                return a.toString().compareToIgnoreCase(b.toString());
+            } else if (Character.isDigit(a) & !Character.isLetterOrDigit(b)) {
+                return -1;
+            } else {
+                return 1;
+            }
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+    <div class ="anchorpanel"><a wicket:id="anchorName"></a><span wicket:id="anchorLabel">[anchorLabel]</span></div>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AnchorPanel.java	(revision 2882)
@@ -0,0 +1,24 @@
+package eu.clarin.cmdi.vlo.pages;
+
+/**
+ *
+ * @author paucas
+ */
+import org.apache.wicket.behavior.AttributeAppender;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
+class AnchorPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+
+    public AnchorPanel(String id, String value) {
+        super(id);
+        ExternalLink link = new ExternalLink("anchorName", value);
+        link.add(new AttributeAppender("name", new Model(value), ""));
+        add(link);
+        add(new Label("anchorLabel", value));
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AttributesComparator.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AttributesComparator.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/AttributesComparator.java	(revision 2882)
@@ -0,0 +1,36 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * Comparator that compares fixedValues based on the index in the list and falls back to String comparison otherwise.
+ * Example:
+ * fixedValues = "A", "Z"
+ * List to sort = "G", "A", "Z", "B"
+ * result = "A", "Z", "B", "G" 
+ *
+ */
+public class AttributesComparator implements Comparator<String> {
+    private final List<String> fixedValues;
+
+    public AttributesComparator(List<String> fixedValues) {
+        this.fixedValues = fixedValues;
+    }
+
+    public int compare(String s1, String s2) {
+        if (s1 == null) {
+            return 1;
+        }
+        if (s2 == null) {
+            return -1;
+        }
+        Integer pos1 = fixedValues.contains(s1) ? fixedValues.indexOf(s1) : Integer.MAX_VALUE;
+        Integer pos2 = fixedValues.contains(s2) ? fixedValues.indexOf(s2) : Integer.MAX_VALUE;
+        int result = pos1.compareTo(pos2);
+        if (result == 0) {
+            result = s1.compareTo(s2);
+        }
+        return result;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.html	(revision 2882)
@@ -0,0 +1,30 @@
+<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+    <head>
+        <link rel=stylesheet type="text/css" href="css/main.css">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <title>CLARIN Virtual Language Observatory - Resources</title>
+    </head>
+    <body>
+        <div class="top">
+            <div id="topleft">
+                <a href="#" wicket:id="homeLink"><img width="498" height="176" src="css/topleftvlo.gif" wicket:message="alt:basePage.image.alt,title:basePage.image.alt"></a>
+            </div>
+            <div id="topright">
+                <img width="526" height="176" alt="" src="css/toprightvlo.gif" usemap="#partnerLinks">
+                <map name="partnerLinks">
+                    <AREA SHAPE="rect" COORDS="114.00,65,167.50,104" HREF="http://www.clarin.eu" alt="clarin link"/>
+                    <AREA SHAPE="rect" COORDS="177.00,65,214,104" HREF="http://wals.info" alt="wals link"/>
+                    <AREA SHAPE="rect" COORDS="229,65,279,104" HREF="http://linguistlist.org/" alt="linguistlist link"/>
+                    <AREA SHAPE="rect" COORDS="290,65,320,104" HREF="http://www.elra.info/" alt="elra link"/>
+                    <AREA SHAPE="rect" COORDS="328,65,370,104" HREF="http://www.mpi.nl/dobes" alt="dobes link"/>
+                    <AREA SHAPE="rect" COORDS="379,65,428,104" HREF="http://www.dfki.de/web" alt="dfki link"/>
+                    <AREA SHAPE="rect" COORDS="434,65,484,104" HREF="http://www.delaman.org/" alt="deleman link"/>
+                </map>
+            </div>
+        </div>
+    <wicket:child />
+
+
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java	(revision 2882)
@@ -0,0 +1,15 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+
+public class BasePage extends WebPage {
+
+    public BasePage(PageParameters parameters) {
+        super(parameters);
+        
+        add(new BookmarkablePageLink("homeLink", FacetedSearchPage.class));
+    }
+    
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttribute.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttribute.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttribute.java	(revision 2882)
@@ -0,0 +1,36 @@
+/**
+ * 
+ */
+package eu.clarin.cmdi.vlo.pages;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+public class DocumentAttribute implements Serializable{
+
+    private static final long serialVersionUID = 1L;
+
+    private String field;
+    private String value = "";
+
+    public DocumentAttribute(String field, Collection<Object> values) {
+        this.field = field;
+        if (value != null) {
+            for (Object o : values) {
+                if (!value.isEmpty()) {
+                    this.value += ", ";
+                }
+                this.value += o.toString();
+            }
+        }
+    }
+
+    public String getField() {
+        return field;
+    }
+    
+    public String getValue() {
+        return value;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributeList.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributeList.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributeList.java	(revision 2882)
@@ -0,0 +1,48 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class DocumentAttributeList implements Iterator<DocumentAttribute> {
+
+    private final Map<String, Collection<Object>> fieldValueMap;
+    private Iterator<String> iterator;
+    private Comparator<String> attributesComparator = new AttributesComparator(Arrays.asList(FacetConstants.FIELD_NAME,
+            FacetConstants.FIELD_DESCRIPTION, FacetConstants.FIELD_LANGUAGE, FacetConstants.FIELD_COUNTRY, FacetConstants.FIELD_CONTINENT,
+            FacetConstants.FIELD_YEAR, FacetConstants.FIELD_ID));
+
+    public DocumentAttributeList(Map<String, Collection<Object>> map) {
+        this.fieldValueMap = map;
+        SortedSet<String> sorted = new TreeSet<String>(attributesComparator);
+        sorted.addAll(map.keySet());
+        this.iterator = sorted.iterator();
+    }
+
+    @Override
+    public boolean hasNext() {
+        return iterator.hasNext();
+    }
+
+    @Override
+    public DocumentAttribute next() {
+        String key = iterator.next();
+        return new DocumentAttribute(key, fieldValueMap.get(key));
+    }
+
+    @Override
+    public void remove() {
+        iterator.remove();
+    }
+
+    public int size() {
+        return fieldValueMap.size();
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributesDataProvider.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributesDataProvider.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentAttributesDataProvider.java	(revision 2882)
@@ -0,0 +1,66 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.solr.common.SolrDocument;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class DocumentAttributesDataProvider extends SortableDataProvider<DocumentAttribute> {
+    
+    private static final Set<String> IGNORE_FACETS = new HashSet<String>();
+    static {
+        IGNORE_FACETS.add(FacetConstants.FIELD_RESOURCE_TYPE);
+    }
+
+    private static final long serialVersionUID = 1L;
+
+    private transient DocumentAttributeList attributeList;
+
+    public DocumentAttributesDataProvider(SolrDocument solrDocument) {
+        if (solrDocument != null) {
+            Map<String, Collection<Object>> fieldMap = new HashMap<String, Collection<Object>>();
+            Map<String, Collection<Object>> fieldValuesMap = solrDocument.getFieldValuesMap();
+            for (String entry : fieldValuesMap.keySet()) {
+                if (!ignoreEntry(entry)) { //Filter out all '_' starting (internal) fields
+                    fieldMap.put(entry, fieldValuesMap.get(entry));
+                }
+            }
+            attributeList = new DocumentAttributeList(fieldMap);
+        } else {
+            attributeList = new DocumentAttributeList(Collections.singletonMap("Document not found", (Collection<Object>) null));
+        }
+    }
+
+    private boolean ignoreEntry(String entry) {
+//        if(entry.equals(FacetConstants.FIELD_COMPLETE_METADATA)){
+//            return false; // Do not ignore the "complete metadata" entry, even though it starts with a _
+//        }
+        return entry.startsWith("_") || IGNORE_FACETS.contains(entry);
+    }
+
+    @Override
+    public Iterator<? extends DocumentAttribute> iterator(int first, int count) {
+        return attributeList;
+    }
+
+    @Override
+    public IModel<DocumentAttribute> model(DocumentAttribute object) {
+        return new Model<DocumentAttribute>(object);
+    }
+
+    @Override
+    public int size() {
+        return attributeList.size();
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+    <a href="#" wicket:id="docLink"><span wicket:id="docLabel">[link]</span></a>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java	(revision 2882)
@@ -0,0 +1,29 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.solr.common.SolrDocument;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class DocumentLinkPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+
+    public DocumentLinkPanel(String id, IModel<SolrDocument> model, SearchPageQuery query) {
+        super(id, model);
+        SolrDocument doc = model.getObject();
+        BookmarkablePageLink<ShowResultPage> docLink = ShowResultPage.createBookMarkableLink("docLink", query, doc.getFieldValue(
+                FacetConstants.FIELD_ID).toString());
+        add(docLink);
+        Object nameValue = doc.getFirstValue(FacetConstants.FIELD_NAME);
+        String name = "<no name>";
+        if (nameValue != null) {
+            name = nameValue.toString();
+        }
+        docLink.add(new Label("docLabel", name));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.html	(revision 2882)
@@ -0,0 +1,19 @@
+<wicket:panel>
+    <table border="0" class="facet_facetOrigin" cellspacing="0" cellpadding="0" width="100%">
+        <tr>
+            <td class="facetbox"><span wicket:id="headerLabel" class="facet">[headerLabel]</span><span wicket:id="facetHeaderPanel"></span></td>
+        </tr>
+        <tr>
+            <td class="valuebox">
+                <table border="0" class="facetlink" cellspacing="0" cellpadding="0" width="100%">
+                    <tr valign="top">
+                        <td width="50%" class="column">
+                            <span wicket:id="facetList"> <span wicket:id="facetLinks"></span></span>
+                            <a href="#" wicket:id="showMore"><wicket:message key="more">[more]</wicket:message>...</a>
+                        </td>
+                    </tr>
+                </table>
+            </td>
+        </tr>
+    </table>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java	(revision 2882)
@@ -0,0 +1,123 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+public class FacetBoxPanel extends Panel {
+    private static final Set<String> IGNORABLE_VALUES = new HashSet<String>();
+    static {
+        IGNORABLE_VALUES.add("unknown");
+        IGNORABLE_VALUES.add("unspecified");
+    }
+    private static final int MAX_NR_OF_FACET_VALUES = 10;
+    private static final long serialVersionUID = 1L;
+    private Label label;
+    private FacetHeaderPanel facetHeaderPanel;
+    private FacetModel facetModel;
+    private int maxNrOfFacetValues;
+
+    public FacetBoxPanel(String id, IModel<FacetField> model) {
+        super(id, model);
+        setOutputMarkupId(true);
+        setMaxNrOfFacetValues(MAX_NR_OF_FACET_VALUES);
+    }
+    
+    @SuppressWarnings({"serial"})
+    public FacetBoxPanel create(final SearchPageQuery query) {
+        final FacetField facetField = (FacetField) getDefaultModelObject();
+        facetModel = new FacetModel(facetField);
+        facetModel.setSelectedValue(query.getSelectedValue(facetField));
+        label = new Label("headerLabel", facetField.getName());
+        add(label);
+        facetHeaderPanel = new FacetHeaderPanel("facetHeaderPanel", new Model<FacetModel>(facetModel), query);
+        if (facetModel.isSelected()) {
+            add(facetHeaderPanel);
+        } else {
+            add(new WebMarkupContainer("facetHeaderPanel"));
+        }
+        final boolean showMore = facetField.getValueCount() > maxNrOfFacetValues + 1;
+        List<Count> values = getFacetListForBox(facetField, showMore);
+        ListView<Count> facetList = new ListView<Count>("facetList", values) {
+            @Override
+            protected void populateItem(ListItem<Count> item) {
+                item.add(new FacetLinkPanel("facetLinks", item.getModel(), query));
+            }
+
+            @Override
+            public boolean isVisible() {
+                return !facetModel.isSelected();
+            }
+        };
+        add(facetList);
+        PageParameters pageParameters = query.getPageParameters();
+        pageParameters.add(ShowAllFacetValuesPage.SELECTED_FACET_PARAM, facetField.getName());
+        pageParameters.add(ShowAllFacetValuesPage.FACET_MIN_OCCURS, "1");
+        add(new BookmarkablePageLink("showMore", ShowAllFacetValuesPage.class, pageParameters) {
+
+            @Override
+			public boolean isVisible() {
+                return !facetModel.isSelected() && showMore;
+            }
+
+        });
+        return this;
+    }
+
+    List<Count> getFacetListForBox(final FacetField facetField, final boolean showMore) {
+        List<Count> allValues = facetField.getValues();
+        List<Count> values = new ArrayList<Count>();
+        if (showMore) {
+            if (facetField.getValueCount() == maxNrOfFacetValues || facetField.getValueCount() == maxNrOfFacetValues + 1) { //Show all values, the "more" link can be used as the extra facet
+                values = allValues;
+            } else {// make a sublist
+                //IGNORABLE_VALUES (like "unknown") are move to the back of the list and should only be shown when you click "more...", unless the list is too small then whe can just show them.
+                List<Count> ignorables = new ArrayList<Count>();
+                for (int i = 0; values.size() < maxNrOfFacetValues && i < allValues.size(); i++) {
+                    Count count = allValues.get(i);
+                    if (!IGNORABLE_VALUES.contains(count.getName().toLowerCase())) {
+                        values.add(count);
+                    } else {
+                        ignorables.add(count);
+                    }
+                }
+                int stillToAdd = maxNrOfFacetValues - values.size();
+                for (int i = 0; i < stillToAdd && i < ignorables.size(); i++) {
+                    values.add(ignorables.get(i));
+
+                }
+            }
+        } else { //show all values
+            values = allValues;
+        }
+        return values;
+    }
+
+    public void replaceHeader(boolean isSelected, String selectedValue) {
+        facetModel.setSelectedValue(selectedValue);
+        if (isSelected) {
+            label.replaceWith(facetHeaderPanel);
+        } else {
+            facetHeaderPanel.replaceWith(label);
+        }
+
+    }
+
+    void setMaxNrOfFacetValues(int maxNrOfFacetValues) {
+        this.maxNrOfFacetValues = maxNrOfFacetValues;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+	: <a wicket:id="allLink" href="#" class="barlink">all</a> &gt; <span wicket:id="headerLabelSelect" class="value sel">[selected]</span>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetHeaderPanel.java	(revision 2882)
@@ -0,0 +1,22 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+public class FacetHeaderPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+
+    public FacetHeaderPanel(String id, IModel<FacetModel> model, final SearchPageQuery query) {
+        super(id, model);
+        SearchPageQuery copy = query.getShallowCopy();
+        copy.removeFilterQuery(model.getObject().getFacetField());
+        PageParameters pageParameters = copy.getPageParameters();
+        add(new BookmarkablePageLink("allLink", FacetedSearchPage.class, pageParameters));
+        add(new Label("headerLabelSelect", model.getObject().getSelectedValue()));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+    <div class="facetLinkPanel"><a href="#" wicket:id="facetLink"><span wicket:id="facetLinkLabel">[facetLink]</span></a> (<span wicket:id="facetCount"/>)</div>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java	(revision 2882)
@@ -0,0 +1,28 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+
+public class FacetLinkPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+
+    public FacetLinkPanel(String id, IModel<Count> model, final SearchPageQuery query) {
+        super(id, model);
+
+        Count count = model.getObject();
+        SearchPageQuery q = query.getShallowCopy();
+        q.setFilterQuery(count);
+        PageParameters params = q.getPageParameters();
+        Link<Count> facetLink = new BookmarkablePageLink("facetLink", FacetedSearchPage.class, params);
+        facetLink.add(new Label("facetLinkLabel", model.getObject().getName()));
+        add(facetLink);
+        add(new Label("facetCount", "" + model.getObject().getCount()));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetModel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetModel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetModel.java	(revision 2882)
@@ -0,0 +1,33 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.io.Serializable;
+
+import org.apache.solr.client.solrj.response.FacetField;
+
+public class FacetModel implements Serializable {
+
+    private final FacetField facetField;
+    private static final long serialVersionUID = 1L;
+    private String selectedValue;
+
+    public FacetModel(FacetField facetField) {
+        this.facetField = facetField;
+    }
+
+    public FacetField getFacetField() {
+        return facetField;
+    }
+
+    public boolean isSelected() {
+        return selectedValue != null;
+    }
+
+    public void setSelectedValue(String selectedValue) {
+        this.selectedValue = selectedValue;
+    }
+
+    public String getSelectedValue() {
+        return selectedValue;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.html	(revision 2882)
@@ -0,0 +1,42 @@
+<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+    <head></head>
+    <body>
+    <wicket:extend>
+        <div class="middlegame">
+            <p />
+            <div border="0" class="opening" width="100%">
+                <form class="search" wicket:id="searchForm">
+                    <div class="homeLink"><a wicket:id="vloHomeLink"><wicket:message key="VLO_home"/></a> &gt;&gt; <a><wicket:message key="facetedBrowserResources"/></a></div>
+                    <div class="searchmodule">
+                        <input wicket:id="searchQuery" type="text">
+                        <button wicket:id="searchSubmit"><wicket:message key="search"/></button>
+                    </div>
+                </form>
+                <div class="tableBody">
+                    <table class="matrix" align="left">
+                        <tr wicket:id="facetColumns" valign="top">
+                            <td wicket:id="cols" width="50%" class="column">
+                                <p><span wicket:id="facetBox"></span>
+                                <p>
+                            </td>
+                        </tr>
+                    </table>
+                    <div>
+	                    <table wicket:id="searchResults" class="resulttable" cellpadding="0" cellspacing="0">
+	                        	[searchResultTable]
+	                    </table>
+	                    <div wicket:id="contentSearch">
+	                    	<br>
+	                    	<span>Search in this result set:</span>
+	                    	<br>
+	                    	<span wicket:id="contentSearchForm"></span>
+	                   	</div>
+                   	</div>
+                </div>
+            </div>
+        </div>
+        <br><br><br>
+    </wicket:extend>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 2882)
@@ -0,0 +1,172 @@
+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;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.solr.common.SolrDocument;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.data.GridView;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class FacetedSearchPage extends BasePage {
+    private static final long serialVersionUID = 1L;
+
+    private final SearchPageQuery query;
+    private final static AutoCompleteDao autoCompleteDao = new AutoCompleteDao();
+    
+    /**
+     * @param parameters Page parameters
+     * @throws SolrServerException
+     */
+    public FacetedSearchPage(final PageParameters parameters) {
+        super(parameters);
+        query = new SearchPageQuery(parameters);
+        addSearchBox();
+        addFacetColumns();
+        addSearchResults();
+        addSearchServiceForm();
+    }
+
+    @SuppressWarnings("serial")
+    private class SearchBoxForm extends Form<SearchPageQuery> {
+        private final AutoCompleteTextField<String> searchBox;
+
+		public SearchBoxForm(String id, SearchPageQuery query) {
+			super(id, new CompoundPropertyModel<SearchPageQuery>(query));
+			add(new ExternalLink("vloHomeLink", VloConfig.getVloHomeLink()));
+			searchBox = new AutoCompleteTextField<String>("searchQuery") {
+				@Override
+				protected Iterator<String> getChoices(String input) {
+					return autoCompleteDao.getChoices(input).iterator();
+				}
+			};
+            add(searchBox);
+            Button submit = new Button("searchSubmit");
+            add(submit);
+        }
+
+        @Override
+        protected void onSubmit() {
+            SearchPageQuery query = getModelObject();
+            PageParameters pageParameters = query.getPageParameters();
+            setResponsePage(FacetedSearchPage.class, pageParameters);
+        }
+    }
+
+    private void addSearchBox() {
+        add(new SearchBoxForm("searchForm", query));
+    }
+
+    @SuppressWarnings("serial")
+    private void addFacetColumns() {
+        GridView<FacetField> facetColumns = new GridView<FacetField>("facetColumns", new SolrFacetDataProvider(query.getSolrQuery()
+                .getCopy())) {
+            @Override
+            protected void populateItem(Item<FacetField> item) {
+                item.add(new FacetBoxPanel("facetBox", item.getModel()).create(query));
+            }
+
+            @Override
+            protected void populateEmptyItem(Item<FacetField> item) {
+                item.add(new Label("facetBox", ""));
+            }
+        };
+        facetColumns.setColumns(2);
+        add(facetColumns);
+    }
+
+    @SuppressWarnings("serial")
+    private void addSearchResults() {
+        List<IColumn<SolrDocument>> columns = new ArrayList<IColumn<SolrDocument>>();
+        columns.add(new AbstractColumn<SolrDocument>(new ResourceModel(Resources.NAME)) {
+            
+            @Override
+            public void populateItem(Item<ICellPopulator<SolrDocument>> cellItem, String componentId, IModel<SolrDocument> rowModel) {
+                cellItem.add(new DocumentLinkPanel(componentId, rowModel, query));
+            }
+        });
+        columns.add(new AbstractColumn<SolrDocument>(new ResourceModel(Resources.DESCRIPTION)) {
+
+            @Override
+            public void populateItem(Item<ICellPopulator<SolrDocument>> cellItem, String componentId, IModel<SolrDocument> rowModel) {
+        	String descriptionText = (String) rowModel.getObject().getFirstValue(FacetConstants.FIELD_DESCRIPTION);
+                cellItem.add(new TruncatedLabel(componentId, 100, descriptionText));
+                
+            }
+        });
+        AjaxFallbackDefaultDataTable<SolrDocument> searchResultList = new AjaxFallbackDefaultDataTable<SolrDocument>("searchResults", columns,
+                new SolrDocumentDataProvider(query.getSolrQuery().getCopy()), 10);
+
+        add(searchResultList);
+    }
+    
+	/**
+	 * Add contentSearch form (FCS)
+	 * @param solrDocument
+	 */
+	private void addSearchServiceForm() {
+		final WebMarkupContainer contentSearchContainer = new WebMarkupContainer("contentSearch");
+		add(contentSearchContainer);
+		
+		// get all documents with an entry for the FCS
+		SearchServiceDataProvider dataProvider = new SearchServiceDataProvider(query.getSolrQuery());
+		if(dataProvider.size() > 0 && dataProvider.size() <= 200) {	// at least one and not more than x records with FCS endpoint in result set?
+			try {
+				// building map (CQL endpoint -> List of resource IDs)
+				HashMap<String, List<String>> aggregationContextMap = new HashMap<String, List<String>>();				
+				
+				int offset = 0;
+				int fetchSize = 1000;
+				int totalResults = dataProvider.size();
+				while (offset < totalResults) {
+					Iterator<SolrDocument> iter = dataProvider.iterator(offset, fetchSize);
+					while(iter.hasNext()) {
+						SolrDocument document = iter.next();
+						String id = document.getFirstValue(FacetConstants.FIELD_ID).toString();
+						String fcsEndpoint = document.getFirstValue(FacetConstants.FIELD_SEARCH_SERVICE).toString();
+						if(aggregationContextMap.containsKey(fcsEndpoint)) {
+							aggregationContextMap.get(fcsEndpoint).add(id);
+						} else {
+							List<String> idArray = new ArrayList<String>();
+							idArray.add(id);
+							aggregationContextMap.put(fcsEndpoint, idArray);
+						}
+					}
+					
+					offset += fetchSize;
+				}
+
+				// add HTML form to container
+				Label contentSearchLabel = new Label("contentSearchForm", HtmlFormCreator.getContentSearchForm(aggregationContextMap));
+				contentSearchLabel.setEscapeModelStrings(false);
+				contentSearchContainer.add(contentSearchLabel);
+			} catch (UnsupportedEncodingException uee) {
+				contentSearchContainer.setVisible(false);
+			}
+		} else {
+			contentSearchContainer.setVisible(false);
+		}
+	}    
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/HtmlFormCreator.java	(revision 2882)
@@ -0,0 +1,48 @@
+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;
+
+/**
+ * Little helper class that creates HTML forms as String
+ * 
+ * @author Thomas Eckart
+ *
+ */
+public class HtmlFormCreator {
+	/**
+	 * Creates an HTML form for the content search (FCS).
+	 * @param aggregationContextMap Mapping CQL endpoint -> List of resource IDs
+	 * @return HTML content search form as String
+	 * @throws UnsupportedEncodingException
+	 */
+	public static String getContentSearchForm(Map<String, List<String>> aggregationContextMap) throws UnsupportedEncodingException {
+		JSONObject aggregationJson = new JSONObject();
+		Iterator<String> aggregationContextIter = aggregationContextMap.keySet().iterator();
+		while(aggregationContextIter.hasNext()) {
+			String endpoint = aggregationContextIter.next();
+			JSONArray idArray = new JSONArray();
+			for(String id : aggregationContextMap.get(endpoint)) {
+				idArray.add(id);
+			}
+			aggregationJson.put(endpoint, idArray);
+		}		
+		
+		String form = "<form method=\"post\" action=\""+VloConfig.getFederatedContentSearchUrl()+"\"> \n"
+				+ "<fieldset style=\"border:0px;\"> \n"
+				+ "\t  <label for=\"query\">CQL query:</label> \n"
+				+ "\t <input id=\"query\" type=\"text\" name=\"query\" size=\"30\" /> \n"
+				+ "\t <input type=\"hidden\" name=\"x-aggregation-context\" value=\'"+aggregationJson.toString(2)+"\' /> \n"
+				+ "\t <input type=\"hidden\" name=\"operation\" value=\"searchRetrieve\" /> \n"
+				+ "\t <input type=\"hidden\" name=\"version\" value=\"1.2\" /> \n"
+				+ "\t <input type=\"submit\" value=\"Send query\" /> \n"
+				+ "</fieldset> \n"
+				+ "</form> \n";
+		return form;	
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ImageResource.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ImageResource.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ImageResource.java	(revision 2882)
@@ -0,0 +1,23 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.Resource;
+
+public class ImageResource {
+
+    private final Resource resource;
+    private final String title;
+
+    public ImageResource(Resource resource, String title) {
+        this.resource = resource;
+        this.title = title;
+    }
+
+    public Resource getResource() {
+        return resource;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.html	(revision 2882)
@@ -0,0 +1,8 @@
+<!--
+keeloo: describe this
+-->
+
+<wicket:panel>
+    <a wicket:id="landingPageLink"><img wicket:id="landingPageImage"/><span wicket:id="landingPageLabel"/></a>  
+</wicket:panel>
+
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LandingPageLinkPanel.java	(revision 2882)
@@ -0,0 +1,57 @@
+
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.resource.ContextRelativeResource;
+
+/**
+ * Panel showing a landing page link. 
+ * 
+ * In the extension of the link panel class, this class adds a label text and 
+ * an icon that is specific for search page links
+ * 
+ * @author keeloo
+ */
+public class LandingPageLinkPanel extends LinkPanel {
+
+    private final static ImageResource LANDINGPAGE_ICON =
+            new ImageResource(new ContextRelativeResource(
+            "Images/Crystal_Clear_mimetype_readme.png"),
+            "Landing page");
+
+    /**
+     * Panel constructor. 
+     * 
+     * @param id Wicket mark up identifier
+     * @param resourceLink URL to pointing to the resource.
+     */
+    public LandingPageLinkPanel(String id, String resourceLink) {
+        // ...
+        super(id);
+        
+        // add the icon image
+        ImageResource imageResouce = LANDINGPAGE_ICON;
+        Image resourceImg = new Image("landingPageImage", imageResouce.getResource());
+        
+        // add the image's title
+        String title;
+        title = imageResouce.getTitle();
+        resourceImg.add(new SimpleAttributeModifier("title", title));
+        resourceImg.add(new SimpleAttributeModifier("alt", title));
+        
+        // ...
+        String href = getHref(resourceLink);
+        
+        // get the name associated with the link
+        String name = getNameFromLink(resourceLink);
+
+        // ... and add the link itself
+        ExternalLink link = new ExternalLink("landingPageLink", href);
+        link.add(resourceImg);
+        link.add(new Label("landingPageLabel", name));
+        add(link);
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/LinkPanel.java	(revision 2882)
@@ -0,0 +1,127 @@
+
+package eu.clarin.cmdi.vlo.pages;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 
+ * @author keeloo
+ */
+public class LinkPanel extends Panel {
+        
+    private final static String URN_NBN_RESOLVER_URL = "http://www.nbn-resolving.org/redirect/";
+
+    private final static Logger LOG = LoggerFactory.getLogger(ResourceLinkPanel.class);
+    
+    /**
+     *
+     */
+    public LinkPanel(String id) {
+        super(id);
+    }
+
+    /**
+     * Modifies resourceLink if necessary (adds support for different URN
+     * resolvers)
+     *
+     * @param resourceLink
+     * @return Modified resourceLink, if no modifications are necessary original
+     * parameter resourceLink is returned
+     */
+    public String getHref(String resourceLink) {
+        String result = resourceLink;
+        if (resourceLink != null) {
+            if (resourceLink.startsWith(FacetConstants.HANDLE_PREFIX)) {
+                String handle = resourceLink.substring(FacetConstants.HANDLE_PREFIX.length());
+                result = VloConfig.getHandleServerUrl() + handle;
+            } else if(resourceLink.startsWith(FacetConstants.URN_NBN_PREFIX)) {
+                result = URN_NBN_RESOLVER_URL+resourceLink;
+            }
+        }
+        return result;
+    }
+
+    // copied from ResourceLinkPanel
+    
+    protected String getNameFromLink(String resourceLink) {
+        String result = resourceLink;
+        // We ALWAYS backoff to the resourceLink as default thingy.
+
+        // HandleResolver does not work at the moment on the clarin server see http://trac.clarin.eu/ticket/136, Disabled it for the release.
+//      if (resourceLink != null) {
+//          if (resourceLink.startsWith(FacetConstants.HANDLE_PREFIX)) {
+//              try {
+//                  String handle = resourceLink.substring(FacetConstants.HANDLE_PREFIX.length());
+//                  HandleResolver handleResolver = new HandleResolver();
+//                  handleResolver.setTcpTimeout(5000);//5 secs, default is one minute
+//                  HandleValue values[] = handleResolver.resolveHandle(handle, new String[] { "URL" }, null);
+//
+//                  for (HandleValue handleValue : values) {
+//                      String url = handleValue.getDataAsString();
+//                      int index = url.lastIndexOf('/');
+//                      if (index != -1) {
+//                          String name = url.substring(index + 1).trim();
+//                          if (name.length() > 1) {
+//                              result = name + " (" + resourceLink + ")";
+//                          }
+//                          break;
+//                      }
+//                  }
+//              } catch (HandleException e) {
+//                  LOG.warn("Error trying to get the name of the handle", e);
+//              }
+//          }
+//      }
+
+        /** NOTE: We are trying a different approach from the "official" one.
+         * Will use the REST interface of hdl.handle.net.
+         */
+        if (resourceLink != null) {
+            if (resourceLink.startsWith(FacetConstants.HANDLE_PREFIX)) {
+                String handle = resourceLink.substring(FacetConstants.HANDLE_PREFIX.length());
+                resourceLink = VloConfig.getHandleServerUrl() + handle;
+                // Now points to something like http://hdl.handle.net/1839/00-0000-0000-0004-3357-F
+                HttpURLConnection con = null;
+                URL u;
+                try{
+                    u = new URL(resourceLink);
+                    System.out.println(resourceLink);
+                    URLConnection c = u.openConnection();
+                    if(c instanceof HttpURLConnection){
+                        con = (HttpURLConnection) c;
+                    }
+                    if(con != null){
+                        if(con.getResponseCode() == HttpURLConnection.HTTP_MOVED_PERM ||
+                                con.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP ||
+                                con.getResponseCode() == HttpURLConnection.HTTP_SEE_OTHER){
+                           result = con.getURL().toString();
+/*                            for (Map.Entry<String, List<String>> header : con.getHeaderFields().entrySet()) {
+                                if(header != null && header.getKey() != null){
+                                    System.out.println("XXX:" + header.getKey());
+                                    System.out.println(header.getValue().get(0));
+                                    if(header.getKey().equals("Location")){
+                                        result = header.getValue().get(0);
+                                    }
+                                }
+                            }*/
+                        }
+                    }
+                } catch (MalformedURLException e) {
+                    LOG.warn("Error trying to get the name of the handle", e);
+                } catch (IOException e) {
+                    LOG.warn("Error trying to get the name of the handle", e);
+                }
+            }
+        }
+        return result;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+     <a wicket:id="prev"><wicket:message key="prev" /></a>&nbsp; <span wicket:id="resultcount"></span> &nbsp;<a wicket:id="next"><wicket:message key="next" /></a>
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/PrevNextHeaderPanel.java	(revision 2882)
@@ -0,0 +1,84 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.panel.Panel;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+
+public class PrevNextHeaderPanel extends Panel {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Creates Prev/Next Header can take a while to generate
+     * @param id
+     * @param docId
+     * @param query
+     */
+    public PrevNextHeaderPanel(String id, String docId, SearchPageQuery query) {
+        super(id);
+        addPrevNextLabels(docId, query);
+    }
+
+    /**
+     * Constructor that creates dummy prev/next label, which can be used to load before the real labels are calculated.
+     * @param id
+     */
+    public PrevNextHeaderPanel(String id) {
+        super(id);
+        addDummyPrev();
+        addDummyResultCount();
+        addDummyNext();
+    }
+
+    private void addDummyPrev() {
+        add(new WebMarkupContainer("prev").setVisible(false));
+    }
+
+    private void addDummyNext() {
+        add(new WebMarkupContainer("next").setVisible(false));
+    }
+    
+    private void addDummyResultCount() {
+    	add(new WebMarkupContainer("resultcount"));
+    }
+
+    private void addPrevNextLabels(String docId, SearchPageQuery query) {
+        int index = -1;
+        //Very inefficient query, possibly gets all the docId's (when no facets are selected) just to create the next/prev labels. 
+        //Cannot see another way of doing this because the result page can be bookmarked and therefor the list needs to be refetched. 
+        //If some facets are selected the list of id's is already a lot smaller and performance is not an issue. I lazy loaded the panel just to everything a bit more snappy.
+        SolrDocumentList docIdList = DaoLocator.getSearchResultsDao().getDocIdList(query.getSolrQuery().getCopy());  
+
+        for (int i = 0; i < docIdList.size(); i++) {
+            SolrDocument doc = docIdList.get(i);
+            if (doc.getFieldValue(FacetConstants.FIELD_ID).equals(docId)) {
+                index = i;
+                break;
+            }
+        }
+        if (index > 0) {
+            String prevDocId = docIdList.get(index - 1).getFieldValue(FacetConstants.FIELD_ID).toString();
+            BookmarkablePageLink<ShowResultPage> prev = ShowResultPage.createBookMarkableLink("prev", query, prevDocId);
+            add(prev);
+        } else {
+            addDummyPrev();
+        }
+        
+        add(new Label("resultcount", "Record "+(index+1)+" out of "+docIdList.size()));
+        
+        if (index < (docIdList.size() - 1) && index >= 0) {
+            String prevDocId = docIdList.get(index + 1).getFieldValue(FacetConstants.FIELD_ID).toString();
+            BookmarkablePageLink<ShowResultPage> next = ShowResultPage.createBookMarkableLink("next", query, prevDocId);
+            add(next);
+        } else {
+            addDummyNext();
+        }
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.html	(revision 2882)
@@ -0,0 +1,3 @@
+<wicket:panel>
+     <a wicket:id="resourceLink"><img wicket:id="resourceImage"/><span wicket:id="resourceLabel"/></a>  
+</wicket:panel>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanel.java	(revision 2882)
@@ -0,0 +1,83 @@
+
+package eu.clarin.cmdi.vlo.pages;
+
+import eu.clarin.cmdi.vlo.CommonUtils;
+import eu.clarin.cmdi.vlo.FacetConstants;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.resource.ContextRelativeResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Panel showing a resource link. 
+ * 
+ * In the extension of the link panel class, this class adds a label text and 
+ * an icon that is specific for search page links.
+ */
+public class ResourceLinkPanel extends LinkPanel {
+
+    private final static Logger LOG = 
+            LoggerFactory.getLogger(ResourceLinkPanel.class);
+
+    private static final long serialVersionUID = 1L;
+
+    private final static String URN_NBN_RESOLVER_URL = 
+            "http://www.nbn-resolving.org/redirect/";
+
+    private final static ImageResource ANNOTATION = new ImageResource(new 
+            ContextRelativeResource("Images/text-x-log.png"), "Annotation file");
+    private final static ImageResource AUDIO = new ImageResource(new 
+            ContextRelativeResource("Images/audio-x-generic.png"), "Audio file");
+    private final static ImageResource IMAGE = new ImageResource(new 
+            ContextRelativeResource("Images/image-x-generic.png"), "Image file");
+    private final static ImageResource TEXT = new  ImageResource(new 
+            ContextRelativeResource("Images/text-x-generic.png"), "Text file");
+    private final static ImageResource VIDEO = new ImageResource(new 
+            ContextRelativeResource("Images/video-x-generic.png"), "Video file");
+
+    private final static Map<String, ImageResource> ICON_MAP = new 
+            HashMap<String, ImageResource>();
+    static {
+        ICON_MAP.put(FacetConstants.RESOURCE_TYPE_AUDIO, AUDIO);
+        ICON_MAP.put(FacetConstants.RESOURCE_TYPE_VIDEO, VIDEO);
+        ICON_MAP.put(FacetConstants.RESOURCE_TYPE_TEXT, TEXT);
+        ICON_MAP.put(FacetConstants.RESOURCE_TYPE_IMAGE, IMAGE);
+        ICON_MAP.put(FacetConstants.RESOURCE_TYPE_ANNOTATION, ANNOTATION);
+    }
+    
+    /** 
+     * Panel constructor
+     * 
+     * @param id Wicket mark up identifier
+     * @param mimeType mime type of the resource indicated
+     * @param resourceLink URL to pointing to the resource
+     */
+    public ResourceLinkPanel(String id, String mimeType, String resourceLink) {
+        super(id);
+        ImageResource imageResouce = getImage(mimeType);
+        Image resourceImg = new Image("resourceImage", imageResouce.getResource());
+        String title = imageResouce.getTitle() + " (" + mimeType + ")";
+        resourceImg.add(new SimpleAttributeModifier("title", title));
+        resourceImg.add(new SimpleAttributeModifier("alt", title));
+        String href = getHref(resourceLink);
+        String name = getNameFromLink(resourceLink);
+        ExternalLink link = new ExternalLink("resourceLink", href);
+        link.add(resourceImg);
+        link.add(new Label("resourceLabel", name));
+        add(link);
+    }
+    
+    private ImageResource getImage(String mimeType) {
+        ImageResource image = ICON_MAP.get(CommonUtils.normalizeMimeType(mimeType));
+        if (image == null) {
+            image = TEXT; //unknow defaults to TEXT
+        }
+        return image;
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.html	(revision 2882)
@@ -0,0 +1,9 @@
+<html>
+    <head></head>
+    <body>
+    <wicket:extend>
+        <wicket:message key="resultNotFound"/>.<br>
+        <wicket:message key="youWillBeRedirectedTo"/> <a href="#" wicket:id="redirectPage"><wicket:message key="searchPage">[search page]</wicket:message></a>.
+    </wicket:extend>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ResultNotFoundPage.java	(revision 2882)
@@ -0,0 +1,31 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.ajax.AbstractAjaxTimerBehavior;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.util.time.Duration;
+
+public class ResultNotFoundPage extends BasePage {
+
+    public ResultNotFoundPage(final PageParameters parameters) {
+	super(parameters);
+	Link link = new Link("redirectPage") {
+	    private static final long serialVersionUID = 1L;
+
+	    public void onClick() {
+		setResponsePage(FacetedSearchPage.class, parameters);
+	    };
+	};
+	link.add(new AbstractAjaxTimerBehavior(Duration.seconds(3)) {
+	    private static final long serialVersionUID = 1L;
+
+	    @Override
+	    protected void onTimer(AjaxRequestTarget target) {
+		setResponsePage(FacetedSearchPage.class, parameters);
+	    }
+	});
+	add(link);
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.html	(revision 2882)
@@ -0,0 +1,9 @@
+<!--
+keeloo: describe this
+-->
+
+<wicket:panel>
+    <a wicket:id="searchPageLink"><img wicket:id="searchPageImage"/><span wicket:id="searchPageLabel"/></a>  
+</wicket:panel>
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageLinkPanel.java	(revision 2882)
@@ -0,0 +1,56 @@
+
+package eu.clarin.cmdi.vlo.pages;
+
+import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.resource.ContextRelativeResource;
+
+/**
+ * Panel showing a search link. 
+ * 
+ * In the extension of the link panel class, this class adds a label text and 
+ * an icon that is specific for search page links.
+ *
+ * @author keeloo
+ */
+public class SearchPageLinkPanel extends LinkPanel {
+
+    private final static ImageResource SEARCHPAGE_ICON =
+            new ImageResource(new ContextRelativeResource("Images/Crystal_Clear_action_filefind.png"),
+            "Search page");
+
+    /**
+     * Panel constructor. 
+     * 
+     * @param id Wicket mark up identifier
+     * @param resourceLink URL to pointing to the resource
+     */
+    public SearchPageLinkPanel(String id, String resourceLink) {
+        // ... 
+        super(id);
+        
+        // add the icon image
+        ImageResource imageResource = SEARCHPAGE_ICON;
+        Image resourceImg = new Image("searchPageImage", imageResource.getResource());
+        
+        // add the image's title
+        String title;
+        title = imageResource.getTitle();
+        resourceImg.add(new SimpleAttributeModifier("title", title));
+        resourceImg.add(new SimpleAttributeModifier("alt", title));
+
+        // ...
+        String href = getHref(resourceLink);
+
+        // get the name associated with the link
+        String name = getNameFromLink(resourceLink);
+        
+        // ... and add the link itself
+        ExternalLink link = new ExternalLink("searchPageLink", href);
+        link.add(resourceImg);
+        link.add(new Label("searchPageLabel", name));
+        add(link);
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchPageQuery.java	(revision 2882)
@@ -0,0 +1,127 @@
+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;
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.solr.client.solrj.util.ClientUtils;
+import org.apache.solr.common.params.CommonParams;
+import org.apache.wicket.IClusterable;
+import org.apache.wicket.PageParameters;
+
+public class SearchPageQuery implements IClusterable {
+
+    private static final String SOLR_SEARCH_ALL = "*:*";
+
+    private static final long serialVersionUID = 1L;
+
+    private SolrQuery query;
+    private Map<String, String> filterQueryMap = new HashMap<String, String>();
+    private String searchQuery;
+
+    public SearchPageQuery(PageParameters parameters) {
+        query = getDefaultQuery();
+        String queryParam = parameters.getString(CommonParams.Q);
+        setSearchQuery(queryParam);
+        if (queryParam != null) {
+            query.setQuery(escapeSolrQuery(queryParam));
+        } else {
+            query.setQuery(SOLR_SEARCH_ALL);
+
+        }
+        String[] filterQueries = parameters.getStringArray(CommonParams.FQ);
+        if (filterQueries != null) {
+            String[] encodedQueries = new String[filterQueries.length];
+            for (int i = 0; i < filterQueries.length; i++) {
+                String fq = filterQueries[i];
+                String[] keyValue = fq.split(":", 2);
+                filterQueryMap.put(keyValue[0], keyValue[1]);
+                encodedQueries[i] = keyValue[0] + ":" + ClientUtils.escapeQueryChars(keyValue[1]);
+            }
+            query.setFilterQueries(encodedQueries);
+        }
+    }
+
+    private String escapeSolrQuery(String value) {
+        String result = null;
+        if (value != null) {
+            result = ClientUtils.escapeQueryChars(value);
+        }
+        return result;
+    }
+
+    private SearchPageQuery(SearchPageQuery searchPageQuery) {
+        this.query = searchPageQuery.query;
+        this.filterQueryMap = new HashMap(searchPageQuery.filterQueryMap);
+        this.searchQuery = searchPageQuery.searchQuery;
+    }
+
+    public SearchPageQuery getShallowCopy() {
+        return new SearchPageQuery(this);
+    }
+
+    private SolrQuery getDefaultQuery() {
+        SolrQuery result = new SolrQuery();
+        result.setRows(10);
+        result.setStart(0);
+        result.setFields(FacetConstants.FIELD_NAME, FacetConstants.FIELD_ID, FacetConstants.FIELD_DESCRIPTION);
+        result.setFacet(true);
+        result.setFacetMinCount(1);
+        result.addFacetField(VloConfig.getFacetFields());
+        return result;
+    }
+
+    public SolrQuery getSolrQuery() {
+        return query;
+    }
+
+    public void removeFilterQuery(FacetField facetField) {
+        filterQueryMap.remove(facetField.getName());
+    }
+
+    public void setFilterQuery(Count count) {
+        filterQueryMap.put(count.getFacetField().getName(), count.getName());
+    }
+
+    public boolean isSelected(FacetField facetField) {
+        return filterQueryMap.containsKey(facetField.getName());
+    }
+
+    public String getSelectedValue(FacetField field) {
+        return filterQueryMap.get(field.getName());
+    }
+
+    public Map<String, String> getFilterQueryMap() {
+        return filterQueryMap;
+    }
+
+    public void setSearchQuery(String searchQuery) {
+        if (searchQuery == null || searchQuery.isEmpty()) {
+            searchQuery = SOLR_SEARCH_ALL;
+        }
+        this.searchQuery = searchQuery;
+    }
+
+    public String getSearchQuery() {
+        if (searchQuery.equals(SOLR_SEARCH_ALL)) {
+            searchQuery = "";
+        }
+        return searchQuery;
+    }
+
+    public PageParameters getPageParameters() {
+        PageParameters result = new PageParameters();
+        if (!getSearchQuery().isEmpty()) {
+            result.add(CommonParams.Q, getSearchQuery());
+        }
+        for (String facet : filterQueryMap.keySet()) {
+            String facetValue = filterQueryMap.get(facet);
+            result.add(CommonParams.FQ, facet + ":" + facetValue);
+        }
+        return result;
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchServiceDataProvider.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchServiceDataProvider.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SearchServiceDataProvider.java	(revision 2882)
@@ -0,0 +1,75 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Iterator;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
+
+/**
+ * Data provider of all documents with SearchService entry (FCS) based on existing SolrQuery
+ * 
+ * @author Thomas Eckart
+ *
+ */
+public class SearchServiceDataProvider extends SortableDataProvider<SolrDocument> {
+	private final static Logger LOG = LoggerFactory.getLogger(SearchServiceDataProvider.class);
+	
+	private static final long serialVersionUID = -5355607690141772113L;
+	private final SolrQuery query;
+	private SolrDocumentList docList;
+
+	public SearchServiceDataProvider(SolrQuery query) {
+		this.query = query;
+		this.query.setFacet(false);
+		this.query.setStart(0);
+		this.query.setRows(10);
+		this.query.setFields(FacetConstants.FIELD_SEARCH_SERVICE, FacetConstants.FIELD_ID);
+		this.query.setQuery(query.getQuery());
+		this.query.addFilterQuery(FacetConstants.FIELD_SEARCH_SERVICE + ":*");
+		LOG.debug("Used query for search services: "+this.query.toString());
+	}
+
+	private SearchResultsDao getSearchResultsDao() {
+		return DaoLocator.getSearchResultsDao();
+	}
+
+	private SolrDocumentList getDocList() {
+		if (docList == null) {
+			docList = getSearchResultsDao().getResults(query);
+		}
+		return docList;
+	}
+
+	@Override
+	public Iterator<SolrDocument> iterator(int first, int count) {
+		if (first != query.getStart().intValue() || count != query.getRows().intValue()) {
+			query.setStart(first).setRows(count);
+			docList = null;
+		}
+		return getDocList().iterator();
+	}
+	
+	public Iterator<SolrDocument> iterator() {
+		return getDocList().iterator();
+	}
+
+	@Override
+	public IModel<SolrDocument> model(SolrDocument solrDocument) {
+		return new Model<SolrDocument>(solrDocument);
+	}
+
+	@Override
+	public int size() {
+		return (int) getDocList().getNumFound();
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.html	(revision 2882)
@@ -0,0 +1,25 @@
+<html>
+    <head></head>
+    <body>
+    <wicket:extend>
+        <div class="categorylist">
+            <div style="text-indent:10px;>
+	            <table>
+	                <tr>
+	                    <td width="50%" class="column">
+	                        <div wicket:id="filteredFacets"><span wicket:id="filteredFacet"/></div>
+	                    </td>
+	                </tr>
+	            </table>
+	            <div  class="filter">
+	            	<a href="#" wicket:id="filter"><span wicket:id="filterLabel">Filter</span></a>
+	            </div>
+	            <br>
+	            <div class="message"><wicket:message key="subcategoriesIn">[Subcategories]</wicket:message> <span class="facet" wicket:id="category"></span>:</div>
+	        </div>
+            <div wicket:id="alphaPanel"></div>
+        </div>
+    </wicket:extend>
+</body>
+</html>
+
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowAllFacetValuesPage.java	(revision 2882)
@@ -0,0 +1,68 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Map;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.repeater.RepeatingView;
+
+public class ShowAllFacetValuesPage extends BasePage {
+
+	public static final String SELECTED_FACET_PARAM = "selectedFacet";
+	public static final String FACET_MIN_OCCURS = "facetMinOccurs";
+	public static final Integer FACET_MIN_OCCURS_VALUE = 2;	// for parameter FACET_MIN_OCCURS to show only values that occur with this minimal frequency
+
+	public ShowAllFacetValuesPage(PageParameters parameters) {
+		super(parameters);
+		final SearchPageQuery query = new SearchPageQuery(parameters);
+
+		// show facets that were already chosen
+		addFilteredFacets(query);
+		
+		// filter for minimal frequency of values
+		addOccurrencesFilter(parameters);
+		
+		String selectedFacet = parameters.getString(SELECTED_FACET_PARAM);
+		Integer facetMinOccurs = parameters.getAsInteger(FACET_MIN_OCCURS, 1);
+		add(new Label("category", selectedFacet));
+		SolrFacetFieldDataProvider data = new SolrFacetFieldDataProvider(selectedFacet, query);
+		add(new AlphabeticalPanel("alphaPanel", data, query, facetMinOccurs));
+	}
+	
+	/**
+	 * Adds a link to allow filtering for minimal occurrences of a value or to show all values again
+	 * @param parameters
+	 */
+	private void addOccurrencesFilter(PageParameters parameters) {
+		PageParameters newParameters = (PageParameters) parameters.clone();
+		newParameters.remove(FACET_MIN_OCCURS);
+		if(!parameters.containsKey(FACET_MIN_OCCURS) || parameters.getAsInteger(FACET_MIN_OCCURS) == 1) {
+			newParameters.add(FACET_MIN_OCCURS, FACET_MIN_OCCURS_VALUE.toString());
+			add(new BookmarkablePageLink<Void>("filter", ShowAllFacetValuesPage.class, newParameters).add(new Label("filterLabel", "Show only values that occur at least "+FACET_MIN_OCCURS_VALUE+" times")));
+		} else {
+			add(new BookmarkablePageLink<Void>("filter", ShowAllFacetValuesPage.class, newParameters).add(new Label("filterLabel", "Show all values")));
+		}
+	}
+	
+	/**
+	 * Add view that shows already selected facets
+	 * @param query
+	 */
+	private void addFilteredFacets(SearchPageQuery query) {
+		Map<String, String> filterQueries = query.getFilterQueryMap();
+		RepeatingView filteredFacets = new RepeatingView("filteredFacets");
+		if (filterQueries != null && !filterQueries.isEmpty()) {
+			WebMarkupContainer wmc = new WebMarkupContainer(filteredFacets.newChildId());
+			wmc.add(new Label("filteredFacet", "Selected categories:"));
+			filteredFacets.add(wmc);
+			for (String fq : filterQueries.keySet()) {
+				wmc = new WebMarkupContainer(filteredFacets.newChildId());
+				wmc.add(new Label("filteredFacet", fq + " = " + filterQueries.get(fq)));
+				filteredFacets.add(wmc);
+			}
+		}
+		add(filteredFacets);		
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.html
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.html	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.html	(revision 2882)
@@ -0,0 +1,75 @@
+<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+	<wicket:head>
+		<script language="JavaScript">
+			function toogleDiv(strID, linkElement){
+				document.getElementById(linkElement).innerHTML = (document.getElementById(strID).style.display == 'none' ) ? '<b>Hide CMDI metadata</b>' : '<b>Show CMDI metadata</b>';
+				document.getElementById(strID).style.display = (document.getElementById(strID).style.display == 'none' ) ? 'block' : 'none';
+				document.getElementById(strID + "_shown").style.display = (document.getElementById(strID + "_shown").style.display == 'none' ) ? 'block' : 'none';
+				document.getElementById(strID + "_hidden").style.display = (document.getElementById(strID + "_hidden").style.display == 'none' ) ? 'block' : 'none';
+			}
+		</script>
+		<script src="javascript/searchhi.js" type="text/javascript" language="JavaScript"></script>
+	</wicket:head>
+	
+    <body>
+    <wicket:extend>
+        <div class="endgame"><br>
+            <div><a wicket:id="backLink" href="#"><wicket:message key="backToResult">[back]</wicket:message></a>&nbsp;|&nbsp;<a wicket:id="openBrowserLink"></a>
+            <div align="right" style="float:right">
+            	<a wicket:id="feedbackLink"href="#"><img wicket:id="feedbackImage" height="32" width="32"/></a>
+            	<span wicket:id="feedbackLabel"></span></div>
+                <p />
+            </div>
+            <br>
+            <br>
+            <span wicket:id="prevNextHeader"></span>
+            <div class="resultAttributes">
+                <table wicket:id="attributesTable" />
+            </div>
+            <!-- add a label to be shown in case there is one landing page -->
+            <div wicket:id="oneLandingPage">[Landing page]</div>
+            <!-- add a label to be shown in case there are more landing pages -->
+            <div wicket:id="moreLandingPages">[Landing pages]</div>
+            <!-- Add the list of landing page links. For the items in the unordered
+            list (ul), use the same layout as in the case of the resource list. -->
+            <div class="landingPageList">
+                <ul class="resultItem" >
+                    <li wicket:id="landingPageList"></li>
+                </ul>
+            </div>
+            <!-- add a label to be shown in case there is one search  page -->
+            <div wicket:id="oneSearchPage">[Search page]</div>
+            <!-- add a label to be shown in case there are more search pages -->
+            <div wicket:id="moreSearchPages">[Search pages]</div>
+            <!-- Add the list of search page links. Again, use the same layout
+            as in the case of the resource list. -->
+            <div class="searchPageList">
+                <ul class="resultItem" >
+                    <li wicket:id="searchPageList"></li>
+                </ul>
+            </div>
+            <div class="resourceList"><span><wicket:message key="resources">[Resources]</wicket:message>:</span>
+                <ul class="resultItem" >
+                    <li wicket:id="resourceList"></li>
+                </ul>
+            </div>
+                
+            <br>    
+            <div wicket:id="contentSearch"><span>Search in this resource:</span>
+                <br>
+            	<span wicket:id="contentSearchForm"></span>
+            </div>
+            
+            <div id="completeCmdiView">
+            	<span>
+            		<a href="javascript:/" id="toogleLink" onClick="toogleDiv('completeCmdi', 'toogleLink');"></a>
+            	</span>
+            	<span id="completeCmdi" wicket:id="completeCmdi"></span>
+            </div>       		
+            <br>
+            <br>            
+        </div>
+    </wicket:extend>
+</body>
+</html>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 2882)
@@ -0,0 +1,477 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.Resources;
+import eu.clarin.cmdi.vlo.StringUtils;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+import javax.xml.transform.stream.StreamSource;
+import net.sf.saxon.s9api.Processor;
+import net.sf.saxon.s9api.Serializer;
+import net.sf.saxon.s9api.XdmNode;
+import net.sf.saxon.s9api.XsltCompiler;
+import net.sf.saxon.s9api.XsltExecutable;
+import net.sf.saxon.s9api.XsltTransformer;
+import org.apache.solr.common.SolrDocument;
+import org.apache.wicket.Component;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.RequestCycle;
+import org.apache.wicket.behavior.AbstractBehavior;
+import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel;
+import org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.IHeaderResponse;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.ExternalLink;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.RepeatingView;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.protocol.http.RequestUtils;
+import org.apache.wicket.protocol.http.WicketURLDecoder;
+import org.apache.wicket.protocol.http.WicketURLEncoder;
+import org.apache.wicket.resource.ContextRelativeResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Page showing VLO search results
+ * 
+ * @author keeloo, for the addLandingPage links method
+ */
+public class ShowResultPage extends BasePage {
+
+    private final static Logger LOG = LoggerFactory.getLogger(ShowResultPage.class);
+    public static final String PARAM_DOC_ID = "docId";
+    public static final String feedbackfromURL = VloConfig.getFeedbackFromUrl();
+    
+    private final static ImageResource FEEDBACK_IMAGE = new ImageResource(new ContextRelativeResource("Images/feedback.png"), "Report an Error");
+    private final URL xslFile = getClass().getResource("/cmdi2xhtml.xsl");
+    
+    @SuppressWarnings("serial")
+    public ShowResultPage(final PageParameters parameters) {
+        super(parameters);
+        final String docId = WicketURLDecoder.QUERY_INSTANCE.decode(getPageParameters().getString(PARAM_DOC_ID, null));
+        SolrDocument solrDocument = DaoLocator.getSearchResultsDao().getSolrDocument(docId);
+        if (solrDocument != null) {
+            final SearchPageQuery query = new SearchPageQuery(parameters);
+            BookmarkablePageLink<String> backLink = new BookmarkablePageLink<String>("backLink", FacetedSearchPage.class, query.getPageParameters());
+            add(backLink);
+            String href = getHref(docId);
+            if (href != null) {
+                add(new ExternalLink("openBrowserLink", href, new ResourceModel(Resources.OPEN_IN_ORIGINAL_CONTEXT).getObject()));
+            } else {
+                add(new Label("openBrowserLink", new ResourceModel(Resources.ORIGINAL_CONTEXT_NOT_AVAILABLE).getObject()));
+            }
+            addAttributesTable(solrDocument);
+            
+            /* If there are any, add the link or links to landing pages 
+             * contained in the solr document.
+             */
+            addLandingPageLinks(solrDocument);
+            
+            // also, if there are any, add the link or links to search pages 
+            addSearchPageLinks(solrDocument);
+
+            // add the rest of the resource links to the result page
+            addResourceLinks(solrDocument);
+            
+            addSearchServiceForm(solrDocument);
+            addCompleteCmdiView(solrDocument);
+            
+            add(new AjaxLazyLoadPanel("prevNextHeader") {
+
+                @Override
+                public Component getLazyLoadComponent(String markupId) {
+                    return new PrevNextHeaderPanel(markupId, docId, query);
+                }
+
+                @Override
+                public Component getLoadingComponent(String markupId) {
+                    return new PrevNextHeaderPanel(markupId);
+                }
+            });
+        } else {
+            setResponsePage(new ResultNotFoundPage(parameters));
+        }
+
+        // add the feedback link to the result page
+        addFeedbackLink(parameters);
+    }
+
+    private String getHref(String linkToOriginalContext) {
+        String result = linkToOriginalContext;
+        if (linkToOriginalContext != null) {
+            if (linkToOriginalContext.startsWith(FacetConstants.TEST_HANDLE_MPI_PREFIX)) {
+                linkToOriginalContext = linkToOriginalContext.replace(FacetConstants.TEST_HANDLE_MPI_PREFIX, FacetConstants.HANDLE_MPI_PREFIX);
+            }
+            if (linkToOriginalContext.startsWith(FacetConstants.HANDLE_MPI_PREFIX)) {
+                result = VloConfig.getIMDIBrowserUrl(linkToOriginalContext);
+            } else {
+                try {
+                    new URL(linkToOriginalContext);
+                } catch (MalformedURLException e) {
+                    LOG.debug("Link to original context is incorrect:", e);
+                    result = null;
+                }
+            }
+        }
+        return result;
+    }
+
+	private void addAttributesTable(final SolrDocument solrDocument) {
+		solrDocument.remove(FacetConstants.FIELD_LANGUAGE);	// ignore language entry, because of FIELD_LANGUAGE_LINK
+        DocumentAttributesDataProvider attributeProvider = new DocumentAttributesDataProvider(solrDocument);
+        @SuppressWarnings("unchecked")
+		DataTable table = new DataTable("attributesTable", createAttributesColumns(), attributeProvider, 250);
+        table.setTableBodyCss("attributesTbody");
+        table.addTopToolbar(new HeadersToolbar(table, null));
+        add(table);
+    }
+
+    @SuppressWarnings({ "serial" })
+    private IColumn[] createAttributesColumns() {
+        IColumn[] columns = new IColumn[2];
+
+        columns[0] = new PropertyColumn<Object>(new ResourceModel(Resources.FIELD), "field") {
+
+            @Override
+            public String getCssClass() {
+                return "attribute";
+            }
+        };
+
+        columns[1] = new AbstractColumn<DocumentAttribute>(new ResourceModel(Resources.VALUE)) {
+            @Override
+            public void populateItem(Item<ICellPopulator<DocumentAttribute>> cellItem, String componentId, IModel<DocumentAttribute> rowModel) {
+                DocumentAttribute attribute = rowModel.getObject();
+
+                if (attribute.getField().equals(FacetConstants.FIELD_LANGUAGE)) {
+                    cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
+
+                        @Override
+                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                            CharSequence body = StringUtils.toMultiLineHtml(getDefaultModelObjectAsString());
+                            replaceComponentTagBody(markupStream, openTag, getSmartLink(body));
+                        }
+                    });
+                } else if(attribute.getField().equals(FacetConstants.FIELD_LANGUAGES)) {
+                    cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
+
+                        @Override
+                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                        	setEscapeModelStrings(false);
+                            CharSequence body = getDefaultModelObjectAsString();
+                            replaceComponentTagBody(markupStream, openTag, body);
+                        }
+                    });
+                } else {
+                    cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
+
+                        @Override
+                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                            CharSequence body = StringUtils.toMultiLineHtml(getDefaultModelObjectAsString());
+                            replaceComponentTagBody(markupStream, openTag, getSmartLink(body));
+                        }
+                    });
+                }
+            }
+
+            @Override
+            public String getCssClass() {
+                return "attributeValue";
+            }
+        };
+
+        return columns;
+    }
+    
+    /**
+     * Add landing page links to the result page.
+     *
+     * @param solrDocument the document to get the links from
+     */
+    private void addLandingPageLinks(SolrDocument solrDocument) {
+        
+        Label oneLandingPageText;
+        oneLandingPageText = new Label("oneLandingPage",
+                new ResourceModel(Resources.LANDING_PAGE).getObject() + ":");
+        this.add(oneLandingPageText);
+
+        Label moreLandingPagesText;
+        moreLandingPagesText = new Label("moreLandingPages",
+                new ResourceModel(Resources.LANDING_PAGES).getObject() + ":");
+        this.add(moreLandingPagesText);
+
+        RepeatingView repeatingView = new RepeatingView("landingPageList");
+        add(repeatingView);
+
+        /*
+         * Depending on the number of links to be shown, at most one of the 
+         * labels in the accompanying HTML page that is subject to Wicket is 
+         * made visible.
+         */
+        if (!solrDocument.containsKey(FacetConstants.FIELD_LANDINGPAGE)) {
+            
+            /* Since there are no links to be shown, make both labels defined in
+             * the page invisible
+             */
+            oneLandingPageText.setVisible(false);
+            moreLandingPagesText.setVisible(false);
+        } else {
+            //  make one of the two labels invisible
+
+            Collection<Object> landingPages = 
+                    solrDocument.getFieldValues(FacetConstants.FIELD_LANDINGPAGE);
+            if (landingPages.size() > 1) {
+                
+                // the list will contain more than one landing page link
+                oneLandingPageText.setVisible(false);
+                moreLandingPagesText.setVisible(true);
+            } else {
+                // the list will contain exactly one landing page link.
+                oneLandingPageText.setVisible(true);
+                moreLandingPagesText.setVisible(false);
+            }
+            
+            // generate the list of links
+            for (Iterator<Object> it = landingPages.iterator(); it.hasNext();) {
+                final Object landingPage;
+                landingPage = it.next();
+
+                // add a link to the list
+                repeatingView.add(
+                        new AjaxLazyLoadPanel(repeatingView.newChildId()) {
+                            @Override
+                            public Component getLazyLoadComponent(String markupId) {
+                                String landingPageLink;
+                                landingPageLink = landingPage.toString();
+
+                                // create a panel for the link
+                                return new LandingPageLinkPanel(markupId,
+                                        landingPage.toString());
+                            }
+                        });
+            }
+        }
+    }
+    
+    /**
+     * Add search page links to the result page.
+     *
+     * @param solrDocument the document to get the links from
+     */
+    private void addSearchPageLinks(SolrDocument solrDocument) {
+        
+        Label oneSearchPageText;
+        oneSearchPageText = new Label("oneSearchPage",
+                new ResourceModel(Resources.SEARCH_PAGE).getObject() + ":");
+        this.add(oneSearchPageText);
+
+        Label moreSearchPagesText;
+        moreSearchPagesText = new Label("moreSearchPages",
+                new ResourceModel(Resources.SEARCH_PAGES).getObject() + ":");
+        this.add(moreSearchPagesText);
+
+        RepeatingView repeatingView = new RepeatingView("searchPageList");
+        add(repeatingView);
+
+        /*
+         * Depending on the number of links to be shown, at most one of the 
+         * labels in the accompanying HTML page that is subject to Wicket is 
+         * made visible.
+         */
+        if (!solrDocument.containsKey(FacetConstants.FIELD_SEARCHPAGE)) {
+            
+            /* Since there are no links to be shown, make both labels defined in
+             * the page invisible
+             */
+            oneSearchPageText.setVisible(false);
+            moreSearchPagesText.setVisible(false);
+        } else {
+            //  make one of the two labels invisible
+
+            Collection<Object> searchPages = 
+                    solrDocument.getFieldValues(FacetConstants.FIELD_SEARCHPAGE);
+            if (searchPages.size() > 1) {
+                
+                // the list will contain more than one landing page link
+                oneSearchPageText.setVisible(false);
+                moreSearchPagesText.setVisible(true);
+            } else {
+                // the list will contain exactly one landing page link.
+                oneSearchPageText.setVisible(true);
+                moreSearchPagesText.setVisible(false);
+            }
+            
+            // generate the list of links
+            for (Iterator<Object> it = searchPages.iterator(); it.hasNext();) {
+                final Object searchPage;
+                searchPage = it.next();
+
+                // add a link to the list
+                repeatingView.add(
+                        new AjaxLazyLoadPanel(repeatingView.newChildId()) {
+                            @Override
+                            public Component getLazyLoadComponent(String markupId) {
+                                String searchPageLink;
+                                searchPageLink = searchPage.toString();
+
+                                // create a panel for the link 
+                                return new SearchPageLinkPanel(markupId,
+                                        searchPage.toString());
+                            }
+                        });
+            }
+        }
+    }
+
+    /**
+     * Add links to resources other than search or landing pages to the result
+     * page.
+     *
+     * @param solrDocument the document to get the links from
+     */
+    private void addResourceLinks(SolrDocument solrDocument) {
+        RepeatingView repeatingView = new RepeatingView("resourceList");
+        add(repeatingView);
+        if (solrDocument.containsKey(FacetConstants.FIELD_RESOURCE)) {
+            Collection<Object> resources = solrDocument.getFieldValues(FacetConstants.FIELD_RESOURCE);
+            for (Object resource : resources) {
+                String[] split = resource.toString().split(Pattern.quote(FacetConstants.FIELD_RESOURCE_SPLIT_CHAR), 2);
+                final String mimeType = split[0];
+                final String resourceLink = split[1];
+                repeatingView.add(new AjaxLazyLoadPanel(repeatingView.newChildId()) {
+
+                    @Override
+                    public Component getLazyLoadComponent(String markupId) {
+                        return new ResourceLinkPanel(markupId, mimeType, resourceLink);
+                    }
+                });
+            }
+        } else {
+            repeatingView.add(new Label(repeatingView.newChildId(), new ResourceModel(Resources.NO_RESOURCE_FOUND)));
+        }
+    }
+    
+    private void addFeedbackLink(final PageParameters parameters) {
+        String thisURL = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(ShowResultPage.class, parameters).toString());
+        try {
+            thisURL = URLEncoder.encode(thisURL,"UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            LOG.error(e.toString());
+        }
+    	
+        Image resourceImg = new Image("feedbackImage", FEEDBACK_IMAGE.getResource());
+        String title = "Report an error";
+        resourceImg.add(new SimpleAttributeModifier("title", title));
+        resourceImg.add(new SimpleAttributeModifier("alt", title));
+        String href = getHref(feedbackfromURL+thisURL);
+        String name = feedbackfromURL+thisURL;
+        ExternalLink link = new ExternalLink("feedbackLink", href);
+        link.add(resourceImg);
+        add(new Label("feedbackLabel", "Found an error?"));
+        add(link);
+    }
+
+    public static BookmarkablePageLink<ShowResultPage> createBookMarkableLink(String linkId, SearchPageQuery query, String docId) {
+        PageParameters pageParameters = query.getPageParameters();
+        pageParameters.put(ShowResultPage.PARAM_DOC_ID, WicketURLEncoder.QUERY_INSTANCE.encode(docId));
+        BookmarkablePageLink<ShowResultPage> docLink = new BookmarkablePageLink<ShowResultPage>(linkId, ShowResultPage.class,
+                pageParameters);
+        return docLink;
+    }
+    
+	/**
+	 * Add contentSearch form (FCS)
+	 * @param solrDocument
+	 */
+	private void addSearchServiceForm(final SolrDocument solrDocument) {
+		final WebMarkupContainer contentSearchContainer = new WebMarkupContainer("contentSearch");
+		add(contentSearchContainer);
+		
+		if (solrDocument.containsKey(FacetConstants.FIELD_SEARCH_SERVICE)) {
+			try {
+				// building map (CQL endpoint -> List with resource ID)
+				HashMap<String, List<String>> aggregrationContextMap = new HashMap<String, List<String>>();
+				List<String> idList = new ArrayList<String>();
+				idList.add(solrDocument.getFirstValue(FacetConstants.FIELD_ID).toString());
+				aggregrationContextMap.put(solrDocument.getFirstValue(FacetConstants.FIELD_SEARCH_SERVICE).toString(), idList);
+				Label contentSearchLabel = new Label("contentSearchForm", HtmlFormCreator.getContentSearchForm(aggregrationContextMap));
+				contentSearchLabel.setEscapeModelStrings(false);				
+				contentSearchContainer.add(contentSearchLabel);
+			} catch (UnsupportedEncodingException uee) {
+				contentSearchContainer.setVisible(false);
+			}
+		} else {
+			contentSearchContainer.setVisible(false);
+		}
+	}
+	
+	/**
+	 * Add complete CMDI view
+	 * @param solrDocument
+	 */
+	private void addCompleteCmdiView(final SolrDocument solrDocument) {
+		StringWriter strWriter = new StringWriter();
+
+        final Processor proc = new Processor(false);
+        final XsltCompiler comp = proc.newXsltCompiler();
+
+        try {
+                final XsltExecutable exp = comp.compile(new StreamSource(xslFile.getFile()));
+                final XdmNode source = proc.newDocumentBuilder().build(
+                                new StreamSource(new InputStreamReader(new URL(solrDocument.getFirstValue(FacetConstants.FIELD_COMPLETE_METADATA).toString()).openStream())));
+                final Serializer out = new Serializer();
+                out.setOutputProperty(Serializer.Property.METHOD, "html");
+                out.setOutputProperty(Serializer.Property.INDENT, "yes");
+                out.setOutputWriter(strWriter);
+                final XsltTransformer trans = exp.load();
+
+                trans.setInitialContextNode(source);
+                trans.setDestination(out);
+                trans.transform();
+        } catch (Exception e) {
+                LOG.error("Couldn't create CMDI metadata: "+e.getMessage());
+                strWriter = new StringWriter().append("<b>Could not load complete CMDI metadata</b>");
+        }		
+		
+        Label completeCmdiLabel = new Label("completeCmdi", strWriter.toString());
+		completeCmdiLabel.setEscapeModelStrings(false);
+		add(completeCmdiLabel);
+		
+		// remove complete CMDI view on page load
+		add(new AbstractBehavior() {
+			private static final long serialVersionUID = 1865219352602175954L;
+
+			@Override
+			public void renderHead(IHeaderResponse response) {
+				super.renderHead(response);
+				response.renderOnLoadJavascript("toogleDiv('completeCmdi', 'toogleLink')");
+			}
+		});
+	}
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrDocumentDataProvider.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrDocumentDataProvider.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrDocumentDataProvider.java	(revision 2882)
@@ -0,0 +1,56 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Iterator;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
+
+public class SolrDocumentDataProvider extends SortableDataProvider<SolrDocument> {
+
+    private static final long serialVersionUID = 1L;
+    private final SolrQuery query;
+    private SolrDocumentList docList;
+
+    public SolrDocumentDataProvider(SolrQuery query) {
+        this.query = query;
+        query.setFacet(false);
+    }
+
+    private SearchResultsDao getSearchResultsDao() {
+        return DaoLocator.getSearchResultsDao();
+    }
+
+    private SolrDocumentList getDocList() {
+        if (docList == null) {
+            docList = getSearchResultsDao().getResults(query);
+        }
+        return docList;
+    }
+
+    @Override
+    public Iterator<? extends SolrDocument> iterator(int first, int count) {
+        if (first != query.getStart().intValue() || count != query.getRows().intValue()) {
+            query.setStart(first).setRows(count);
+            docList = null;
+        }
+        return getDocList().iterator();
+    }
+
+    @Override
+    public IModel<SolrDocument> model(SolrDocument solrDocument) {
+        return new Model<SolrDocument>(solrDocument);
+    }
+
+    @Override
+    public int size() {
+        return (int) getDocList().getNumFound();
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetDataProvider.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetDataProvider.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetDataProvider.java	(revision 2882)
@@ -0,0 +1,53 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
+
+public class SolrFacetDataProvider extends SortableDataProvider<FacetField> {
+
+    private static final long serialVersionUID = 1L;
+    private final SolrQuery query;
+    private List<FacetField> facets;
+
+    public SolrFacetDataProvider(SolrQuery query) {
+        this.query = query;
+        query.setFacet(true).setStart(0).setRows(0); //only get facets
+    }
+
+    private SearchResultsDao getSearchResultsDao() {
+        return DaoLocator.getSearchResultsDao();
+    }
+
+    @Override
+    public Iterator<? extends FacetField> iterator(int first, int count) {
+        return facets.iterator();
+    }
+
+    private List<FacetField> getFacets() {
+        if (facets == null) {
+            SearchResultsDao searchResultsDao = getSearchResultsDao();
+            facets = searchResultsDao.getFacets(query);
+        }
+        return facets;
+    }
+
+    @Override
+    public IModel<FacetField> model(FacetField facetField) {
+        return new Model<FacetField>(facetField);
+    }
+
+    @Override
+    public int size() {
+        return (int) getFacets().size();
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetFieldDataProvider.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetFieldDataProvider.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/SolrFacetFieldDataProvider.java	(revision 2882)
@@ -0,0 +1,92 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.solr.common.params.FacetParams;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.clarin.cmdi.vlo.dao.DaoLocator;
+import eu.clarin.cmdi.vlo.dao.SearchResultsDao;
+
+public class SolrFacetFieldDataProvider implements IDataProvider<Count> {
+    private final static Logger LOG = LoggerFactory.getLogger(SolrFacetFieldDataProvider.class);
+
+    private static final long serialVersionUID = 1L;
+    private FacetField facet;
+    private SolrQuery query;
+
+    private final String selectedFacet;
+
+    public SolrFacetFieldDataProvider(String selectedFacet, SearchPageQuery pageQuery) {
+        this.selectedFacet = selectedFacet;
+        query = pageQuery.getSolrQuery();
+        query.setFacetSort(FacetParams.FACET_SORT_INDEX);
+        query.setFacetLimit(-1);
+        String[] facetFields = query.getFacetFields();
+        for (String facetField : facetFields) {
+            if (!facetField.equals(selectedFacet)) {
+                query.removeFacetField(facetField);
+            }
+        }
+
+    }
+
+    private FacetField getFacet() {
+        if (facet == null) {
+            SearchResultsDao searchResultsDao = DaoLocator.getSearchResultsDao();
+            List<FacetField> facets = searchResultsDao.getFacets(query);
+            if (facets == null || facets.isEmpty()) {
+                facet = new EmptyFacetField(selectedFacet);
+            } else if (facets.size() != 1) {
+                LOG.warn("Should have only one facet, but got: " + facets.size() + ". Choosing first one.");
+            } else {
+                facet = facets.get(0);
+            }
+        }
+        return facet;
+    }
+
+    @Override
+    public Iterator<? extends Count> iterator(int first, int count) {
+        return getFacet().getValues().subList(first, first + count).iterator();
+    }
+
+    @Override
+    public int size() {
+        return getFacet().getValueCount();
+    }
+
+    @Override
+    public IModel<Count> model(Count count) {
+        return new Model<Count>(count);
+    }
+
+    @Override
+    public void detach() {
+    }
+
+    @SuppressWarnings("serial")
+    private static class EmptyFacetField extends FacetField {
+        public EmptyFacetField(String name) {
+            super(name);
+        }
+
+        public List<Count> getValues() {
+            return (List<Count>) Collections.EMPTY_LIST.iterator();
+        }
+
+        public int getValueCount() {
+            return 0;
+        }
+
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/META-INF/context.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/META-INF/context.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/META-INF/context.xml	(revision 2882)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- VLO application context file
+
+path : web application context path. If u is the url of the web server, the web
+application will be reachable at u/path
+
+externalConfig : the path to an external configuration file. In this file you 
+can set the value of the VLO parameters. 
+
+The specification of an external configuration file is optional. If you do not 
+specify one, the VLO web application will use the packaged parameters. This will
+only be usefull when the application is run from within a development 
+environment. 
+
+In a VLO configuration file, among others, you need to define the value of the 
+solrUrl parameter. You can override this value by defining it in the context 
+fragement directly. This is not obligatory however.
+
+For more information on the meaning and purpose of the VLO parameters, please
+refer to the documentation.
+
+-->
+<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/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/classes/log4j.properties
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/classes/log4j.properties	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/classes/log4j.properties	(revision 2882)
@@ -0,0 +1,17 @@
+log4j.appender.ROOT.File=${catalina.base}/logs/vlo.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
+
+#log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+#log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.Stdout.layout.conversionPattern=%d %p [%c{1}#%M:%L] - %m%n
+
+log4j.rootLogger=INFO,ROOT
+
+log4j.logger.org.apache.wicket=ERROR
+log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=ERROR
+log4j.logger.org.apache.wicket.version=ERROR
+log4j.logger.org.apache.wicket.RequestCycle=ERROR
+
+
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/web.xml	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/WEB-INF/web.xml	(revision 2882)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
+         version="2.4"
+>
+
+  <display-name>vlo</display-name>
+
+  <filter>
+    <filter-name>vlo_facet_browsing</filter-name>
+    <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+    <init-param>
+      <param-name>applicationClassName</param-name>
+      <param-value>eu.clarin.cmdi.vlo.VloWebApplication</param-value>
+    </init-param>
+    <init-param>
+      <param-name>configuration</param-name>
+       <!-- <param-value>development</param-value> -->
+       <param-value>deployment</param-value>  
+       <!-- you can override with -Dwicket.configuration=development -->
+    </init-param>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>vlo_facet_browsing</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+</web-app>
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/css/main.css
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/css/main.css	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/css/main.css	(revision 2882)
@@ -0,0 +1,211 @@
+body, td {
+    font-family: Verdana, Geneva, sans-serif;
+    font-size: 11px;
+    margin: 0;
+}
+body{
+    padding: 0;
+    margin: 0;
+}
+img{
+    border: none;
+    display: block;
+}
+.top{
+    background-color: #d4deef;
+    width: 100%;
+    height: 176px;
+    border: none;
+}
+#topleft{
+    position: absolute;
+    left:0px;
+}
+#topright{
+    position: absolute;
+    left:497px;
+}
+.opening .matrix{
+    border:0px;
+    width: 66%;
+}
+
+.opening .resulttable{
+    width: 33%;
+    margin-left: 11px;
+}
+.opening .resulttable .headers{
+    background-color: #6b824a;
+}
+
+.resulttable tbody{
+    background-color:#BCCEE8;
+}
+
+.opening .matrix .column {
+    padding: 0 11px 0 0;
+}
+.opening .matrix .column:first-child {
+    padding: 0 11px;
+}
+.opening .valuebox .column {
+    padding: 0;
+}
+.opening .valuebox .column:first-child {
+    padding: 0;
+}
+.facetbox {
+    font-size: 14px;
+    padding: 2px 5px;
+}
+.middlegame .search {
+    background-color: #BCCEE8;
+    padding-top: 11px;
+    padding-bottom: 11px;
+}
+
+.middlegame .searchmodule {
+    margin-left:20%;
+    display:inline
+}
+
+.middlegame .homeLink {
+    margin-left: 11px;
+    display:inline
+}
+
+.facet_facetOrigin .facetbox {
+    background-color: #2E6B99;
+    color:#FFFFFF;
+    padding: 3px 5px;
+}
+.facet {
+    font-size: 90%;
+    font-weight: bold;
+    text-transform: uppercase;
+}
+.facet_facetOrigin .valuebox {
+    background-color: #BCCEE8;
+    padding: 5px;
+}
+.value {
+    color: #4040ff;
+}
+.value.sel {
+    color: #FFFFFF;
+}
+.barlink{
+    color: #BCCEE8;
+}
+.headers{
+    background-color: #2E6B99;
+    color:#FFFFFF;
+}
+
+.endgame div{
+    margin-left: 11px;
+    border: none;
+    padding: 0;
+}
+.endgame .resultAttributes{
+    margin: 0px;
+    padding-left: 5px;
+    border: none;
+}
+
+.endgame .headers{
+    text-align: left;
+}
+.endgame .attribute {
+    font-weight: bold;
+    background-color: #BCCEE8;
+    text-align: right;
+    padding-right: 8px;
+}
+
+.endgame .attributeValue{
+    padding-left: 8px;
+}
+
+.endgame .headers .attribute{
+    background-color: #2E6B99;    
+}
+.endgame .attributesTbody {
+    vertical-align: top;
+    background-color:#d4deef;
+}
+.anchorpanel{
+    padding:5px;
+    margin-top: 20px;
+    background-color: #2E6B99;
+    color: #FFFFFF;
+}
+.alphaNavigation{
+    margin-left: 11px;
+    background-color: #d4deef;
+    font-size:14px;
+}
+.alphaNavigation li{
+    display: inline;
+}
+.alphaNavigation ul{
+    list-style-type: none;
+    padding:0;
+}
+.alphaNavigation a{
+    display: inline-block;
+    padding-left: 25px;
+}
+
+.facetBody .facetRightPanel{
+    width: 49.9%;
+    float: left;
+}
+
+.facetBody .facetLeftPanel{
+    width: 50%;
+    float: left;
+}
+
+.sortedFacet{
+    background-color: #BCCEE8;
+    margin: 0px 11px;
+}
+.sortedFacet .facetLinkPanel{
+    padding-top: 3px;
+}
+
+.resultItem { 
+     padding:0; 
+     margin:0; 
+} 
+.resultItem li {
+     list-style-type:none; 
+}
+
+.resultItem img {
+     display:inline; 
+     vertical-align:middle;
+     padding-right:5px;
+}
+
+.resulttable tbody tr.odd {
+    background-color: #CEDCEF;
+}
+
+div.wicket-aa {background-color:white;
+    border:1px solid #CCCCCC;
+    color:black;
+}
+
+div.wicket-aa ul {
+    list-style-image:none;
+    list-style-position:outside;
+    list-style-type:none;
+    margin:0pt;
+    padding:5px;
+}
+
+div.wicket-aa ul li.selected {
+    background-color:#CCCCCC;
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/javascript/searchhi.js
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/javascript/searchhi.js	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/main/webapp/javascript/searchhi.js	(revision 2882)
@@ -0,0 +1,112 @@
+/* http://www.kryogenix.org/code/browser/searchhi/ */
+/* Modified 20021006 to fix query string parsing and add case insensitivity */
+/* Modified 20070316 to stop highlighting inside nosearchhi nodes */
+/* Modified 20081217 to do in-page searching and wrap up in an object */
+/* Modified 20081218 to scroll to first hit like 
+   http://www.woolyss.free.fr/js/searchhi_Woolyss.js and say when not found */
+/* Modified 20120112 to use the URL instead of referrer */
+
+searchhi = {
+  highlightWord: function(node,word) {
+    // Iterate into this nodes childNodes
+    if (node.hasChildNodes) {
+	    for (var hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
+		    searchhi.highlightWord(node.childNodes[hi_cn],word);
+	    }
+    }
+
+    // And do this node itself
+    if (node.nodeType == 3) { // text node
+	    tempNodeVal = node.nodeValue.toLowerCase();
+	    tempWordVal = word.toLowerCase();
+	    if (tempNodeVal.indexOf(tempWordVal) != -1) {
+		    var pn = node.parentNode;
+		    // check if we're inside a "nosearchhi" zone
+		    var checkn = pn;
+		    while (checkn.nodeType != 9 && 
+		    checkn.nodeName.toLowerCase() != 'body') { 
+		    // 9 = top of doc
+			    if (checkn.className.match(/\bnosearchhi\b/)) { return; }
+			    checkn = checkn.parentNode;
+		    }
+		    if (pn.className != "searchword") {
+			    // word has not already been highlighted!
+			    var nv = node.nodeValue;
+			    var ni = tempNodeVal.indexOf(tempWordVal);
+			    // Create a load of replacement nodes
+			    var before = document.createTextNode(nv.substr(0,ni));
+			    var docWordVal = nv.substr(ni,word.length);
+			    var after = document.createTextNode(nv.substr(ni+word.length));
+			    var hiwordtext = document.createTextNode(docWordVal);
+			    var hiword = document.createElement("span");
+			    hiword.className = "searchword";
+			    hiword.appendChild(hiwordtext);
+			    pn.insertBefore(before,node);
+			    pn.insertBefore(hiword,node);
+			    pn.insertBefore(after,node);
+			    pn.removeChild(node);
+			    searchhi.found += 1;
+			    if (searchhi.found == 1) pn.scrollIntoView();
+		    }
+	    }
+    }
+  },
+
+  googleSearchHighlight: function() {
+    var ref = document.URL;
+    if (ref.indexOf('?') == -1) return;
+    var qs = ref.substr(ref.indexOf('?')+1);
+    var qsa = qs.split('&');
+    for (var i=0;i<qsa.length;i++) {
+	    var qsip = qsa[i].split('=');
+      if (qsip.length == 1) continue;
+      if (qsip[0] == 'q' || qsip[0] == 'p') { // q= for Google, p= for Yahoo
+		    var wordstring = unescape(qsip[1].replace(/\+/g,' '));
+		    searchhi.process(wordstring);
+      }
+    }
+  },
+  
+  process: function(wordstring) {
+    searchhi.found = 0;
+    var words = wordstring.split(/\s+/);
+    for (w=0;w<words.length;w++) {
+	    searchhi.highlightWord(document.getElementsByTagName("body")[0],words[w]);
+    }
+    if (searchhi.found === 0) {
+      searchhi.nohits();
+    }
+  },
+  
+  nohits: function() {
+  },
+  
+  init: function() {
+    if (!document.createElement || !document.getElementsByTagName) return;
+    // hook up forms of type searchhi
+    var frms = document.getElementsByTagName("form");
+    for (var i=0; i<frms.length; i++) {
+      if (frms[i].className.match(/\bsearchhi\b/)) {
+        frms[i].onsubmit = function() {
+          var inps = this.getElementsByTagName("input");
+          for (var j=0; j<inps.length; j++) {
+            if (inps[j].type == "text") {
+              searchhi.process(inps[j].value);
+              return false;
+            }
+          }
+        };
+      }
+    }
+    // highlight search engine referrer results
+    searchhi.googleSearchHighlight();
+  }
+};
+
+(function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st =
+setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState;
+if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);}
+else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+document.addEventListener("DOMContentLoaded",i,false); } else if(e){     (
+function(){var t=document.createElement('doc:rdy');try{t.doScroll('left');
+i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(searchhi.init);
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/SearchPageQueryTest.java	(revision 2882)
@@ -0,0 +1,51 @@
+package eu.clarin.cmdi.vlo;
+
+import eu.clarin.cmdi.vlo.config.VloConfig;
+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;
+
+public class SearchPageQueryTest {
+
+    @Before
+    public void setup() {
+        
+        // read the configuration from the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+    }
+
+    @Test
+    public void testQueryParse() throws Exception {
+        PageParameters params = new PageParameters();
+        SearchPageQuery q = new SearchPageQuery(params);
+        assertEquals("", q.getSearchQuery());
+        assertEquals("*:*", q.getSolrQuery().getQuery());
+        assertEquals("name,id,description", q.getSolrQuery().getFields());
+        assertEquals(11, q.getSolrQuery().getFacetFields().length);
+        assertEquals("collection", q.getSolrQuery().getFacetFields()[0]);
+        assertEquals("continent", q.getSolrQuery().getFacetFields()[2]);
+        assertNull(q.getSolrQuery().getFilterQueries());
+
+        params = new PageParameters();
+        params.add(CommonParams.Q, "test");
+        params.add(CommonParams.FQ, "country:New Zealand");
+        q = new SearchPageQuery(params);
+        assertEquals("test", q.getSearchQuery());
+        assertEquals("test", q.getSolrQuery().getQuery());
+        assertEquals("name,id,description", q.getSolrQuery().getFields());
+        assertEquals(11, q.getSolrQuery().getFacetFields().length);
+        assertEquals("collection", q.getSolrQuery().getFacetFields()[0]);
+        assertEquals("continent", q.getSolrQuery().getFacetFields()[2]);
+        assertEquals(1, q.getSolrQuery().getFilterQueries().length);
+        assertEquals("country:New\\ Zealand", q.getSolrQuery().getFilterQueries()[0]);
+        assertEquals("New Zealand", q.getSelectedValue(new FacetField("country")));
+        assertNull(q.getSelectedValue(new FacetField("genre")));
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/Start.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/Start.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/Start.java	(revision 2882)
@@ -0,0 +1,48 @@
+package eu.clarin.cmdi.vlo;
+
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.bio.SocketConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+public class Start {
+
+    public static void main(String[] args) throws Exception {
+        Server server = new Server();
+        SocketConnector connector = new SocketConnector();
+        
+        // Set some timeout options to make debugging easier.
+        connector.setMaxIdleTime(1000 * 60 * 60);
+        connector.setSoLingerTime(-1);
+        connector.setPort(8081);
+        server.setConnectors(new Connector[] { connector });
+
+        WebAppContext bb = new WebAppContext();
+        bb.setServer(server);
+        bb.setContextPath("/");
+        bb.setWar("src/main/webapp");
+        
+        // START JMX SERVER
+        // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+        // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
+        // server.getContainer().addEventListener(mBeanContainer);
+        // mBeanContainer.start();
+        
+        server.addHandler(bb);
+
+        try {
+            System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
+            server.start();
+            System.in.read();
+            System.out.println(">>> STOPPING EMBEDDED JETTY SERVER"); 
+            // while (System.in.available() == 0) {
+            //   Thread.sleep(5000);
+            // }
+            server.stop();
+            server.join();
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.exit(100);
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/TestFacetedSearchPage.java	(revision 2882)
@@ -0,0 +1,41 @@
+package eu.clarin.cmdi.vlo;
+
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.junit.Test;
+
+/**
+ * Simple test using the WicketTester
+ */
+public class TestFacetedSearchPage {
+    
+    /**
+     * Check Wicket with simple test taken from the WicketTester Javadoc
+     */
+    @Test
+    //test code
+    public void testRenderYourPage() {
+
+        class PageWithLink extends WebPage {
+
+            public PageWithLink() {
+                add(new Label("myMessage", "Hello!"));
+                add(new Link("toYourPage") {
+                    @Override
+                    public void onClick() {
+                        setResponsePage(new LinkedPage("Hi!"));
+                    }
+                });
+            }
+
+            class LinkedPage extends WebPage {
+
+                public LinkedPage(String message) {
+                    add(new Label("yourMessage", message));
+                    info("Wicket Rocks ;-)");
+                }
+            }
+        }
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/AttributesComparatorTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/AttributesComparatorTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/AttributesComparatorTest.java	(revision 2882)
@@ -0,0 +1,32 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import static org.junit.Assert.assertEquals;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Test;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+
+public class AttributesComparatorTest {
+
+    @Test
+    public void testCompare() throws Exception {
+        AttributesComparator comp = new AttributesComparator(Arrays.asList(FacetConstants.FIELD_NAME, FacetConstants.FIELD_DESCRIPTION));
+        List<String> list = new ArrayList<String>();
+        list.add(FacetConstants.FIELD_DESCRIPTION);
+        list.add("aap");
+        list.add("noot");
+        list.add(FacetConstants.FIELD_NAME);
+        list.add("id");
+        Collections.sort(list, comp);
+        assertEquals(FacetConstants.FIELD_NAME, list.get(0));
+        assertEquals(FacetConstants.FIELD_DESCRIPTION, list.get(1));
+        assertEquals("aap", list.get(2));
+        assertEquals("id", list.get(3));
+        assertEquals("noot", list.get(4));
+    }
+
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanelTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanelTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanelTest.java	(revision 2882)
@@ -0,0 +1,109 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import eu.clarin.cmdi.vlo.VloWebApplication;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import java.util.List;
+import org.apache.solr.client.solrj.response.FacetField;
+import org.apache.solr.client.solrj.response.FacetField.Count;
+import org.apache.wicket.util.tester.WicketTester;
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FacetBoxPanelTest {
+
+    @Before
+    public void setUp() {
+        
+        WicketTester wicketTester;
+        
+        // read the configuration from the package configuration file
+        VloConfig.readPackagedConfig();
+        
+        // optionally, modify the configuration here
+        
+        // run the web application outside a web server container context
+        wicketTester = new WicketTester(new VloWebApplication(false));
+    }
+
+    @Test
+    public void testCalculateFacetBoxPanel() throws Exception {
+        FacetBoxPanel panel = new FacetBoxPanel("test", null);
+        panel.setMaxNrOfFacetValues(5);
+        FacetField facetField = new FacetField("test");
+        facetField.add("name5", 5);
+        facetField.add("name4", 4);
+        facetField.add("name3", 3);
+        facetField.add("name2", 2);
+        facetField.add("name1", 1);
+        facetField.add("name0", 1);
+        List<Count> list = panel.getFacetListForBox(facetField, true);
+        assertEquals(6, list.size());
+        assertEquals("name5", list.get(0).getName());
+        assertEquals("name0", list.get(5).getName());
+
+        facetField.insert("name6", 6);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(5, list.size());
+        assertEquals("name6", list.get(0).getName());
+        assertEquals("name2", list.get(4).getName());
+
+        facetField.insert("unknown", 7);
+        facetField.insert("unspecified", 7);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(5, list.size());
+        assertEquals("name6", list.get(0).getName());
+        assertEquals("name2", list.get(4).getName());
+
+        facetField = new FacetField("test");
+        facetField.add("unknown", 7);
+        facetField.add("name5", 5);
+        facetField.add("unspecified", 5);
+        facetField.add("name4", 4);
+        facetField.add("name3", 3);
+        facetField.add("name2", 2);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(6, list.size());
+        assertEquals("unknown", list.get(0).getName());
+        assertEquals("name2", list.get(5).getName());
+
+        facetField.insert("name8", 8);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(5, list.size());
+        assertEquals("name8", list.get(0).getName());
+        assertEquals("name2", list.get(4).getName());
+
+        facetField = new FacetField("test");
+        facetField.add("unknown", 7);
+        facetField.add("name5", 5);
+        facetField.add("unspecified", 5);
+        facetField.add("name4", 4);
+        facetField.add("name3", 3);
+        facetField.add("name2", 2);
+        facetField.add("name1", 1);
+        facetField.add("name0", 1);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(5, list.size());
+        assertEquals("name5", list.get(0).getName());
+        assertEquals("name4", list.get(1).getName());
+        assertEquals("name3", list.get(2).getName());
+        assertEquals("name2", list.get(3).getName());
+        assertEquals("name1", list.get(4).getName());
+
+        facetField = new FacetField("test");
+        facetField.add("unknown", 7);
+        facetField.add("name5", 5);
+        facetField.add("unspecified", 5);
+        facetField.add("name4", 4);
+        facetField.add("name3", 3);
+        facetField.add("name2", 1);
+        facetField.add("Unspecified", 1);
+        list = panel.getFacetListForBox(facetField, true);
+        assertEquals(5, list.size());
+        assertEquals("name5", list.get(0).getName());
+        assertEquals("name4", list.get(1).getName());
+        assertEquals("name3", list.get(2).getName());
+        assertEquals("name2", list.get(3).getName());
+        assertEquals("unknown", list.get(4).getName());
+    }
+}
Index: /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java
===================================================================
--- /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java	(revision 2882)
+++ /vlo/tags/2.13.beta.extra/vlo_web_app/src/test/java/eu/clarin/cmdi/vlo/pages/ResourceLinkPanelTest.java	(revision 2882)
@@ -0,0 +1,40 @@
+package eu.clarin.cmdi.vlo.pages;
+
+import eu.clarin.cmdi.vlo.FacetConstants;
+import eu.clarin.cmdi.vlo.VloWebApplication;
+import eu.clarin.cmdi.vlo.config.VloConfig;
+import org.apache.wicket.util.tester.WicketTester;
+import org.junit.Before;
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class ResourceLinkPanelTest {
+
+    public static final String _SAME_STRING = "http://blabla";
+    public static final String _RESOLVE_STRING = "hdl:1839/00-0000-0000-0004-3357-F";
+    public static final String _RESOLVE_OUT = "http://corpus1.mpi.nl/qfs1/media-archive/dobes_data/Marquesan/North_Marquesas/Nuku_Hiva/narratives/Media/Expl-Anc-Et-NH.m4a";
+    @Before
+    public void setUp() {
+        
+        WicketTester wicketTester;
+
+        // read the configuration from the packaged configuration file
+        VloConfig.readPackagedConfig();
+
+        // optionally, modify the configuration here
+        
+        // run the web application outside a web server container context
+        wicketTester = new WicketTester(new VloWebApplication(false));
+    }
+
+    @Test
+    public void getNameFromLinkTest(){
+        ResourceLinkPanel totest = new ResourceLinkPanel("a", FacetConstants.RESOURCE_TYPE_AUDIO, "a");
+        String uit = totest.getNameFromLink(_SAME_STRING);
+        Assert.assertTrue("Returns the same string if it does not start with the handle-prefix",uit.equals(_SAME_STRING));
+
+        uit = totest.getNameFromLink(_RESOLVE_STRING);
+        Assert.assertTrue("Returns the resolved url of the handle pid", uit.equals(_RESOLVE_OUT));
+    }
+}
