Index: /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDigester.java
===================================================================
--- /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDigester.java	(revision 994)
+++ /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDigester.java	(revision 995)
@@ -25,5 +25,4 @@
     private final static Logger LOG = LoggerFactory.getLogger(CMDIDigester.class);
     private final FacetMapping facetMapping;
-    //    private XMLReader xmlReader;
     private DocumentBuilder builder;
 
@@ -37,9 +36,4 @@
             throw new RuntimeException("Cannot instantiate documentBuilder:", e);
         }
-        //        try {
-        //            xmlReader = createXmlReader();
-        //        } catch (SAXException e) {
-        //            throw new RuntimeException("Cannot instantiate xmlReader:", e);
-        //        }
     }
 
@@ -50,11 +44,4 @@
         XPath xpath = XPathFactory.newInstance().newXPath();
         result = createCMDIData(xpath, inputSource);
-
-        /**
-         * Do not reuse the digester it holds state on bad parses. We can reuse the xmlReader. Creating a new Digester or reusing an
-         * instance gives similar performance.
-         * @see org.apache.commons.digester.Digester
-         */
-        //result = (CMDIData) createDigester().parse(inputSource);
         return result;
     }
@@ -92,36 +79,3 @@
         } // else do nothing it is perfectly acceptable that not all data is in a cmdi file so not everything will be matched. E.G xpath expression evaluation CMDI session files will never match on CMD corpus files.
     }
-
-    //    private Digester createDigester() {
-    //        Digester digester = new Digester(xmlReader);
-    //        digester.setValidating(false);
-    //        digester.addObjectCreate("CMD", CMDIData.class);
-    //        digester.addBeanPropertySetter(facetMapping.getIdMapping(), "id");
-    //        digester.addCallMethod("CMD/Resources/ResourceProxyList/ResourceProxy/", "addResource", 2);
-    //        digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceRef", 0);
-    //        digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceType", 1);
-    //        //        Map<String, String> facetMap = facetMapping.getFacetMap();
-    //        //        for (String facet : facetMap.keySet()) {
-    //        //            matchDocumentField(digester, facetMap.get(facet), facet);
-    //        //        }
-    //        return digester;
-    //    }
-    //
-    //    private void matchDocumentField(Digester digester, String pattern, String fieldName) {
-    //        String[] split = pattern.split(",@", 2);
-    //        String path = split[0];
-    //        String attribute = split.length == 2 ? split[1] : null;
-    //        digester.addCallMethod(path, "addDocField", 2);
-    //        digester.addObjectParam(path, 0, fieldName);
-    //        digester.addCallParam(path, 1, attribute);
-    //    }
-    //
-    //    private XMLReader createXmlReader() throws SAXException {
-    //        XMLReader xmlReader = XMLReaderFactory.createXMLReader();
-    //        xmlReader.setFeature("http://xml.org/sax/features/validation", true);
-    //        xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
-    //        xmlReader.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
-    //        return xmlReader;
-    //    }
-
 }
Index: /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java
===================================================================
--- /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java	(revision 994)
+++ /vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/FacetConfiguration.java	(revision 995)
@@ -30,3 +30,8 @@
         return name;
     }
+    
+    @Override
+    public String toString() {
+        return "name="+name+", pattern="+pattern;
+    }
 }
Index: /vlo/trunk/vlo_webapp/src/main/resources/importerConfig.xml
===================================================================
--- /vlo/trunk/vlo_webapp/src/main/resources/importerConfig.xml	(revision 994)
+++ /vlo/trunk/vlo_webapp/src/main/resources/importerConfig.xml	(revision 995)
@@ -136,44 +136,44 @@
 
   <bean id="imdiMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping"> <!-- add year? -->
-    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" />
+    <property name="idMapping" value="/CMD/Header/MdSelfLink/text()" />
     <property name="facets">
       <list>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="name" />
-          <property name="pattern" value="CMD/Components/Session/Name/text()" />
+          <property name="pattern" value="/CMD/Components/Session/Name/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="year" />
-          <property name="pattern" value="CMD/Components/Session/Date/text()" />
+          <property name="pattern" value="/CMD/Components/Session/Date/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="continent" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Location/Continent/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Location/Continent/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="country" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Location/Country/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Location/Country/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="language" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Content_Languages/Content_Language/Id/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Content/Content_Languages/Content_Language/Id/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="organisation" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Project/Contact/Organisation/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Project/Contact/Organisation/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="genre" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Genre/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Content/Genre/text()" />
           <property name="caseInsensitive" value="true" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="subject" />
-          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Subject/text()" />
+          <property name="pattern" value="/CMD/Components/Session/MDGroup/Content/Subject/text()" />
           <property name="caseInsensitive" value="true" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="description" />
-          <property name="pattern" value="CMD/Components/Session/descriptions/Description/text()" />
+          <property name="pattern" value="/CMD/Components/Session/descriptions/Description/text()" />
         </bean>
       </list>
@@ -187,14 +187,14 @@
 
   <bean id="olacMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping">
