Changeset 988


Ignore:
Timestamp:
12/14/10 09:24:25 (13 years ago)
Author:
patdui
Message:
  • using Xpath to generate solrDocs
  • Added fileName to facets
  • Changed importerConfig to support caseInsensitive parameter
Location:
vlo/trunk/vlo_webapp/src
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/dao/FacetConstants.java

    r967 r988  
    55    public static final String FIELD_NAME = "name";
    66    public static final String FIELD_ID = "id";
     7    public static final String FIELD_ORIGIN = "origin";
     8    public static final String FIELD_FILENAME = "fileName";
    79
    810}
  • vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/CMDIDigester.java

    r950 r988  
    44import java.io.FileInputStream;
    55import java.io.IOException;
    6 import java.util.Map;
     6import java.util.List;
    77
    8 import org.apache.commons.digester.Digester;
     8import javax.xml.parsers.DocumentBuilder;
     9import javax.xml.parsers.DocumentBuilderFactory;
     10import javax.xml.parsers.ParserConfigurationException;
     11import javax.xml.xpath.XPath;
     12import javax.xml.xpath.XPathConstants;
     13import javax.xml.xpath.XPathExpressionException;
     14import javax.xml.xpath.XPathFactory;
     15
     16import org.slf4j.Logger;
     17import org.slf4j.LoggerFactory;
     18import org.w3c.dom.Document;
     19import org.w3c.dom.Node;
     20import org.w3c.dom.NodeList;
    921import org.xml.sax.InputSource;
    1022import org.xml.sax.SAXException;
    11 import org.xml.sax.XMLReader;
    12 import org.xml.sax.helpers.XMLReaderFactory;
    1323
    1424public class CMDIDigester {
    15 
     25    private final static Logger LOG = LoggerFactory.getLogger(CMDIDigester.class);
    1626    private final FacetMapping facetMapping;
    17     private XMLReader xmlReader;
     27    //    private XMLReader xmlReader;
     28    private DocumentBuilder builder;
    1829
    1930    public CMDIDigester(FacetMapping facetMapping) {
    2031        this.facetMapping = facetMapping;
     32        DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
     33        domFactory.setNamespaceAware(true);
    2134        try {
    22             xmlReader = createXmlReader();
    23         } catch (SAXException e) {
    24             throw new RuntimeException("Cannot instantiate xmlReader:", e);
     35            builder = domFactory.newDocumentBuilder();
     36        } catch (ParserConfigurationException e) {
     37            throw new RuntimeException("Cannot instantiate documentBuilder:", e);
    2538        }
     39        //        try {
     40        //            xmlReader = createXmlReader();
     41        //        } catch (SAXException e) {
     42        //            throw new RuntimeException("Cannot instantiate xmlReader:", e);
     43        //        }
    2644    }
    2745
    28     public CMDIData process(File file) throws IOException, SAXException {
     46    public CMDIData process(File file) throws IOException, SAXException, XPathExpressionException {
    2947        CMDIData result = null;
    3048        InputSource inputSource = new InputSource(new FileInputStream(file));
    3149        inputSource.setSystemId(file.toString());
    32 
    33         //        XPath xpath = XPathFactory.newInstance().newXPath(); TODO PD investigate XPATH for this.
    34         //        String expression = "/widgets/widget";
    35         //        InputSource inputSource = new InputSource(new FileInputStream(file));
    36         //        try {
    37         //            NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
    38         //           
    39         //        } catch (XPathExpressionException e) {
    40         //            e.printStackTrace();
    41         //        }
     50        XPath xpath = XPathFactory.newInstance().newXPath();
     51        result = createCMDIData(xpath, inputSource);
    4252
    4353        /**
     
    4656         * @see org.apache.commons.digester.Digester
    4757         */
    48         result = (CMDIData) createDigester().parse(inputSource);
     58        //result = (CMDIData) createDigester().parse(inputSource);
    4959        return result;
    5060    }
    5161
    52     private Digester createDigester() {
    53         Digester digester = new Digester(xmlReader);
    54         digester.setValidating(false);
    55         digester.addObjectCreate("CMD", CMDIData.class);
    56         digester.addBeanPropertySetter(facetMapping.getIdMapping(), "id");
    57         digester.addCallMethod("CMD/Resources/ResourceProxyList/ResourceProxy/", "addResource", 2);
    58         digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceRef", 0);
    59         digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceType", 1);
    60         Map<String, String> facetMap = facetMapping.getFacetMap();
    61         for (String facet : facetMap.keySet()) {
    62             matchDocumentField(digester, facetMap.get(facet), facet);
     62    private CMDIData createCMDIData(XPath xpath, InputSource inputSource) throws XPathExpressionException, SAXException, IOException {
     63        CMDIData result = new CMDIData();
     64        Document doc = builder.parse(inputSource);
     65        Node node = (Node) xpath.evaluate(facetMapping.getIdMapping(), doc, XPathConstants.NODE);
     66        if (node != null) {
     67            result.setId(node.getNodeValue());
    6368        }
    64         return digester;
     69        NodeList nodes = (NodeList) xpath.evaluate("CMD/Resources/ResourceProxyList/ResourceProxy", doc, XPathConstants.NODESET);
     70        for (int i = 0; i < nodes.getLength(); i++) {
     71            Node resourceNode = nodes.item(i);
     72            Node ref = (Node) xpath.evaluate("ResourceRef/text()", resourceNode, XPathConstants.NODE);
     73            Node type = (Node) xpath.evaluate("ResourceType/text()", resourceNode, XPathConstants.NODE);
     74            if (ref != null && type != null) {
     75                result.addResource(ref.getNodeValue(), type.getNodeValue());
     76            }
     77        }
     78        List<FacetConfiguration> facetList = facetMapping.getFacets();
     79        for (FacetConfiguration facetConfiguration : facetList) {
     80            matchDocumentField(result, facetConfiguration.getPattern(), facetConfiguration.getName(), doc, xpath);
     81        }
     82        return result;
    6583    }
    6684
    67     private void matchDocumentField(Digester digester, String pattern, String fieldName) {
    68         String[] split = pattern.split(",@", 2);
    69         String path = split[0];
    70         String attribute = split.length == 2 ? split[1] : null;
    71         digester.addCallMethod(path, "addDocField", 2);
    72         digester.addObjectParam(path, 0, fieldName);
    73         digester.addCallParam(path, 1, attribute);
     85    private void matchDocumentField(CMDIData result, String pattern, String fieldName, Document doc, XPath xpath)
     86            throws XPathExpressionException {
     87        NodeList nodes = (NodeList) xpath.evaluate(pattern, doc, XPathConstants.NODESET);
     88        if (nodes != null) {
     89            for (int i = 0; i < nodes.getLength(); i++) {
     90                result.addDocField(fieldName, nodes.item(i).getNodeValue());
     91            }
     92        } // 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.
    7493    }
    7594
    76     private XMLReader createXmlReader() throws SAXException {
    77         XMLReader xmlReader = XMLReaderFactory.createXMLReader();
    78         xmlReader.setFeature("http://xml.org/sax/features/validation", true);
    79         xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
    80         xmlReader.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    81         return xmlReader;
    82     }
     95    //    private Digester createDigester() {
     96    //        Digester digester = new Digester(xmlReader);
     97    //        digester.setValidating(false);
     98    //        digester.addObjectCreate("CMD", CMDIData.class);
     99    //        digester.addBeanPropertySetter(facetMapping.getIdMapping(), "id");
     100    //        digester.addCallMethod("CMD/Resources/ResourceProxyList/ResourceProxy/", "addResource", 2);
     101    //        digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceRef", 0);
     102    //        digester.addCallParam("CMD/Resources/ResourceProxyList/ResourceProxy/ResourceType", 1);
     103    //        //        Map<String, String> facetMap = facetMapping.getFacetMap();
     104    //        //        for (String facet : facetMap.keySet()) {
     105    //        //            matchDocumentField(digester, facetMap.get(facet), facet);
     106    //        //        }
     107    //        return digester;
     108    //    }
     109    //
     110    //    private void matchDocumentField(Digester digester, String pattern, String fieldName) {
     111    //        String[] split = pattern.split(",@", 2);
     112    //        String path = split[0];
     113    //        String attribute = split.length == 2 ? split[1] : null;
     114    //        digester.addCallMethod(path, "addDocField", 2);
     115    //        digester.addObjectParam(path, 0, fieldName);
     116    //        digester.addCallParam(path, 1, attribute);
     117    //    }
     118    //
     119    //    private XMLReader createXmlReader() throws SAXException {
     120    //        XMLReader xmlReader = XMLReaderFactory.createXMLReader();
     121    //        xmlReader.setFeature("http://xml.org/sax/features/validation", true);
     122    //        xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
     123    //        xmlReader.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
     124    //        return xmlReader;
     125    //    }
    83126
    84127}
  • vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/FacetMapping.java

    r801 r988  
    11package eu.clarin.cmdi.vlo.importer;
    22
    3 import java.util.Map;
     3import java.util.List;
    44
    55public class FacetMapping {
    6    
     6
    77    private String idMapping;
    8    
    9     private Map<String, String> facetMap;
     8
     9    private List<FacetConfiguration> facets;
    1010
    1111    public void setIdMapping(String idMapping) {
     
    1717    }
    1818
    19     public void setFacetMap(Map<String, String> facetMap) {
    20         this.facetMap = facetMap;
     19    public void setFacets(List<FacetConfiguration> facets) {
     20        this.facets = facets;
    2121    }
    2222
    23     public Map<String, String> getFacetMap() {
    24         return facetMap;
     23    public List<FacetConfiguration> getFacets() {
     24        return facets;
    2525    }
    2626
  • vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java

    r950 r988  
    88import java.util.List;
    99import java.util.Set;
     10
     11import javax.xml.xpath.XPathExpressionException;
    1012
    1113import org.apache.solr.client.solrj.SolrServerException;
     
    1921
    2022import eu.clarin.cmdi.vlo.Configuration;
     23import eu.clarin.cmdi.vlo.dao.FacetConstants;
    2124
    2225@SuppressWarnings("serial")
     
    104107        } catch (SAXException e) {
    105108            LOG.error("error in file: " + file + " Exception", e);
     109        } catch (XPathExpressionException e) {
     110            LOG.error("error in file: " + file + " Exception", e);
    106111        }
    107112        if (cmdiData != null && processedIds.add(cmdiData.getId())) {
     
    130135            LOG.info("Ignoring document without id, fileName: " + file);
    131136        } else {
    132             solrDocument.addField("origin", origin);
    133             solrDocument.addField("id", cmdiData.getId());
     137            solrDocument.addField(FacetConstants.FIELD_ORIGIN, origin);
     138            solrDocument.addField(FacetConstants.FIELD_ID, cmdiData.getId());
     139            solrDocument.addField(FacetConstants.FIELD_FILENAME, file.toString());
    134140            docs.add(solrDocument);
    135141            if (docs.size() == 1000) {
  • vlo/trunk/vlo_webapp/src/main/resources/importerConfig.xml

    r966 r988  
    44
    55  <bean id="importerConfig" class="eu.clarin.cmdi.vlo.importer.ImporterConfig">
    6     <property name="deleteFirst" value="true"/>
     6    <!--    <property name="deleteFirst" value="true"/>-->
    77    <property name="dataRoots">
    88      <list>
     
    1616          <property name="originName" value="Nijmegen corpora of casual speech" />
    1717          <property name="rootFile"
     18
    1819            value="/Users/patdui/data/snapshots2/data/corpora/qfs1/media-archive/casual_speech/Corpusstructure/casual_speech.imdi.cmdi" />
    1920          <property name="facetMapping" ref="imdiMapping"></property>
     
    120121        </bean>
    121122        <bean class="eu.clarin.cmdi.vlo.importer.DataRoot">
    122           <property name="originName" value="clarin.eu" />
     123          <property name="originName" value="CLARIN LRT" />
    123124          <property name="rootFile"
    124125            value="/Users/patdui/data/snapshots2/lrt-20101117/_corpusstructure/collection_lrt_inventory.cmdi" />
     
    128129    </property>
    129130  </bean>
    130  
     131
    131132  <!--
    132133    Mapping of facets to XPATH expressions. The facets should correspond to the facets described in the
     
    135136
    136137  <bean id="imdiMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping"> <!-- add year? -->
    137     <property name="idMapping" value="CMD/Header/MdSelfLink" />
    138     <property name="facetMap">
    139       <map>
    140         <entry key="name">
    141           <value>CMD/Components/Session/Name</value>
    142         </entry>
    143         <entry key="year">
    144           <value>CMD/Components/Session/Date</value>
    145         </entry>
    146         <entry key="continent">
    147           <value>CMD/Components/Session/MDGroup/Location/Continent</value>
    148         </entry>
    149         <entry key="country">
    150           <value>CMD/Components/Session/MDGroup/Location/Country</value>
    151         </entry>
    152         <entry key="language">
    153           <value>CMD/Components/Session/MDGroup/Content/Content_Languages/Content_Language/Id</value>
    154         </entry>
    155         <entry key="organisation">
    156           <value>CMD/Components/Session/MDGroup/Project/Contact/Organisation</value>
    157         </entry>
    158         <entry key="genre">
    159           <value>CMD/Components/Session/MDGroup/Content/Genre</value>
    160         </entry>
    161         <entry key="subject">
    162           <value>CMD/Components/Session/MDGroup/Content/Subject</value>
    163         </entry>
    164         <entry key="description">
    165           <value>CMD/Components/Session/descriptions/Description</value>
    166         </entry>
    167       </map>
    168     </property>
    169   </bean>
    170 
    171 
    172 <!-- /CMD/Components/OLAC-DcmiTerms/identifier (if starting with http://) -> open in original context (now: IMDI browser)  -->
    173    
     138    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" />
     139    <property name="facets">
     140      <list>
     141        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     142          <property name="name" value="name" />
     143          <property name="pattern" value="CMD/Components/Session/Name/text()" />
     144        </bean>
     145        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     146          <property name="name" value="year" />
     147          <property name="pattern" value="CMD/Components/Session/Date/text()" />
     148        </bean>
     149        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     150          <property name="name" value="continent" />
     151          <property name="pattern" value="CMD/Components/Session/MDGroup/Location/Continent/text()" />
     152        </bean>
     153        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     154          <property name="name" value="country" />
     155          <property name="pattern" value="CMD/Components/Session/MDGroup/Location/Country/text()" />
     156        </bean>
     157        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     158          <property name="name" value="language" />
     159          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Content_Languages/Content_Language/Id/text()" />
     160        </bean>
     161        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     162          <property name="name" value="organisation" />
     163          <property name="pattern" value="CMD/Components/Session/MDGroup/Project/Contact/Organisation/text()" />
     164        </bean>
     165        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     166          <property name="name" value="genre" />
     167          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Genre/text()" />
     168          <property name="caseSensitive" value="true" />
     169        </bean>
     170        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     171          <property name="name" value="subject" />
     172          <property name="pattern" value="CMD/Components/Session/MDGroup/Content/Subject/text()" />
     173          <property name="caseSensitive" value="true" />
     174        </bean>
     175        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     176          <property name="name" value="description" />
     177          <property name="pattern" value="CMD/Components/Session/descriptions/Description/text()" />
     178        </bean>
     179      </list>
     180    </property>
     181  </bean>
     182
     183
     184  <!--
     185    /CMD/Components/OLAC-DcmiTerms/identifier (if starting with http://) -> open in original context (now: IMDI browser)
     186  -->
     187
    174188  <bean id="olacMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping">
    175     <property name="idMapping" value="CMD/Header/MdSelfLink" /> <!-- And some other example see http://trac.clarin.eu/wiki/CmdiVirtualLanguageObservatory -->
    176     <property name="facetMap">
    177       <map>
    178         <entry key="name">
    179           <value>CMD/Components/OLAC-DcmiTerms/title</value>
    180         </entry>
    181         <!--
    182           <entry key="continent"> <value>CMD/Components/olac</value> </entry>-->
    183         <entry key="country">
     189    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" /> <!-- And some other example see http://trac.clarin.eu/wiki/CmdiVirtualLanguageObservatory -->
     190    <property name="facets">
     191      <list>
     192        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     193          <property name="name" value="name" />
     194          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/title/text()" />
     195        </bean>
     196        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     197          <property name="name" value="country" />
     198          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/spatial/text()" />
    184199          <!--
    185200            /CMD/Components/OLAC-DcmiTerms/spatial[@dcterms-type="ISO3166"] -> country
    186201            /CMD/Components/OLAC-DcmiTerms/coverage[@dcterms-type="ISO3166"] -> country
    187202          -->
    188           <value>/CMD/Components/OLAC-DcmiTerms/spatial</value>
    189         </entry>
    190         <entry key="language">
    191           <value>CMD/Components/OLAC-DcmiTerms/language,@olac-language</value>
    192         </entry>
    193         <entry key="organisation">
    194           <value>/CMD/Components/OLAC-DcmiTerms/publisher</value>
    195         </entry>
    196         <entry key="genre">
    197           <value>CMD/Components/OLAC-DcmiTerms/type,@olac-linguistic-type</value>
    198         </entry>
    199 <!--        <entry key="subject">-->
    200 <!--          <value>CMD/Components/OLAC-DcmiTerms/subject</value> -->
    201           <!-- [@dcterms-type="LCSH"]  -->
    202 <!--        </entry>-->
    203         <entry key="description">
    204           <value>CMD/Components/OLAC-DcmiTerms/description</value>
    205         </entry>
    206       </map>
    207     </property>
    208   </bean>
    209 
    210 
    211 
    212 
    213 
    214 <!-- /CMD/Components/LrtInventoryResource/LrtCommon/MetadataLink (if not existing: ReferenceLink?) -> open in original context -->
    215 
    216 <!--/CMD/Components/LrtInventoryResource/LrtCommon/ResourceType -> resource type-->
    217 <!--/CMD/Components/LrtInventoryResource/LrtCommon/Format-> format
    218 Resource type and format need to talk to Dieter what will the implications be?
    219 Also need to think about a way to get language and country codes, human readable?
    220 -->
     203        </bean>
     204        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     205          <property name="name" value="language" />
     206          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/language/@olac-language" />
     207        </bean>
     208        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     209          <property name="name" value="organisation" />
     210          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/publisher/text()" />
     211        </bean>
     212        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     213          <property name="name" value="genre" />
     214          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/type/@olac-linguistic-type" />
     215          <property name="caseSensitive" value="true" />
     216        </bean>
     217        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     218          <property name="name" value="description" />
     219          <property name="pattern" value="CMD/Components/OLAC-DcmiTerms/description/text()" />
     220        </bean>
     221        <!--
     222          <entry key="continent"> <value>CMD/Components/olac</value> </entry>-->
     223        <!--        <entry key="subject">-->
     224        <!--          <value>CMD/Components/OLAC-DcmiTerms/subject</value> -->
     225        <!-- [@dcterms-type="LCSH"]  -->
     226        <!--        </entry>-->
     227      </list>
     228    </property>
     229  </bean>
     230
     231
     232
     233
     234
     235  <!--
     236    /CMD/Components/LrtInventoryResource/LrtCommon/MetadataLink (if not existing: ReferenceLink?) -> open in original
     237    context
     238  -->
     239  <!--/CMD/Components/LrtInventoryResource/LrtCommon/ResourceType -> resource type-->
     240  <!--
     241    /CMD/Components/LrtInventoryResource/LrtCommon/Format-> format Resource type and format need to talk to Dieter what
     242    will the implications be? Also need to think about a way to get language and country codes, human readable?
     243  -->
    221244
    222245  <bean id="lrtMapping" class="eu.clarin.cmdi.vlo.importer.FacetMapping">
    223     <property name="idMapping" value="CMD/Header/MdSelfLink" />
    224     <property name="facetMap">
    225       <map>
    226         <entry key="name">
    227           <value>CMD/Components/LrtInventoryResource/LrtCommon/ResourceName</value>
    228         </entry>
    229 <!--        <entry key="continent">-->
    230 <!--          <value></value>-->
    231 <!--        </entry>-->
    232         <entry key="country">
    233           <value>CMD/Components/LrtInventoryResource/LrtCommon/Countries/Country/code</value>
    234         </entry>
    235         <entry key="language">
    236           <value>CMD/Components/LrtInventoryResource/LrtCommon/Languages/ISO639/iso-639-3-code</value>
    237         </entry>
    238         <entry key="organisation">
    239           <value>CMD/Components/LrtInventoryResource/LrtCommon/Institute</value>
    240         </entry>
    241 <!--        <entry key="genre">-->
    242 <!--          <value></value>-->
    243 <!--        </entry>-->
    244 <!--        <entry key="subject">-->
    245 <!--          <value></value>-->
    246 <!--        </entry>-->
    247         <entry key="description">
    248           <value>CMD/Components/LrtInventoryResource/LrtCommon/Description</value>
    249         </entry>
    250         <entry key="year">
    251           <value>CMD/Components/LrtInventoryResource/LrtCommon/FinalizationYearResourceCreation</value>
    252         </entry>
    253       </map>
     246    <property name="idMapping" value="CMD/Header/MdSelfLink/text()" />
     247    <property name="facets">
     248      <list>
     249        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     250          <property name="name" value="name" />
     251          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/ResourceName/text()" />
     252        </bean>
     253        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     254          <property name="name" value="country" />
     255          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Countries/Country/code/text()" />
     256        </bean>
     257        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     258          <property name="name" value="language" />
     259          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Languages/ISO639/iso-639-3-code/text()" />
     260        </bean>
     261        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     262          <property name="name" value="organisation" />
     263          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Institute/text()" />
     264        </bean>
     265        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     266          <property name="name" value="year" />
     267          <property name="pattern"
     268            value="CMD/Components/LrtInventoryResource/LrtCommon/FinalizationYearResourceCreation/text()" />
     269        </bean>
     270        <bean class="eu.clarin.cmdi.vlo.importer.FacetConfiguration">
     271          <property name="name" value="description" />
     272          <property name="pattern" value="CMD/Components/LrtInventoryResource/LrtCommon/Description/text()" />
     273        </bean>
     274        <!--        <entry key="continent">-->
     275        <!--          <value></value>-->
     276        <!--        </entry>-->
     277        <!--        <entry key="genre">-->
     278        <!--          <value></value>-->
     279        <!--        </entry>-->
     280        <!--        <entry key="subject">-->
     281        <!--          <value></value>-->
     282        <!--        </entry>-->
     283      </list>
    254284    </property>
    255285  </bean>
  • vlo/trunk/vlo_webapp/src/test/java/eu/clarin/cmdi/vlo/importer/CMDIDigesterTest.java

    r966 r988  
    77import java.io.File;
    88import java.io.IOException;
    9 import java.util.Collection;
    109import java.util.List;
    1110
     
    1716import org.springframework.beans.factory.BeanFactory;
    1817import org.springframework.context.support.ClassPathXmlApplicationContext;
    19 
    20 import eu.clarin.cmdi.vlo.importer.CMDIDigester;
    2118
    2219public class CMDIDigesterTest {
Note: See TracChangeset for help on using the changeset viewer.