Changeset 2741


Ignore:
Timestamp:
03/26/13 15:23:25 (11 years ago)
Author:
keeloo
Message:

Added test for the config package. Again. Somehow the earlier revision has been lost. Also added a parameter to set the size of the number of documents stored on the heap.

Location:
vlo/branches/vlo-2.13-param/vlo_importer/src
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java

    r2677 r2741  
    158158    private static boolean deleteAllFirst = false;
    159159   
     160    @Element
     161    private static int maxOnHeap = 1000;
     162   
    160163    @Element
    161164    private static boolean printMapping = false;
     
    237240     * application.
    238241     */
     242   
     243    /**
     244     * Get the value of the maxOnHeap parameter<br><br>
     245     *
     246     * For a description of the parameter, refer to the general VLO
     247     * documentation.
     248     *
     249     * @return the value
     250     */
     251    public static int getMaxOnHeap (){
     252        return maxOnHeap;
     253    }
     254   
     255   
     256    /**
     257     * Set the value of the maxOnHeap parameter<br><br>
     258     *
     259     * For a description of the parameter, refer to the general VLO
     260     * documentation.
     261     *
     262     * @return the value
     263     */
     264    public static void setMaxOnHeap (int param){
     265        maxOnHeap = param;
     266    }
     267   
     268    /**
     269     * Get the list of dataRoots parameters<br><br>
     270     *
     271     * For a description of the parameter, refer to the general VLO
     272     * documentation.
     273     *
     274     * @return the value
     275     */
    239276    public static List<DataRoot> getDataRoots() {
    240277        return dataRoots;
     
    242279   
    243280    /**
    244      * Set the value of the dataRoots parameter<br><br>
     281     * Set the value of a list of dataRoots parameters<br><br>
    245282     *
    246283     * For a description of the parameter, refer to the general VLO
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/java/eu/clarin/cmdi/vlo/importer/MetadataImporter.java

    r2677 r2741  
    301301        addResourceData(solrDocument, cmdiData);
    302302        docs.add(solrDocument);
    303         if (docs.size() == 1000) {
     303        if (docs.size() == VloConfig.getMaxOnHeap()) {
    304304            sendDocs();
    305305        }
  • vlo/branches/vlo-2.13-param/vlo_importer/src/main/resources/VloConfig.xml

    r2663 r2741  
    22   
    33    <deleteAllFirst>false</deleteAllFirst>
     4   
     5    <maxOnHeap>500</maxOnHeap>
    46   
    57    <printMapping>false</printMapping>
Note: See TracChangeset for help on using the changeset viewer.