Changeset 2668


Ignore:
Timestamp:
03/08/13 16:37:08 (11 years ago)
Author:
keeloo
Message:

Cleaned up packaging. Ready to start tests on server

Location:
vlo/branches/vlo-2.13-param
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-2.13-param/src/main/assembly/installPackageBuilder.xml

    r2651 r2668  
    8787            <outputDirectory>bin</outputDirectory>
    8888        </fileSet>
    89 <!-- VLO WAR FILE -->
     89<!-- WEB APPLICATION -->
    9090        <!-- WAR FILE -->
    9191        <fileSet>
     
    103103            </includes>
    104104            <outputDirectory>config</outputDirectory>
    105         </fileSet>
     105        </fileSet> 
    106106
    107 <!-- SOLR -->
     107<!-- SOLR SERVER -->
    108108        <!-- SOLR WAR FILE -->
    109109        <fileSet>
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/bin/vlo_solr_importer.sh

    r2577 r2668  
    11#!/bin/sh
    22
    3 # This means it the script only works started from the bin directory,
    4 # adjust the workdir if you installed this somewhere and want to run it from anywhere.
     3# This means it the script only works started from the bin directory, adjust the
     4# workdir if you installed this somewhere and want to run it from anywhere.
    55
    6 # Filter of the Error stream from which to prevent the admins from getting daily "can't find java" emails
     6# Filter of the Error stream from which to prevent the admins from getting daily
     7#  "can't find java" emails
    78JAVA=`which java 2>/dev/null`
    89if [  -z $JAVA ]; then
     
    1112fi
    1213
     14# Please specify the configuration to the importer via a system property or via
     15# the command line. In case of a property add
     16#
     17# -DconfigFile=<pathToConfigFile>
     18#
     19# and in case of the command line, add
     20#
     21# -c <pathToConfigFile>
     22#
     23# to the JAVA command. Please note the a specification on the command line will
     24# take preference over a specification as a property.
    1325
    14 $JAVA -Xmx1024M -cp .:vlo-2.13-jar.jar eu.clarin.cmdi.vlo.importer.MetadataImporter
     26$JAVA -Xmx1024M -cp .:vlo-2.13-importer.jar eu.clarin.cmdi.vlo.importer.MetadataImporter
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java

    r2663 r2668  
    374374     * @throws IOException
    375375     */
    376     public static void main(String[] args) throws MalformedURLException, IOException {
     376    public static void main(String[] args) throws MalformedURLException, IOException { 
    377377
    378378        // application configuration
    379379        VloConfig config;
     380       
     381        // path to the configuration file
     382        String configFile = null;
    380383       
    381384        // use the Apache cli framework for getting command line parameters
     
    396399               
    397400                // the "c" option was specified, now get its value
    398                 String fileName;
    399                 fileName = cmd.getOptionValue("c");
    400                
    401                 // optionally, check for file existence here
    402                
    403                 // read the configuration from the externally supplied file
    404                 VloConfig.readConfig(fileName);
    405 
    406                 // optionally, modify the configuration here
    407                
    408                 // create and start the importer
    409                 MetadataImporter importer = new MetadataImporter();
    410                 importer.startImport();
    411                
    412                 // finished importing
    413                
    414                 if (VloConfig.printMapping()) {
    415                     File file = new File("xsdMapping.txt");
    416                     FacetMappingFactory.printMapping(file);
    417                     LOG.info("Printed facetMapping in " + file);
    418                 }
     401                configFile = cmd.getOptionValue("c");
    419402            }
    420403
    421404        } catch (org.apache.commons.cli.ParseException ex) {
    422405           
    423             // caught an exception caused by command line parsing
    424            
     406            /**
     407             * Caught an exception caused by command line parsing. Try to get
     408             * the name of the configuration file by querying the system
     409             * property.
     410             */
     411
    425412            String message = "Command line parsing failed. " + ex.getMessage();
    426                    
    427413            LOG.error(message);
    428414            System.err.println(message);
     415           
     416            String key;
     417            key = "configFile";
     418            configFile = System.getProperty(key);
     419        }
     420           
     421        if (configFile == null) {
     422           
     423            String message;
     424           
     425            message = "Could not get filename as system property either.";
     426            LOG.error(message);
     427            System.err.println(message);
     428        } else {
     429            // read the configuration from the externally supplied file
     430            VloConfig.readConfig(configFile);
     431
     432            // optionally, modify the configuration here
     433
     434            // create and start the importer
     435            MetadataImporter importer = new MetadataImporter();
     436            importer.startImport();
     437
     438            // finished importing
     439
     440            if (VloConfig.printMapping()) {
     441                File file = new File("xsdMapping.txt");
     442                FacetMappingFactory.printMapping(file);
     443                LOG.info("Printed facetMapping in " + file);
     444            }
    429445        }
    430446    }
  • vlo/branches/vlo-2.13-param/vlo_importer/xsdMapping.txt

    r2663 r2668  
    1 This file is generated on Mar 8, 2013 10:12:39 AM and only used to document the mapping.
     1This file is generated on Mar 8, 2013 1:59:24 PM and only used to document the mapping.
    22This file contains xsd name and a list of conceptName with xpath mappings that are generated.
    33---------------------
     4http://www.openarchives.org/OAI/2.0/oai_dc.xsd
     5FacetName:id
     6Mappings:
     7    /c:CMD/c:Header/c:MdSelfLink/text()
     8FacetName:collection
     9Mappings:
     10    /c:CMD/c:Header/c:MdCollectionDisplayName/text()
     11FacetName:name
     12Mappings:
     13    /c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceName/text()
     14FacetName:country
     15Mappings:
     16    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:spatial[@dcterms-type="ISO3166"]/text()
     17    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:coverage[@dcterms-type="ISO3166"]/text()
     18FacetName:language
     19Mappings:
     20    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language
     21    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language
     22    /c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()
     23FacetName:languages
     24Mappings:
     25    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:language/@olac-language
     26    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-language
     27    /c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:Languages/c:ISO639/c:iso-639-3-code/text()
     28FacetName:genre
     29Mappings:
     30    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/@olac-linguistic-type
     31FacetName:subject
     32Mappings:
     33    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject/@olac-linguistic-field
     34    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:subject[@dcterms-type="LCSH"]/text()
     35FacetName:resourceType
     36Mappings:
     37    /c:CMD/c:Components/c:LrtInventoryResource/c:LrtCommon/c:ResourceType/text()
     38    /c:CMD/c:Components/c:OLAC-DcmiTerms/c:type/text()
     39FacetName:nationalProject
     40Mappings:
     41    /c:CMD/c:Header/c:MdCollectionDisplayName/text()
     42FacetName:text
     43Mappings:
     44    /c:CMD//text()
     45FacetName:_componentProfile
     46Mappings:
     47    /c:CMD/c:Header/c:MdProfile/text()
     48---------------------
  • vlo/branches/vlo-2.13-param/vlo_web_app/pom.xml

    r2658 r2668  
    7373                </configuration>
    7474            </plugin>
     75           
    7576            <plugin>
    7677                <groupId>org.apache.maven.plugins</groupId>
     
    8182                </configuration>
    8283            </plugin>
     84           
    8385            <plugin>
    8486                <groupId>org.apache.maven.plugins</groupId>
     
    106108                </executions>
    107109            </plugin>
     110           
    108111            <plugin>
    109112                <artifactId>maven-assembly-plugin</artifactId>
     
    124127                </executions>
    125128            </plugin>
    126            
    127129        </plugins>
     130       
    128131    </build>
    129 
    130132</project>
Note: See TracChangeset for help on using the changeset viewer.