Ignore:
Timestamp:
2004-10-12T12:19:22+13:00 (20 years ago)
Author:
kjdon
Message:

some mods, not sure what they are. will tidy them up soon, but didn't want to leave the package uncompilable so committing this now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/greenstone3-extensions/vishnu/src/vishnu/builder/CollectionBuilder.java

    r8189 r8290  
    1212    String collDesc;
    1313    String indexer;
     14    boolean use_views;
    1415    long numDocs=0;
    1516   
    1617    private static void usage()
    1718    {
    18     System.out.println("java vishnu.builder.CollectionBuilder\n -collsHome (directory where collections live) \n -collection (directory name of collection)\n -name (descriptive name for collection) \n -description (collection description)\n -index (\"mg\" or \"luc\")");
     19    System.out.println("java vishnu.builder.CollectionBuilder\n -collsHome (directory where collections live) \n -collection (directory name of collection)\n -name (descriptive name for collection) \n -description (collection description)\n -index (\"mg\" or \"luc\")\n [-use_views]");
    1920    }
    2021   
     
    3233    String collDesc = "";
    3334    String indexer = null;
    34    
     35    boolean use_views = false;
    3536    int a = 0;
    3637    while( a < args.length ){
     
    4748        else if( args[a].equals("-index") )
    4849        indexer = args[++a];
     50        else if (args[a].equals("-use_views"))
     51        use_views = true;
    4952        a++;
    5053    }
     
    6669    String coll_home = collsHome + collID + File.separator;
    6770    //CollectionBuilder cb = new CollectionBuilder(site,collName,gHome,indexer);
    68     CollectionBuilder cb = new CollectionBuilder(coll_home,collID, collName,collDesc, indexer);
    69     }
    70    
    71    
    72    
    73     public CollectionBuilder(String coll_home, String coll_id, String coll_name,String coll_desc,  String ind)
     71    CollectionBuilder cb = new CollectionBuilder(coll_home,collID, collName,collDesc, indexer, use_views);
     72    }
     73   
     74   
     75   
     76    public CollectionBuilder(String coll_home, String coll_id, String coll_name,String coll_desc,  String ind, boolean use_views)
    7477    {
    7578    this.collHome = coll_home;
     
    7881    this.collDesc = coll_desc;
    7982    this.indexer = ind;
    80 
     83    this.use_views = use_views;
     84   
    8185    if (!setupCollection()) {
    8286        System.err.println("Couldn't setup the collection. Quitting build");
     
    144148        buffer.append("\" />");
    145149       
     150        // add in views
     151        if (use_views) {
     152
     153        }
    146154        out.print(buffer.toString());
    147155        out.close();
     
    185193    private void CKIndexing()
    186194    {
    187     CKWrapper ckw = new CKWrapper();
    188    
     195    //CKWrapper ckw = new CKWrapper();
     196    CKIndexer cki = new CKIndexer();
    189197    String in = collHome + "import"+File.separator;
    190198    String out = collHome + "building"+File.separator+"ck_index"+File.separator;
    191199   
    192     ckw.setCollectionName(collID);
    193     ckw.setOutputDirectory(out);
    194     ckw.setInputDirectory(in);
    195     ckw.startIndexing();
     200    cki.setCollectionName(collID);
     201    cki.setOutputDirectory(out);
     202    cki.setInputDirectory(in);
     203    cki.startIndexing();
    196204    }
    197205   
Note: See TracChangeset for help on using the changeset viewer.