Changeset 6006


Ignore:
Timestamp:
2003-11-25T16:32:41+13:00 (20 years ago)
Author:
jmt12
Message:

The number of build indexes now takes into account the number of partitions and the number of index languages. It's still waiting on the Phind stuff as I need to talk to Michael about what sentinel values will survive the horror of translation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java

    r5581 r6006  
    4040import javax.swing.JProgressBar;
    4141import org.greenstone.gatherer.Gatherer;
     42import org.greenstone.gatherer.cdm.CollectionDesignManager;
    4243import org.greenstone.gatherer.shell.GImportProgressMonitor;
    4344import org.greenstone.gatherer.shell.GShellProgressMonitor;
     
    8384    static final int CTID_PS     = 16; // Creating the info database - parsed successfully
    8485    static final int CAF         = 17; // Creating auxiliary files
     86    static final int PHIND       = 18; // Running Phind
     87    static final int SUFFIX      = 19; // Running Suffix
     88    static final int SUFFIX_DONE = 20; // Suffix Complete
    8589
    8690    static final String BI_STR   = "*** building index";
     
    97101    static final String ITT_STR  = "inverting the text";
    98102    static final String PS_STR   = "hash";
     103    static final String PHIND_STR = "*** Phind.pm";
     104    static final String PHIND_SUFFIX_STR = "suffix:";
     105    static final String PHIND_DONE_STR = "Done:";
    99106
    100107    public GBuildProgressMonitor(GImportProgressMonitor import_progress) {
     
    169176            ///ystem.err.println("CTID [" + state + "] - " + ((progress_bar.getValue() * 100) / MAX) + "%");
    170177        }
     178        else if(line.startsWith(PHIND_STR)) {
     179           
     180        }
    171181        else if(line.indexOf(CAF_STR) != -1) {
    172182            // Skip the progres up to this point
     
    320330     */
    321331    public void start() {
     332    CollectionDesignManager cdm = Gatherer.c_man.getCollection().cdm;
    322333    progress_bar.setValue(MIN);
    323     num_indexes = Gatherer.c_man.getCollection().cdm.index_manager.getSize();
     334    num_indexes = cdm.index_manager.getSize();
     335    int num_partitions = cdm.subcollectionindex_manager.getSize();
     336    if(num_partitions > 0) {
     337        num_indexes = num_indexes * num_partitions;
     338    }
     339    int num_languages = cdm.language_manager.getSize();
     340    if(num_languages > 0) {
     341        num_indexes = num_indexes * num_languages;
     342    }
    324343    num_docs = import_progress.getNumberOfDocuments();
     344    cdm = null;
    325345    }
    326346    /** This method indicates the process is complete.
Note: See TracChangeset for help on using the changeset viewer.