Changeset 7603
- Timestamp:
- 2004-06-17T11:12:25+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java
r7591 r7603 50 50 implements Comparable { 51 51 52 private Element creator_element;53 private Element description_element;54 private Element maintainer_element;55 private Element name_element;56 52 private File file; 57 private String creator ;58 private String description ;59 private String maintainer ;60 private String name ;61 62 private String site ; // used for gs3 colls53 private String creator = ""; 54 private String description = ""; 55 private String maintainer = ""; 56 private String name = ""; 57 58 private String site = null; // used for gs3 colls 63 59 64 60 public BasicCollectionConfiguration(File file) { … … 69 65 return; 70 66 } 71 if(filename.endsWith(".xml")) { 72 // This is where G3 compliant code will one day live 73 } 74 else if(filename.endsWith(".cfg")) { 67 if(filename.endsWith(".cfg")) { 75 68 FileInputStream fis = new FileInputStream(file); 76 69 InputStreamReader isr = new InputStreamReader(fis, "UTF-8"); … … 128 121 value_str = null; 129 122 meta_type_str = null; 123 } else { 124 // we want to process all the tokens to make sure we get rid of multi line commands before trying to find the next one 125 while (tokenizer.hasMoreTokens()) { 126 tokenizer.nextToken(); 127 } 128 130 129 } // end of coll meta bit 131 130 command_type_str = null; … … 170 169 */ 171 170 public String getCreator() { 172 String result = StaticStrings.EMPTY_STR; 173 if(creator_element != null) { 174 result = MSMUtils.getValue(creator_element); 175 } 176 else if(creator != null) { 177 result = creator; 178 } 179 return result; 171 return creator; 180 172 } 181 173 182 174 public String getDescription() { 183 String result = StaticStrings.EMPTY_STR; 184 if(description_element != null) { 185 result = MSMUtils.getValue(description_element); 186 } 187 else if(description != null) { 188 result = description; 189 } 190 return result; 175 return description; 191 176 } 192 177 … … 196 181 197 182 public String getMaintainer() { 198 String result = StaticStrings.EMPTY_STR; 199 if(maintainer_element != null) { 200 result = MSMUtils.getValue(maintainer_element); 201 } 202 else if(maintainer != null) { 203 result = maintainer; 204 } 205 return result; 183 return maintainer; 206 184 } 207 185 208 186 public String getName() { 209 String result = StaticStrings.EMPTY_STR; 210 if(name_element != null) { 211 result = MSMUtils.getValue(name_element); 212 } 213 else if(name != null) { 214 result = name; 215 } 216 return result; 187 return name; 217 188 } 218 189
Note:
See TracChangeset
for help on using the changeset viewer.