Changeset 6350
- Timestamp:
- 2004-01-06T11:46:46+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/collection/GS2CollectionCfg.java
r6239 r6350 14 14 import org.greenstone.gsdl3.gs3build.classifier.ClassifierManager; 15 15 16 import org.greenstone.gsdl3.gs3build.indexers.*; 17 16 18 import org.greenstone.gsdl3.gs3build.BuildManager; 17 19 … … 19 21 { 20 22 BuildManager buildManager; 23 IndexerInterface indexer; 21 24 22 25 class GS2CollectCfgHandler extends GS2TextFileHandler … … 70 73 configurator.addClassifier(classifier); 71 74 } 75 System.out.println(Runtime.getRuntime().freeMemory()); 76 } 77 else if (lineType.equals("buildtype")) { 78 if (this.hasMore()) { 79 String type = this.getEntry(true); 80 if (type != null) { 81 configurator.setBuildType(type); 82 } 83 } 84 } 85 else if (lineType.equals("indexes")) { 86 while (this.hasMore()) { 87 String index = this.getEntry(true); 88 if (index != null) { 89 System.out.println("Adding index " + index); 90 configurator.addIndex(index); 91 } 92 } 72 93 } 73 94 } … … 98 119 } 99 120 121 void addIndex(String index) 122 { 123 if (this.indexer == null) { 124 this.setBuildType("mg"); 125 } 126 this.indexer.configure(IndexerInterface.GS2_INDEX_LABEL, index); 127 System.out.println(Runtime.getRuntime().freeMemory()); 128 } 129 130 void setBuildType(String type) 131 { if (type.equals("mgpp")) { 132 this.indexer = new MGPPIndexer(); 133 } 134 else { 135 this.indexer = new MGIndexer(); 136 } 137 this.buildManager.addIndexer(this.indexer); 138 } 139 100 140 public static GS2CollectionCfg getGS2CollectionCfg(BuildManager manager, File cfgFile) 101 141 { GS2CollectionCfg configurator = new GS2CollectionCfg(manager, cfgFile);
Note:
See TracChangeset
for help on using the changeset viewer.