- Timestamp:
- 2004-10-12T12:19:22+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/greenstone3-extensions/vishnu/src/vishnu/builder/CollectionBuilder.java
r8189 r8290 12 12 String collDesc; 13 13 String indexer; 14 boolean use_views; 14 15 long numDocs=0; 15 16 16 17 private static void usage() 17 18 { 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]"); 19 20 } 20 21 … … 32 33 String collDesc = ""; 33 34 String indexer = null; 34 35 boolean use_views = false; 35 36 int a = 0; 36 37 while( a < args.length ){ … … 47 48 else if( args[a].equals("-index") ) 48 49 indexer = args[++a]; 50 else if (args[a].equals("-use_views")) 51 use_views = true; 49 52 a++; 50 53 } … … 66 69 String coll_home = collsHome + collID + File.separator; 67 70 //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) 74 77 { 75 78 this.collHome = coll_home; … … 78 81 this.collDesc = coll_desc; 79 82 this.indexer = ind; 80 83 this.use_views = use_views; 84 81 85 if (!setupCollection()) { 82 86 System.err.println("Couldn't setup the collection. Quitting build"); … … 144 148 buffer.append("\" />"); 145 149 150 // add in views 151 if (use_views) { 152 153 } 146 154 out.print(buffer.toString()); 147 155 out.close(); … … 185 193 private void CKIndexing() 186 194 { 187 CKWrapper ckw = new CKWrapper();188 195 //CKWrapper ckw = new CKWrapper(); 196 CKIndexer cki = new CKIndexer(); 189 197 String in = collHome + "import"+File.separator; 190 198 String out = collHome + "building"+File.separator+"ck_index"+File.separator; 191 199 192 ck w.setCollectionName(collID);193 ck w.setOutputDirectory(out);194 ck w.setInputDirectory(in);195 ck w.startIndexing();200 cki.setCollectionName(collID); 201 cki.setOutputDirectory(out); 202 cki.setInputDirectory(in); 203 cki.startIndexing(); 196 204 } 197 205
Note:
See TracChangeset
for help on using the changeset viewer.