Changeset 6754


Ignore:
Timestamp:
11/09/15 13:22:00 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:

merged with trunk 3.4

Location:
vlo/branches/vlo-3.3-oeaw/vlo-commons
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-commons

    • Property svn:mergeinfo set to (toggle deleted branches)
      /vlo/trunk/vlo-commonsmergedeligible
      /vlo/branches/to-wicket-1.6-twagoo/vlo-commons4212-4219
      /vlo/branches/vlo-2.13-param/vlo-commons2570-2767
      /vlo/branches/vlo-3.0/vlo-commons5201
      /vlo/branches/vlo-3.2-ticket575/vlo-commons6112-6188
      /vlo/branches/vlo-ticket761/vlo-commons6189-6283
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/pom.xml

    r6412 r6754  
    66        <groupId>eu.clarin.cmdi</groupId>
    77        <artifactId>vlo</artifactId>
    8         <version>3.3-SNAPSHOT</version>
     8        <version>3.4-SNAPSHOT</version>
    99    </parent>
    1010    <groupId>eu.clarin.cmdi</groupId>
    1111    <artifactId>vlo-commons</artifactId>
    12     <version>3.3-SNAPSHOT</version>
     12    <version>3.4-SNAPSHOT</version>
    1313    <name>VLO Commons</name>
    1414    <url>http://maven.apache.org</url>
     
    126126       
    127127        <profile>
     128            <!-- For deployment to catalog-clarin.esc.rzg.mpg.de -->
     129            <id>dev-vm</id>
     130            <properties>
     131                <vloconfig.solrUrl>http://localhost:8080/vlo-solr/core0/</vloconfig.solrUrl>
     132                <vloconfig.dataRootsFile>file:/lat/webapps/vlo/dataroots-testvm.xml</vloconfig.dataRootsFile>
     133            </properties>
     134        </profile>
     135       
     136        <profile>
    128137            <!-- For deployment to vlo.clarin.eu -->
    129138            <id>production</id>
     
    138147       
    139148        <profile>
    140             <!-- For deployment to vlo.clarin.eu -->
    141             <id>dev-vm</id>
    142             <properties>
    143                 <vloconfig.solrUrl>http://localhost:8080/vlo-solr/core0/</vloconfig.solrUrl>
    144                 <vloconfig.dataRootsFile>dataroots-testvm.xml</vloconfig.dataRootsFile>
    145             </properties>
    146         </profile>
    147        
    148         <profile>
    149             <!--  For deployment to beta.vlo.clarin.eu -->
     149            <!--  For deployment to beta-vlo.clarin.eu -->
    150150            <id>beta</id>
    151151            <properties>
    152                 <vloconfig.solrUrl><!-- TODO!!! --></vloconfig.solrUrl>
    153                 <vloconfig.homeUrl>http://beta.vlo.clarin.eu</vloconfig.homeUrl>
    154                 <vloconfig.dataRootsFile>dataroots-production.xml</vloconfig.dataRootsFile>
     152                <vloconfig.deleteAllFirst>false</vloconfig.deleteAllFirst>
     153                <vloconfig.maxDaysInSolr>7</vloconfig.maxDaysInSolr>
     154                <vloconfig.solrUrl>http://172.17.42.1:8080/solr/core0/</vloconfig.solrUrl>
     155                <vloconfig.homeUrl>http://beta-vlo.clarin.eu</vloconfig.homeUrl>
     156                <vloconfig.dataRootsFile>dataroots-beta.xml</vloconfig.dataRootsFile>
    155157            </properties>
    156158        </profile>
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java

    r6716 r6754  
    9393     */
    9494    public static final String LANGUAGE_CODE_PATTERN = "(name|code):(.*)";
     95   
     96   
     97    /**
     98     * Name of the Solr request handler for fast queries (no sorting, boosting or aliases)
     99     */
     100    public static final String SOLR_REQUEST_HANDLER_FAST = "fast";
    95101}
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/LanguageCodeUtils.java

    r6288 r6754  
    151151        } catch (Exception e) {
    152152            if (CommonUtils.SWALLOW_LOOKUP_ERRORS) {
     153                LOG.warn("Ignoring exception", e);
    153154                return new HashMap<String, String>();
    154155            } else {
    155                 throw new RuntimeException("Cannot instantiate postProcessor:", e);
     156                throw new RuntimeException("Cannot instantiate postProcessor. URL: " + url, e);
    156157            }
    157158        }
     
    165166        } catch (Exception e) {
    166167            if (CommonUtils.SWALLOW_LOOKUP_ERRORS) {
     168                LOG.warn("Ignoring exception", e);
    167169                return new HashMap<String, String>();
    168170            } else {
    169                 throw new RuntimeException("Cannot instantiate postProcessor:", e);
     171                throw new RuntimeException("Cannot instantiate postProcessor. URL: " + url, e);
    170172            }
    171173        }
     
    174176    private Map<String, String> createSilToIsoCodeMap() {
    175177        LOG.debug("Creating silToIso code map.");
     178        final String urlString = config.getSilToISO639CodesUrl();
    176179        try {
    177180            Map<String, String> result = new ConcurrentHashMap<String, String>();
    178181            DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    179182            domFactory.setNamespaceAware(true);
    180             URL url = new URL(config.getSilToISO639CodesUrl());
     183            URL url = new URL(urlString);
    181184            DocumentBuilder builder = domFactory.newDocumentBuilder();
    182185            Document doc = builder.parse(url.openStream());
     
    192195        } catch (Exception e) {
    193196            if (CommonUtils.SWALLOW_LOOKUP_ERRORS) {
     197                LOG.warn("Ignoring exception", e);
    194198                return new HashMap<String, String>();
    195199            } else {
    196                 throw new RuntimeException("Cannot instantiate postProcessor:", e);
     200                throw new RuntimeException("Cannot instantiate postProcessor. URL: " + urlString, e);
    197201            }
    198202        }
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java

    r6716 r6754  
    113113    private boolean showResultScores = false;
    114114
     115    private boolean processHierarchies = true;
     116
    115117    /**
    116118     * A set of fields to be excluded from display<br><br>
     
    11211123   
    11221124   
     1125
     1126    /**
     1127     * Get the value of processHierarchies
     1128     *
     1129     * @return the value of processHierarchies
     1130     */
     1131    public boolean isProcessHierarchies() {
     1132        return processHierarchies;
     1133    }
     1134
     1135    /**
     1136     * Set the value of processHierarchies
     1137     *
     1138     * @param processHierarchies new value of processHierarchies
     1139     */
     1140    public void setProcessHierarchies(boolean processHierarchies) {
     1141        this.processHierarchies = processHierarchies;
     1142    }
    11231143}
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/main/resources/VloConfig.xml

    r6718 r6754  
    6767        <facetField>resourceClass</facetField>
    6868                <facetField>resourceClassOrig</facetField>
    69         <facetField>continent</facetField>
    7069        <facetField>country</facetField>
    7170        <facetField>modality</facetField>
     
    9998        <searchResultField>subject</searchResultField>
    10099        <searchResultField>genre</searchResultField>
    101         <searchResultField>organization</searchResultField>
     100        <searchResultField>organisation</searchResultField>
    102101        <searchResultField>collection</searchResultField>
    103102        <searchResultField>nationalProject</searchResultField>
     
    124123        <technicalField>_componentProfile</technicalField>
    125124        <technicalField>_hierarchyWeight</technicalField>
    126         <technicalField>_hasPart</technicalField>
    127         <technicalField>_isPartOf</technicalField>
     125        <technicalField>_hasPartCount</technicalField>
    128126    </technicalFields>
    129127   
     
    157155   
    158156    <!-- makes the score for the result ranking visible in the search results -->
    159     <showResultScores>true</showResultScores>
     157    <showResultScores>false</showResultScores>
     158   
     159    <processHierarchies>true</processHierarchies>
    160160</VloConfig>
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/main/resources/dataroots-testvm.xml

    r6412 r6754  
    33    <DataRoot>
    44        <originName>European Library</originName>
    5         <rootFile>/lat/apache/htdocs/oai-harvester/work/european-library/results/cmdi/</rootFile>           
    6         <prefix>http://catalog-clarin.esc.rzg.mpg.de/cmdi/</prefix>
    7         <tostrip>/lat/apache/htdocs/oai-harvester/work/</tostrip>
     5        <rootFile>/lat/apache/htdocs/oai-harvester/european-library/results/cmdi/</rootFile>           
     6        <prefix>http://catalog-clarin.esc.rzg.mpg.de/oai-harvester/</prefix>
     7        <tostrip>/lat/apache/htdocs/oai-harvester/</tostrip>
    88        <deleteFirst>false</deleteFirst>
    99    </DataRoot>
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/DefaultVloConfigFactoryTest.java

    r6428 r6754  
    633633                "resourceClass",
    634634                "resourceClassOrig",
    635                 "continent",
    636635                "country",
    637636                "modality",
     
    659658            "resourceClass",
    660659            "modality",
    661             "continent",
    662660            "genre",
    663661            "country",
     
    687685                "resourceClass",
    688686                "modality",
    689                 "continent",
    690687                "genre",
    691688                "country",
  • vlo/branches/vlo-3.3-oeaw/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/VloConfigMarshallerTest.java

    r6429 r6754  
    6060        assertNotNull(config);
    6161        assertEquals(testProps.getProperty("solrUrl"), config.getSolrUrl());
    62         assertEquals(17, config.getFacetFields().size());
     62        assertEquals(13, config.getFacetFields().size());
    6363    }
    6464
Note: See TracChangeset for help on using the changeset viewer.