-    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" /> <!-- And some other example see http://trac.clarin.eu/wiki/CmdiVirtualLanguageObservatory -->
+    <property name="idMapping" value="/CMD/Header/MdSelfLink/text()" /> <!-- And some other example see http://trac.clarin.eu/wiki/CmdiVirtualLanguageObservatory -->
     <property name="facets">
       <list>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="name" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/title/text()" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/title/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="country" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/spatial/text()" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/spatial/text()" />
           <!--
             /CMD/Components/OLAC-DcmiTerms/spatial[@dcterms-type="ISO3166"] -> country
@@ -204,18 +204,18 @@
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="language" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/language/@olac-language" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/language/@olac-language" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="organisation" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/publisher/text()" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/publisher/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="genre" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/type/@olac-linguistic-type" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/type/@olac-linguistic-type" />
           <property name="caseInsensitive" value="true" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="description" />
-          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/description/text()" />
+          <property name="pattern" value="/CMD/Components/OLAC-DcmiTerms/description/text()" />
         </bean>
         <!--
@@ -244,31 +244,31 @@
 
   <bean id="lrtMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping">
-    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" />
+    <property name="idMapping" value="/CMD/Header/MdSelfLink/text()" />
     <property name="facets">
       <list>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="name" />
-          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/ResourceName/text()" />
+          <property name="pattern" value="/CMD/Components/LrtInventoryResource/LrtCommon/ResourceName/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="country" />
-          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Countries/Country/code/text()" />
+          <property name="pattern" value="/CMD/Components/LrtInventoryResource/LrtCommon/Countries/Country/Code/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="language" />
-          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Languages/ISO639/iso-639-3-code/text()" />
+          <property name="pattern" value="/CMD/Components/LrtInventoryResource/LrtCommon/Languages/ISO639/iso-639-3-code/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="organisation" />
-          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Institute/text()" />
+          <property name="pattern" value="/CMD/Components/LrtInventoryResource/LrtCommon/Institute/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="year" />
           <property name="pattern"
-            value="CMD/Components/LrtInventoryResource/LrtCommon/FinalizationYearResourceCreation/text()" />
+            value="/CMD/Components/LrtInventoryResource/LrtCommon/FinalizationYearResourceCreation/text()" />
         </bean>
         <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
           <property name="name" value="description" />
-          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Description/text()" />
+          <property name="pattern" value="/CMD/Components/LrtInventoryResource/LrtCommon/Description/text()" />
         </bean>
         <!--        <entry key="continent">-->
Index: /vlo/trunk/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDigesterTest.java
===================================================================
--- /vlo/trunk/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDigesterTest.java	(revision 994)
+++ /vlo/trunk/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDigesterTest.java	(revision 995)
@@ -379,9 +379,6 @@
                 "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")); //TODO PD curate year needs to be only the year also for olac, lrt
+        assertEquals("2002-10-30", doc.getFieldValue("year"));
         assertEquals(null, doc.getFieldValue("subject"));
-//TODO PD make it work check TRAC ticket to get resources in
-//        Collection<Object> fieldValue = doc.getFieldValues("resource");
-//        assertEquals(2, fieldValue.size());
     }
 
@@ -534,5 +531,5 @@
         assertEquals(null, doc.getFieldValue("organisation"));
         assertEquals("transcription", doc.getFieldValue("genre"));
-      //  assertEquals("Kuna", doc.getFieldValue("subject"));
+        //  assertEquals("Kuna", doc.getFieldValue("subject"));
         assertEquals(2, doc.getFieldValues("description").size());
     }
@@ -581,8 +578,63 @@
     }
 
-    //TODO PD add LRT test
-    
+    @Test
+    public void testLrtCollection() throws Exception {
+        String content = "";
+        content += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+        content += "<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);
+        CMDIDigester digester = new CMDIDigester(getLrtFacetMap());
+        CMDIData data = digester.process(cmdiFile);
+        assertEquals("clarin.eu:lrt:433", data.getId());
+        List<String> resources = data.getResources();
+        assertEquals(0, resources.size());
+        SolrInputDocument doc = data.getSolrDocument();
+        assertNotNull(doc);
+        assertEquals(5, 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("est", doc.getFieldValue("language"));
+        assertEquals("EE", 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"));
+    }
+
     private FacetMapping getOlacFacetMap() {
-        BeanFactory factory = new ClassPathXmlApplicationContext(new String[] { "importerConfig.xml" }); 
+        BeanFactory factory = new ClassPathXmlApplicationContext(new String[] { "importerConfig.xml" });
         FacetMapping facetMapping = (FacetMapping) factory.getBean("olacMapping");
         return facetMapping;
@@ -592,4 +644,10 @@
         BeanFactory factory = new ClassPathXmlApplicationContext(new String[] { "importerConfig.xml" });
         FacetMapping facetMapping = (FacetMapping) factory.getBean("imdiMapping");
+        return facetMapping;
+    }
+
+    private FacetMapping getLrtFacetMap() {
+        BeanFactory factory = new ClassPathXmlApplicationContext(new String[] { "importerConfig.xml" });
+        FacetMapping facetMapping = (FacetMapping) factory.getBean("lrtMapping");
         return facetMapping;
     }
