Index: /trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java	(revision 6146)
+++ /trunk/gli/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java	(revision 6147)
@@ -48,179 +48,177 @@
 /** This class provides access to a collection configuration file. This version accepts either a valid xml document or a historical collect.cfg file. */
 public class BasicCollectionConfiguration
-	implements Comparable {
-
-	private Element creator_element;
-	private Element description_element;
-	private Element maintainer_element;
-	private Element name_element;
-	private File file;
-	private String creator;
-	private String description;
-	private String maintainer;
-	private String name;
-
-	public BasicCollectionConfiguration(File file) {
-		this.file = file;
-		try {
-			String filename = file.getName().toLowerCase();
-			if(filename.endsWith(".xml")) {
-				// This is where G3 compliant code will one day live
-			}
-			else if(filename.endsWith(".cfg")) {
-				FileReader fr = new FileReader(file);
-				BufferedReader br = new BufferedReader(fr);
-				String command = null;
-				while((command = br.readLine()) != null) {
-					if(command.length() > 0) {
-						// We have to test the end of command for the special character '\'. If found, remove it and append the next line, then repeat.
-						while(command.trim().endsWith("\\")) {
-							command = command.substring(0, command.lastIndexOf("\\"));
-							String next_line = br.readLine();
-							if(next_line != null) {
-								command = command + next_line;
-							}
-							next_line = null;
-						}
-						CommandTokenizer tokenizer = new CommandTokenizer(command, br);
-						String command_type_str = tokenizer.nextToken().toLowerCase();
-						if(command_type_str == null) {
-							// Bad command. Do nothing
-						}
-						else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_CREATOR_STR)) {
-							creator = tokenizer.nextToken();
-						}
-						else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_MAINTAINER_STR)) {
-							maintainer = tokenizer.nextToken();
-						}
-						else if(command_type_str.equalsIgnoreCase(StaticStrings.COLLECTIONMETADATA_STR)) {
-							String meta_type_str = tokenizer.nextToken();
-							String value_str = tokenizer.nextToken();
-							// check for language
-							String language_str = StaticStrings.ENGLISH_LANGUAGE_STR; // assume the no-lang ones are english, but we shouldn't really do this.
-							if(meta_type_str != null && value_str != null) {
-								meta_type_str = meta_type_str.toLowerCase();
-								if(value_str.startsWith(StaticStrings.LBRACKET_CHARACTER) && value_str.endsWith(StaticStrings.RBRACKET_CHARACTER)) {
-									language_str = value_str.substring(value_str.indexOf(StaticStrings.EQUALS_CHARACTER) + 1, value_str.length() - 1);
-									language_str = language_str.toLowerCase();
-									value_str = tokenizer.nextToken();
-								}
-								// now we can work out which coll meta we are dealing with
-								if (meta_type_str.equals(StaticStrings.COLLECTIONMETADATA_COLLECTIONNAME_STR)) {
-									// If this is the first collection title found, then use it, otherwise search for one that more closely matches our choosen interface language
-									if (name == null || language_str.equals(Gatherer.dictionary.getLanguage())) {
-										name = Codec.transform(value_str, Codec.GREENSTONE_TO_TEXT);
-									}
-								}
-								else if (meta_type_str.equals(StaticStrings.COLLECTIONMETADATA_COLLECTIONEXTRA_STR)) {
-									// Again we are either looking for the first description, then after that a language specific one
-									if (description == null || language_str.equals(Gatherer.dictionary.getLanguage())) {
-										description = Codec.transform(value_str, Codec.GREENSTONE_TO_TEXT);
-									}
-								}
-							}
-							language_str = null;
-							value_str = null;
-							meta_type_str = null;
-						} // end of coll meta bit
-						command_type_str = null;
-						tokenizer = null;
-					} // if command.length > 0
-				} // while
-				command = null;
-				br.close();
-				fr.close();
-				br = null;
-				fr = null;
-			} // cfg file
-			///ystem.err.println("Parsed collect.cfg");
-			///ystem.err.println("name		= " + name);
-			///ystem.err.println("creator	 = " + creator);
-			///ystem.err.println("maintainer  = " + maintainer);
-			///ystem.err.println("description = " + description);
-		}
-		catch(Exception error) {
-			Gatherer.println("Error in CollectionConfiguration.<init>(): " + error);
-			Gatherer.printStackTrace(error);
-		}
-	}
-
-	/** Compare this configuration to another for ordering, which essentially compares two strings for ordering.
-	 * @param other the other Object which is presumably another basic collection configuration
-	 * @return an integer which is either <0, 0 or >0 if this configuration is naturally less than, equal to or greater than the target object
-	 */
-	public int compareTo(Object other) {
-		if(other == null) {
-			return -1;
-		}
-		return toString().compareTo(other.toString());
-	}
-
-	public boolean equals(Object other) {
-		return (compareTo(other) == 0);
-	}
-
-	/** Retrieve the creators email for this collection.
-	 * @return a String
-	 */
-	public String getCreator() {
-		String result = StaticStrings.EMPTY_STR;
-		if(creator_element != null) {
-			result = MSMUtils.getValue(creator_element);
-		}
-		else if(creator != null) {
-			result = creator;
-		}
-		return result;
-	}
-
-	public String getDescription() {
+    implements Comparable {
+    
+    private Element creator_element;
+    private Element description_element;
+    private Element maintainer_element;
+    private Element name_element;
+    private File file;
+    private String creator;
+    private String description;
+    private String maintainer;
+    private String name;
+    
+    public BasicCollectionConfiguration(File file) {
+	this.file = file;
+	try {
+	    String filename = file.getName().toLowerCase();
+	    if(filename.endsWith(".xml")) {
+		// This is where G3 compliant code will one day live
+	    }
+	    else if(filename.endsWith(".cfg")) {
+		FileReader fr = new FileReader(file);
+		BufferedReader br = new BufferedReader(fr);
+		String command = null;
+		while((command = br.readLine()) != null) {
+		    if(command.length() > 0) {
+			// We have to test the end of command for the special character '\'. If found, remove it and append the next line, then repeat.
+			while(command.trim().endsWith("\\")) {
+			    command = command.substring(0, command.lastIndexOf("\\"));
+			    String next_line = br.readLine();
+			    if(next_line != null) {
+				command = command + next_line;
+			    }
+			    next_line = null;
+			}
+			CommandTokenizer tokenizer = new CommandTokenizer(command, br);
+			String command_type_str = tokenizer.nextToken().toLowerCase();
+			if(command_type_str == null) {
+			    // Bad command. Do nothing
+			}
+			else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_CREATOR_STR)) {
+			    creator = tokenizer.nextToken();
+			}
+			else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_MAINTAINER_STR)) {
+			    maintainer = tokenizer.nextToken();
+			}
+			else if(command_type_str.equalsIgnoreCase(StaticStrings.COLLECTIONMETADATA_STR)) {
+			    String meta_type_str = tokenizer.nextToken();
+			    String value_str = tokenizer.nextToken();
+			    // check for language
+			    String language_str = StaticStrings.ENGLISH_LANGUAGE_STR; // assume the no-lang ones are english, but we shouldn't really do this.
+			    if(meta_type_str != null && value_str != null) {
+				meta_type_str = meta_type_str.toLowerCase();
+				if(value_str.startsWith(StaticStrings.LBRACKET_CHARACTER) && value_str.endsWith(StaticStrings.RBRACKET_CHARACTER)) {
+				    language_str = value_str.substring(value_str.indexOf(StaticStrings.EQUALS_CHARACTER) + 1, value_str.length() - 1);
+				    language_str = language_str.toLowerCase();
+				    value_str = tokenizer.nextToken();
+				}
+				// now we can work out which coll meta we are dealing with
+				if (meta_type_str.equals(StaticStrings.COLLECTIONMETADATA_COLLECTIONNAME_STR)) {
+				    // If this is the first collection title found, then use it, otherwise search for one that more closely matches our choosen interface language
+				    if (name == null || language_str.equals(Gatherer.dictionary.getLanguage())) {
+					name = Codec.transform(value_str, Codec.GREENSTONE_TO_TEXT);
+				    }
+				}
+				else if (meta_type_str.equals(StaticStrings.COLLECTIONMETADATA_COLLECTIONEXTRA_STR)) {
+				    // Again we are either looking for the first description, then after that a language specific one
+				    if (description == null || language_str.equals(Gatherer.dictionary.getLanguage())) {
+					description = Codec.transform(value_str, Codec.GREENSTONE_TO_TEXT);
+				    }
+				}
+			    }
+			    language_str = null;
+			    value_str = null;
+			    meta_type_str = null;
+			} // end of coll meta bit
+			command_type_str = null;
+			tokenizer = null;
+		    } // if command.length > 0
+		} // while
+		command = null;
+		br.close();
+		fr.close();
+		br = null;
+		fr = null;
+	    } // cfg file
+	    ///ystem.err.println("Parsed collect.cfg");
+	    ///ystem.err.println("name		= " + name);
+	    ///ystem.err.println("creator	 = " + creator);
+	    ///ystem.err.println("maintainer  = " + maintainer);
+	    ///ystem.err.println("description = " + description);
+	}
+	catch(Exception error) {
+	    Gatherer.println("Error in CollectionConfiguration.<init>(): " + error);
+	    Gatherer.printStackTrace(error);
+	}
+    }
+
+    /** Compare this configuration to another for ordering, which essentially compares two strings for ordering.
+     * @param other the other Object which is presumably another basic collection configuration
+     * @return an integer which is either <0, 0 or >0 if this configuration is naturally less than, equal to or greater than the target object
+     */
+    public int compareTo(Object other) {
+	if(other == null) {
+	    return -1;
+	}
+	return toString().compareTo(other.toString());
+    }
+
+    public boolean equals(Object other) {
+	return (compareTo(other) == 0);
+    }
+
+    /** Retrieve the creators email for this collection.
+     * @return a String
+     */
+    public String getCreator() {
+	String result = StaticStrings.EMPTY_STR;
+	if(creator_element != null) {
+	    result = MSMUtils.getValue(creator_element);
+	}
+	else if(creator != null) {
+	    result = creator;
+	}
+	return result;
+    }
+
+    public String getDescription() {
 	String result = StaticStrings.EMPTY_STR;
 	if(description_element != null) {
-		result = MSMUtils.getValue(description_element);
+	    result = MSMUtils.getValue(description_element);
 	}
 	else if(description != null) {
-		result = description;
-	}
-	return result;
-	}
-
-	public File getFile() {
-		return file;
-	}
-
-	public String getMaintainer() {
+	    result = description;
+	}
+	return result;
+    }
+
+    public File getFile() {
+	return file;
+    }
+    
+    public String getMaintainer() {
 	String result = StaticStrings.EMPTY_STR;
 	if(maintainer_element != null) {
-		result = MSMUtils.getValue(maintainer_element);
+	    result = MSMUtils.getValue(maintainer_element);
 	}
 	else if(maintainer != null) {
-		result = maintainer;
-	}
-	return result;
-	}
-
-	public String getName() {
+	    result = maintainer;
+	}
+	return result;
+    }
+
+    public String getName() {
 	String result = StaticStrings.EMPTY_STR;
 	if(name_element != null) {
-		result = MSMUtils.getValue(name_element);
+	    result = MSMUtils.getValue(name_element);
 	}
 	else if(name != null) {
-		result = name;
-	}
-	return result;
-	}
-
-	/** Retrieve the short name for this collection which, given this current file is in <col_name>/etc/collect.cfg, is the name of this file's parent file's parent.
-	 * @return the short name of this collection as a String
-	 */
-	/*
-	public String getShortName() {
+	    result = name;
+	}
+	return result;
+    }
+    
+    /** Retrieve the short name for this collection which, given this current file is in <col_name>/etc/collect.cfg, is the name of this file's parent file's parent.
+     * @return the short name of this collection as a String
+     */
+    public String getShortName() {
 	return file.getParentFile().getParentFile().getName();
-	}
-	*/
-
-	/** Display the title for this collection. */
-	public String toString() {
-		return getName();
-	}
+    }
+    
+    /** Display the title for this collection. */
+    public String toString() {
+	return getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + getShortName() + StaticStrings.CLOSE_PARENTHESIS_CHARACTER;
+    }
 }
