Changeset 5815 for trunk/gli/src/org/greenstone
- Timestamp:
- 2003-11-10T14:04:13+13:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/Collection.java
r5785 r5815 185 185 return collect_cfg.getDescription(); 186 186 } 187 188 public String getCollectionType() { 189 return collect_cfg.getBuildType(); 190 } 191 192 public String getSearchTypes() { 193 return collect_cfg.getSearchTypes(); 194 } 187 195 /** Retrieve a specific directory mapping associated with this collection. 188 196 * @param name The name of the mapping to retrieve as a <strong>String</strong>. -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionConfiguration.java
r5722 r5815 19 19 private Element name_element; 20 20 private File file; 21 private String build_type; 21 22 private String creator; 22 23 private String description; 23 24 private String maintainer; 24 25 private String name; 26 private String search_types; 25 27 26 28 public CollectionConfiguration(File file) { … … 54 56 else if(temp.equalsIgnoreCase("maintainer")) { 55 57 maintainer = tokenizer.nextToken(); 58 } 59 else if (temp.equalsIgnoreCase("buildtype")) { 60 build_type = tokenizer.nextToken(); 61 } 62 else if (temp.equalsIgnoreCase("searchtype")) { 63 search_types = tokenizer.nextToken(); 64 temp = tokenizer.nextToken(); 65 if (temp!=null && !temp.equals("")) { 66 search_types += ","+temp; 67 } 56 68 } 57 69 else if(temp.equalsIgnoreCase("collectionmeta")) { … … 114 126 } 115 127 } 128 // just check a couple of things 129 if (search_types != null && build_type==null) { 130 build_type = "mgpp"; 131 } 116 132 command = null; 117 133 br.close(); … … 143 159 } 144 160 161 public String getBuildType() { 162 String result = ""; 163 164 if (build_type != null) { 165 result = build_type; 166 } 167 return result; 168 } 169 145 170 public String getCreator() { 146 171 String result = ""; … … 187 212 else if(name != null) { 188 213 result = name; 214 } 215 return result; 216 } 217 218 public String getSearchTypes() { 219 String result = ""; 220 221 if (search_types != null) { 222 result = search_types; 189 223 } 190 224 return result; -
trunk/gli/src/org/greenstone/gatherer/gui/PreviewPane.java
r5571 r5815 43 43 import javax.swing.*; 44 44 import org.greenstone.gatherer.Dictionary; 45 import org.greenstone.gatherer.collection.Collection; 45 46 import org.greenstone.gatherer.Gatherer; 46 47 import org.greenstone.gatherer.util.GURL; … … 107 108 try { 108 109 // Now load the collection 109 homepage = new URL(Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + Gatherer.c_man.getCollection().getName()); 110 Collection this_coll = Gatherer.c_man.getCollection(); 111 String extra_args = ""; 112 String build_type = this_coll.getCollectionType(); 113 if (build_type.equals("mgpp")) { 114 // we need some more args on the url 115 String search_types = this_coll.getSearchTypes(); 116 if (search_types.equals("")) { 117 extra_args = "&ct=1&qt=0&qto=3"; 118 } else if (search_types.equals("plain")) { 119 extra_args = "&ct=1&qt=0&qto=1"; 120 } else if (search_types.equals("form")) { 121 extra_args = "&ct=1&qt=1&qto=2"; 122 } else if (search_types.equals("plain,form")) { 123 extra_args = "&ct=1&qt=0&qto=3"; 124 } else if (search_types.equals("form,plain")) { 125 extra_args = "&ct=1&qt=1&qto=3"; 126 } 127 } 128 129 homepage = new URL(Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + this_coll.getName()+extra_args); 110 130 String[] args = new String[1]; 111 131 args[0] = homepage.toString();
Note:
See TracChangeset
for help on using the changeset viewer.