Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java	(revision 24860)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java	(revision 24861)
@@ -22,115 +22,124 @@
 
 /** keeps track of the interface parameters, and their defaults */
-public class GSParams {
+public class GSParams
+{
+	public static final String ACTION = "a"; // the major type of action- eg query or browse or process
+	public static final String SUBACTION = "sa"; // subtype of action if we want different processing than the default
+	public static final String REQUEST_TYPE = "rt"; // whether the request is just to display the service form, or to actually do a request to the service
+	public static final String RESPONSE_ONLY = "ro"; // if == 1 do the request and pass back the response xml - no page formatting
+	public static final String OUTPUT = "o"; // if processing is to be done, what type of output - html/xml/other??
+	public static final String HTTPHEADERFIELDS = "hhf";
+	public static final String SERVICE = "s"; // the name of the service
+	public static final String CLUSTER = "c"; // these two are the same
+	public static final String SYSTEM = "s";
+	public static final String CONFIGURE = "c";
+	public static final String COLLECTION = "c";
+	public static final String LANGUAGE = "l";
+	public static final String DOCUMENT = "d";
+	public static final String DOCUMENT_TYPE = "dt";
+	public static final String RESOURCE = "r";
+	public static final String PROCESS_ID = "pid"; // if a request wasn't completed, this identifies the request - used when asking for a status update
+	public static final String COLLECTION_TYPE = "ct";
 
-    public static final String ACTION = "a"; // the major type of action- eg query or browse or process
-    public static final String SUBACTION = "sa"; // subtype of action if we want different processing than the default
-    public static final String REQUEST_TYPE = "rt"; // whether the request is just to display the service form, or to actually do a request to the service
-    public static final String RESPONSE_ONLY = "ro"; // if == 1 do the request and pass back the response xml - no page formatting
-    public static final String OUTPUT = "o"; // if processing is to be done, what type of output - html/xml/other??
-	public static final String HTTPHEADERFIELDS = "hhf";
-    public static final String SERVICE = "s"; // the name of the service
-    public static final String CLUSTER = "c";   // these two are the same
-    public static final String SYSTEM = "s"; 
-    public static final String CONFIGURE = "c"; 
-    public static final String COLLECTION = "c"; 
-    public static final String LANGUAGE = "l";
-    public static final String DOCUMENT = "d";
-    public static final String DOCUMENT_TYPE = "dt";
-    public static final String RESOURCE = "r";
-    public static final String PROCESS_ID = "pid"; // if a request wasn't completed, this identifies the request - used when asking for a status update
-    public static final String COLLECTION_TYPE = "ct";
-    
-    public static final String SIBLING = "sib"; // this should not be in here
-    // internal configure args
-    public static final String SYSTEM_SUBSET = "ss";
-    public static final String SYSTEM_CLUSTER = "sc";
-    public static final String SYSTEM_MODULE_NAME = "sn";
-    public static final String SYSTEM_MODULE_TYPE = "st";
+	public static final String SIBLING = "sib"; // this should not be in here
+	// internal configure args
+	public static final String SYSTEM_SUBSET = "ss";
+	public static final String SYSTEM_CLUSTER = "sc";
+	public static final String SYSTEM_MODULE_NAME = "sn";
+	public static final String SYSTEM_MODULE_TYPE = "st";
 
-    public static final String EXPAND_DOCUMENT = "ed";
-    public static final String EXPAND_CONTENTS = "ec";
+	public static final String EXPAND_DOCUMENT = "ed";
+	public static final String EXPAND_CONTENTS = "ec";
 	public static final String REALISTIC_BOOK = "book";
 
-  // used for filtering out a piece of the final page
-  public static final String EXCERPT_ID = "excerptid";
-  public static final String EXCERPT_TAG = "excerpttag";
-    protected HashMap param_map = null;
-    
-    public GSParams() {
-	this.param_map = new HashMap(30);
+	// used for filtering out a piece of the final page
+	public static final String EXCERPT_ID = "excerptid";
+	public static final String EXCERPT_TAG = "excerpttag";
+	protected HashMap param_map = null;
 
-	// add in all the standard params
-	addParameter(ACTION, false); 
-	addParameter(SUBACTION,  false); 
-	addParameter(REQUEST_TYPE,  false);
-	addParameter(RESPONSE_ONLY,  false);
-	addParameter(CLUSTER,  false); // we don't want to save collection 
-	//addParameter(COLLECTION); 
-	addParameter(LANGUAGE,  true); 
-	addParameter(DOCUMENT,  true); 
-	addParameter(RESOURCE,  true); 
-	addParameter(OUTPUT, false); 
-	addParameter(SERVICE, false); 
-	addParameter(PROCESS_ID, true); 
-	addParameter(SYSTEM_SUBSET, false);
-	addParameter(SYSTEM_CLUSTER, false);
-	addParameter(SYSTEM_MODULE_NAME, false);
-	addParameter(SYSTEM_MODULE_TYPE, false);
-	addParameter(SIBLING, false);
-	addParameter(DOCUMENT_TYPE, true);
-	addParameter(EXPAND_DOCUMENT, false);
-	addParameter(EXPAND_CONTENTS, false);
-	addParameter(REALISTIC_BOOK, false);	
-	
- 	//addParameter();
-	// ugly hack so we don't save the extlink param
-	addParameter("s0.ext", false);
-	addParameter(COLLECTION_TYPE,  true); // collection type - mg or mgpp
+	public GSParams()
+	{
+		this.param_map = new HashMap(30);
 
-	// filtering args must be specified each time
-	addParameter(EXCERPT_ID, false);
-	addParameter(EXCERPT_TAG, false);
-    }
-    
-    public boolean addParameter(String name, boolean save) {
-	return addParameter(name, "", save);
-    }
-    
-    public boolean addParameter(String name, String default_value, boolean save) {
-	if (this.param_map.containsKey(name)) {
-	    // already there so could not add
-	    return false;
+		// add in all the standard params
+		addParameter(ACTION, false);
+		addParameter(SUBACTION, false);
+		addParameter(REQUEST_TYPE, false);
+		addParameter(RESPONSE_ONLY, false);
+		addParameter(CLUSTER, false); // we don't want to save collection 
+		//addParameter(COLLECTION); 
+		addParameter(LANGUAGE, true);
+		addParameter(DOCUMENT, true);
+		addParameter(RESOURCE, true);
+		addParameter(OUTPUT, false);
+		addParameter(SERVICE, false);
+		addParameter(PROCESS_ID, true);
+		addParameter(SYSTEM_SUBSET, false);
+		addParameter(SYSTEM_CLUSTER, false);
+		addParameter(SYSTEM_MODULE_NAME, false);
+		addParameter(SYSTEM_MODULE_TYPE, false);
+		addParameter(SIBLING, false);
+		addParameter(DOCUMENT_TYPE, true);
+		addParameter(EXPAND_DOCUMENT, false);
+		addParameter(EXPAND_CONTENTS, false);
+		addParameter(REALISTIC_BOOK, false);
+
+		//addParameter();
+		// ugly hack so we don't save the extlink param
+		addParameter("s0.ext", false);
+		addParameter(COLLECTION_TYPE, true); // collection type - mg or mgpp
+
+		// filtering args must be specified each time
+		addParameter(EXCERPT_ID, false);
+		addParameter(EXCERPT_TAG, false);
 	}
 
-	this.param_map.put(name, new Param(default_value, save));
-	return true;
-    }
-	
-    public boolean setParamDefault(String name, String default_value) {
-	Param p = (Param)this.param_map.get(name);
-	if (p==null) return false;
-	p.default_value = default_value;
-	return true;
-    }
-    
-    public boolean shouldSave(String name) {
-	if (name.startsWith("p.")) return false;
-	Param p = (Param)this.param_map.get(name);
-	if (p== null) return true; // if things are not in here, always save.
-	return p.save;
-    }
-    
-    private class Param {
+	public boolean addParameter(String name, boolean save)
+	{
+		return addParameter(name, "", save);
+	}
 
-	public String default_value = null;
-	public boolean save = true;
+	public boolean addParameter(String name, String default_value, boolean save)
+	{
+		if (this.param_map.containsKey(name))
+		{
+			// already there so could not add
+			return false;
+		}
 
-	public Param(String default_value, boolean save) {
-	    this.default_value = default_value;
-	    this.save = save;
+		this.param_map.put(name, new Param(default_value, save));
+		return true;
 	}
-    }
+
+	public boolean setParamDefault(String name, String default_value)
+	{
+		Param p = (Param) this.param_map.get(name);
+		if (p == null)
+			return false;
+		p.default_value = default_value;
+		return true;
+	}
+
+	public boolean shouldSave(String name)
+	{
+		if (name.startsWith("p."))
+			return false;
+		Param p = (Param) this.param_map.get(name);
+		if (p == null)
+			return true; // if things are not in here, always save.
+		return p.save;
+	}
+
+	private class Param
+	{
+
+		public String default_value = null;
+		public boolean save = true;
+
+		public Param(String default_value, boolean save)
+		{
+			this.default_value = default_value;
+			this.save = save;
+		}
+	}
 }
-
-    
