Index: gli/trunk/src/org/greenstone/gatherer/Configuration.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/Configuration.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/Configuration.java	(revision 14974)
@@ -69,4 +69,5 @@
     /** The name of the general Gatherer configuration file for running with GS3. */
     static public String GS3_CONFIG_XML = "config3.xml";
+    static public String FEDORA_CONFIG_PREFIX = "fedora-";
 
     /** The name of the root element of the subtree containing gatherer configuration options. This is required as the document itself may contain several other subtrees of settings (such as in the case of a '.col' file). */
@@ -101,4 +102,7 @@
     /** If we are using GLI in Greenstone 3, the path to gsdl3 src directory (== gsdl3 dir)*/
     static public String gsdl3_src_path = "";
+
+    static public FedoraInfo fedora_info = null;
+    
     /** The path to the PERL executable, up to and including Perl.exe. */
     static public String perl_path = "";
@@ -134,5 +138,6 @@
      * @param site_name The name of the Greenstone 3 site currently in use.
      */
-    public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name)
+    public Configuration(String gli_user_directory_path, String gsdl_path, String gsdl3_path, String gsdl3_src_path, String site_name,
+			 FedoraInfo fedora_info)
     {
 	super();
@@ -145,4 +150,6 @@
 	this.site_name = site_name;
 
+	this.fedora_info = fedora_info;
+
 	// Try to load the configuration file from the user specific location
 	String config_xml_file_name = CONFIG_XML;
@@ -151,6 +158,11 @@
 	}
 
+	if (fedora_info.isActive()) {
+	    config_xml_file_name = FEDORA_CONFIG_PREFIX + config_xml_file_name;
+	}
+
 	// If the existing user config.xml file isn't recent enough, backup the old version and update it
 	File config_xml_file = new File(gli_user_directory_path + config_xml_file_name);
+
 	if (config_xml_file != null && config_xml_file.exists()) {
 	    just_updated_config_xml_file = updateUserConfigXMLFileIfNecessary(config_xml_file);
@@ -597,4 +609,12 @@
     }
 
+    static public String getApplicationTitle() {
+	String gli_title = getString("GLI.Title", GENERAL_SETTING);
+	String title = (gli_title=="") ? Gatherer.PROGRAM_NAME : gli_title;
+
+	return title;
+    }
+
+
     static public String getServletPath() {
 	return servlet_path;
@@ -688,8 +708,9 @@
 	File user_config_xml = null;
 	String config_xml_name = CONFIG_XML;
+
 	if (gsdl3_path!=null) {
 	    config_xml_name = GS3_CONFIG_XML;
 	}
-
+		
 	if (Gatherer.isGsdlRemote) {
 	    if (Gatherer.GS3){
@@ -699,4 +720,9 @@
 	    }
 	}
+
+	if (fedora_info.isActive()) {
+	    config_xml_name = FEDORA_CONFIG_PREFIX + config_xml_name;
+	}
+
 	try {
 	    user_config_xml = new File(gli_user_directory_path + config_xml_name);
Index: gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/GAuthenticator.java	(revision 14974)
@@ -42,5 +42,8 @@
 import java.util.*;
 import javax.swing.*;
+
+
 import org.greenstone.gatherer.gui.GLIButton;
+
 
 /** Provides a graphic authenticator for network password requests.
@@ -75,5 +78,5 @@
      * @see org.greenstone.gatherer.GAuthenticator.RequestFocusListener
      */
-    protected PasswordAuthentication getPasswordAuthentication() {
+    protected PasswordAuthentication getPasswordAuthentication(String username_str, String password_str) {
 	// Component definition.
 	dialog = new JDialog (Gatherer.g_man, Dictionary.get("GAuthenticator.Title"), true);
@@ -82,8 +85,13 @@
 	JPanel content_pane = (JPanel) dialog.getContentPane();
 	JLabel title_label = new JLabel(getMessageString());
+
 	JPanel user_panel = new JPanel();
 	JLabel username_label = new JLabel(Dictionary.get("GAuthenticator.Username"));
 	JTextField username = new JTextField();
 	username.setToolTipText(Dictionary.get("GAuthenticator.Username_Tooltip"));
+	if (username_str != null) {
+	    username.setText(username_str);
+	}
+
 	JPanel password_panel = new JPanel();
 	JLabel password_label = new JLabel(Dictionary.get("GAuthenticator.Password"));
@@ -91,4 +99,8 @@
 	password.setEchoChar('*');
 	password.setToolTipText(Dictionary.get("GAuthenticator.Password_Tooltip"));
+	if (password_str != null) {
+	    password.setText(password_str);
+	}
+
 	JPanel button_panel = new JPanel();
 	ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
@@ -134,4 +146,7 @@
     }
 
+    protected PasswordAuthentication getPasswordAuthentication() {
+	return getPasswordAuthentication(null,null);
+    }
 
     /** This is defined so it can be overridden by subclasses (getRequestingPrompt is final). */
Index: gli/trunk/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/Gatherer.java	(revision 14974)
@@ -36,6 +36,9 @@
 import javax.swing.plaf.*;
 import javax.swing.text.*;
+
+
 import org.greenstone.gatherer.Configuration;
 import org.greenstone.gatherer.GAuthenticator;
+import org.greenstone.gatherer.FedoraInfo;
 import org.greenstone.gatherer.collection.CollectionManager;
 import org.greenstone.gatherer.feedback.ActionRecorderDialog;
@@ -51,4 +54,5 @@
 import org.greenstone.gatherer.gui.URLField;
 import org.greenstone.gatherer.gui.WarningDialog;
+import org.greenstone.gatherer.gui.FedoraLogin;
 import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
 import org.greenstone.gatherer.util.JarTools;
@@ -77,5 +81,5 @@
 		* change the regex in the gs3-release-maker code and in this message
 		*/
-    static final public String PROGRAM_VERSION = "trunk";
+    static final public String PROGRAM_VERSION = "1.0";
 
     static private Dimension size = new Dimension(800, 540);
@@ -186,5 +190,11 @@
 	// More special code for running with a remote Greenstone
 	if (isGsdlRemote) {
-	    Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml";
+	    if (go.fedora_info.isActive()) {
+		Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + "configRemote.xml";
+	    }
+	    else {
+		Configuration.TEMPLATE_CONFIG_XML = "xml/configRemote.xml";
+	    }
+
 	    if (!go.run_gsdl3){	 
 		Configuration.CONFIG_XML = "configRemote.xml";
@@ -198,6 +208,14 @@
 	    }
 	}
-
-	init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, go.local_library_path, go.library_url_string, 
+	else {	    
+	    if (go.fedora_info.isActive()) {
+		Configuration.TEMPLATE_CONFIG_XML = "xml/" + Configuration.FEDORA_CONFIG_PREFIX + Configuration.CONFIG_XML;
+
+	    }
+	}
+
+	init(go.gsdl_path, go.gsdl3_path, go.gsdl3_src_path, 
+	     go.fedora_info,
+	     go.local_library_path, go.library_url_string, 
 	     go.gliserver_url_string, go.debug, go.perl_path, go.no_load, go.filename, go.site_name,
 	     go.servlet_path);
@@ -205,5 +223,7 @@
 
 
-    public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, String local_library_path,
+    public void init(String gsdl_path, String gsdl3_path, String gsdl3_src_path, 
+		     FedoraInfo fedora_info,
+		     String local_library_path,
 		     String library_url_string, String gliserver_url_string, boolean debug_enabled,
 		     String perl_path, boolean no_load, String open_collection, 
@@ -245,5 +265,6 @@
 	try {
 	    // Load GLI config file
-	    new Configuration(getGLIUserDirectoryPath(), gsdl_path, gsdl3_path, gsdl3_src_path, site_name);
+	    new Configuration(getGLIUserDirectoryPath(), gsdl_path, gsdl3_path, gsdl3_src_path, site_name,
+			      fedora_info);
 
 	    // Check we know where Perl is
@@ -278,4 +299,9 @@
 	    }
 
+	    if (fedora_info.isActive()) {
+		popupFedoraInfo();
+	    }
+
+
 	    // Start up the local library server, if that's what we want
 	    if (Utility.isWindows() && local_library_path != null && !isGsdlRemote && !GS3) {
@@ -298,9 +324,27 @@
 	    if (Configuration.library_url == null) {
 		missingEXEC(); 
+
 		if ((Configuration.library_url!=null) && isGsdlRemote && (gliserver_url_string==null)){
 		    if (GS3){
 			default_gliserver_url = new URL(Configuration.library_url.toString() + "/cgi-bin/gliserver4gs3.pl");
 		    }else{
-			default_gliserver_url = new URL(Configuration.library_url.toString().substring(0,Configuration.library_url.toString().lastIndexOf("/library")) + "/gliserver.pl");
+			String default_gliserver_str = "";
+			String library_url_str = Configuration.library_url.toString();			
+			int cut_pos = library_url_str.lastIndexOf("/library");
+
+			if (cut_pos>0) {
+			    default_gliserver_str = library_url_str.substring(0,cut_pos) + "/gliserver.pl";
+			}
+			else {
+			    cut_pos = library_url_str.lastIndexOf("/");
+			    if (cut_pos>0) {
+				default_gliserver_str = library_url_str.substring(0,cut_pos) + "/gliserver.pl";
+			    }
+			    else {
+				default_gliserver_str = library_url_str + "/gliserver.pl";
+			    }
+			}
+
+			default_gliserver_url = new URL(default_gliserver_str);
 		    }
 		    missingGLIServer();
@@ -327,5 +371,6 @@
 			    default_gliserver_url = new URL(Configuration.library_url.toString() + "/cgi-bin/gliserver4gs3.pl");
 			}else{
-			    default_gliserver_url = new URL(Configuration.library_url.toString().substring(0,Configuration.library_url.toString().lastIndexOf("/library")) + "/gliserver.pl");
+			    String library_url = Configuration.library_url.toString();
+			    default_gliserver_url = new URL(library_url.substring(0,library_url.lastIndexOf("/library")) + "/gliserver.pl");
 			}
 		    }
@@ -787,4 +832,74 @@
 	}
     }
+
+
+
+    /** Prints a warning message about a missing library path, which means the final collection cannot be previewed in the Gatherer.
+     */
+    static private void popupFedoraInfo() {
+
+	FedoraLogin dialog = new FedoraLogin("Fedora Login", false);
+
+	if (Configuration.library_url == null) {
+	    
+	    String library_url_string = dialog.getLibraryURL();
+	    if (!library_url_string.equals("")) {
+		try {
+		    Configuration.library_url = new URL(library_url_string);
+		}
+		catch (MalformedURLException exception) {
+		    DebugStream.printStackTrace(exception);
+		}
+	    }
+	}
+	    
+	if (dialog.loginRequested()) {
+
+	    String hostname = dialog.getHostname();
+	    String port     = dialog.getPort();
+	    String username = dialog.getUsername();
+	    String password = dialog.getPassword();
+	    String protocol = dialog.getProtocol();
+
+	    Configuration.fedora_info.setHostname(hostname);
+	    Configuration.fedora_info.setPort(port);
+	    Configuration.fedora_info.setUsername(username);
+	    Configuration.fedora_info.setPassword(password);
+	    Configuration.fedora_info.setProtocol(protocol);
+
+	    String ping_url_str = protocol + "://" + hostname + ":" + port + "/fedora";
+	    String login_str = username + ":" + password;
+	    
+	    String login_encoding = new sun.misc.BASE64Encoder().encode(login_str.getBytes());
+
+
+	    try {
+		URL ping_url = new URL(ping_url_str);
+		URLConnection uc = ping_url.openConnection();
+		uc.setRequestProperty  ("Authorization", "Basic " + login_encoding);
+		// Attempt to access some content ...
+		InputStream content = (InputStream)uc.getInputStream();
+
+	    }
+	    catch (Exception exception) {
+		System.err.println("****");
+		System.err.println("* Failed to connect to Fedora server.");
+		System.err.println("* Server might not be running, or incorrect username and/or password.");
+		System.err.println("***");
+		DebugStream.printStackTrace(exception);
+		System.exit(1);
+	    }
+	}
+	else {
+	    System.exit(0);
+	}
+
+
+	dialog.dispose();
+	dialog = null;
+
+
+    }
+
 
 
Index: gli/trunk/src/org/greenstone/gatherer/GathererProg.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/GathererProg.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/GathererProg.java	(revision 14974)
@@ -55,5 +55,6 @@
 	// Ensure platform specific LAF
 	try {
-	    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+	    // UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+	    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
 	}
 	catch (Exception exception) {
Index: gli/trunk/src/org/greenstone/gatherer/GetOpt.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/GetOpt.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/GetOpt.java	(revision 14974)
@@ -55,8 +55,12 @@
     public String metadata_path = null;
 
+    protected FedoraInfo fedora_info = null;
+
     public GetOpt(String[] args)
     {
 	// Default dictionary. Only used for starting error messages.
 	Dictionary dictionary = new Dictionary(null, null); 
+
+	fedora_info = new FedoraInfo();
 
 	// Parse arguments
@@ -142,6 +146,6 @@
 			use_remote_greenstone = true;
 			//Use a remote Greenstone
-		
-		    }else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){
+		    }
+		    else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){
 			//Use a remote Greenstone3
 			run_gsdl3=true;
@@ -243,4 +247,64 @@
 			}
 		    }
+
+		    // Fedora home
+		    if(argument_name.equals(StaticStrings.FEDORA_HOME)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setHome(argument_value);
+			}
+			else {
+			    fedora_info.setHome(argument_value + File.separator);
+			}
+		    }
+
+		    // Fedora hostname
+		    if(argument_name.equals(StaticStrings.FEDORA_HOSTNAME)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setHostname(argument_value);
+			}
+			else {
+			    fedora_info.setHostname(argument_value + File.separator);
+			}
+		    }
+		    // Fedora port
+		    if(argument_name.equals(StaticStrings.FEDORA_PORT)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setPort(argument_value);
+			}
+			else {
+			    fedora_info.setPort(argument_value + File.separator);
+			}
+		    }
+		    // Fedora username
+		    if(argument_name.equals(StaticStrings.FEDORA_USERNAME)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setUsername(argument_value);
+			}
+			else {
+			    fedora_info.setUsername(argument_value + File.separator);
+			}
+		    }
+		    // Fedora password
+		    if(argument_name.equals(StaticStrings.FEDORA_PASSWORD)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setPassword(argument_value);
+			}
+			else {
+			    fedora_info.setPassword(argument_value + File.separator);
+			}
+		    }
+		    // Fedora protocol, e.g. http or https
+		    if(argument_name.equals(StaticStrings.FEDORA_PROTOCOL)) {
+			if(argument_value.endsWith(File.separator)) {
+			    fedora_info.setProtocol(argument_value);
+			}
+			else {
+			    fedora_info.setProtocol(argument_value + File.separator);
+			}
+		    }
+
+
+
+
                   
 		}
Index: gli/trunk/src/org/greenstone/gatherer/collection/Collection.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/collection/Collection.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/collection/Collection.java	(revision 14974)
@@ -86,4 +86,6 @@
     /** The name of the import element. */
     static final private String IMPORT = "Import";
+    /** The name of the import element. */
+    static final private String EXPORT = "Export";
     /** The name of the imported attribute. */
     static final private String IMPORTED = "imported";
@@ -111,6 +113,13 @@
 	}
 	// Finally create all of the child managers that are directly dependant on a collection
-	build_options = new ScriptOptions(getBuildValues(), "buildcol.pl");
-	import_options = new ScriptOptions(getImportValues(), "import.pl");
+
+	if (Configuration.fedora_info.isActive()) {
+	    build_options = new ScriptOptions(getValues(BUILD), "g2f-buildcol.pl");
+	    import_options = new ScriptOptions(getValues(IMPORT), "g2f-import.pl");
+	}
+	else {
+	    build_options = new ScriptOptions(getBuildValues(), "buildcol.pl");
+	    import_options = new ScriptOptions(getImportValues(), "import.pl");
+	}
     }
     
@@ -334,4 +343,20 @@
     
 
+    /** Method to retrieve the current import/build/export/whatever options associated with this Collection. */
+    private Element getValues(String val_type) {
+	Element values_element = null;
+	try {
+	    Element document_element = document.getDocumentElement();
+	    Element config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG);
+	    values_element = (Element) XMLTools.getNodeFromNamed(config_element, val_type);
+	    config_element = null;
+	    document_element = null;
+	}
+	catch (Exception error) {
+	    DebugStream.printStackTrace(error);
+	}
+	return values_element;
+    }
+
     
     /** Method to retrieve the current build options associated with this Collection. */
@@ -350,4 +375,5 @@
 	return build_values_element;
     }
+
     
     /** Count either documents or folders, depending on the state of the given boolean. */
Index: gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java	(revision 14974)
@@ -159,5 +159,27 @@
 	    command_parts_list.add("-S");
 	}
-	command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl");
+
+	if (Configuration.fedora_info.isActive()) {
+	    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-buildcol.pl");
+
+	    command_parts_list.add("-hostname");
+	    command_parts_list.add(Configuration.fedora_info.getHostname());
+
+	    command_parts_list.add("-port");
+	    command_parts_list.add(Configuration.fedora_info.getPort());
+
+	    command_parts_list.add("-username");
+	    command_parts_list.add(Configuration.fedora_info.getUsername());
+
+	    command_parts_list.add("-password");
+	    command_parts_list.add(Configuration.fedora_info.getPassword());
+
+	    command_parts_list.add("-protocol");
+	    command_parts_list.add(Configuration.fedora_info.getProtocol());
+
+	}
+	else {
+	    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "buildcol.pl");
+	}
 	command_parts_list.add("-gli");
 	command_parts_list.add("-language");
@@ -193,8 +215,23 @@
     public boolean built() {
 	if(collection != null) {
-	    // Determine if the collection has been built by looking for the build.cfg or buildConfig.xml file
-	    String file_name = (Gatherer.GS3)? Utility.BUILD_CONFIG_XML : Utility.BUILD_CFG;
-	    File build_cfg_file = new File(getLoadedCollectionIndexDirectoryPath() + file_name);
-	    return build_cfg_file.exists();
+	    // Determine if the collection has been built by looking for the build.cfg (gs20 buildConfig.xml (gs3) or export.inf (fedora) file
+	    String file_name = "";
+
+	    if (Gatherer.GS3) {
+		file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CONFIG_XML;
+	    }
+	    else {
+		if (Configuration.fedora_info.isActive()) {
+		    // Fedora build
+		    //file_name = getLoadedCollectionArchivesDirectoryPath() + "import.inf";
+		    file_name = getLoadedCollectionExportDirectoryPath() + "export.inf";
+		}
+		else {
+		    file_name = getLoadedCollectionIndexDirectoryPath() + Utility.BUILD_CFG;
+		}
+	    }
+
+	    File test_file = new File(file_name);
+	    return test_file.exists();
 	}
 	return false;
@@ -592,4 +629,12 @@
     }
 
+    /** Returns the absolute filename of the loaded collection's export directory.
+     */
+    static public String getLoadedCollectionExportDirectoryPath()
+    {
+	return getLoadedCollectionDirectoryPath() + "export" + File.separator;
+    }
+
+
 
     /** Returns the absolute filename of the loaded collection's building directory.
@@ -764,5 +809,27 @@
 	    command_parts_list.add("-S");
 	}
-	command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl");
+
+	if (Configuration.fedora_info.isActive()) {
+	    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "g2f-import.pl");
+
+	    command_parts_list.add("-hostname");
+	    command_parts_list.add(Configuration.fedora_info.getHostname());
+
+	    command_parts_list.add("-port");
+	    command_parts_list.add(Configuration.fedora_info.getPort());
+
+	    command_parts_list.add("-username");
+	    command_parts_list.add(Configuration.fedora_info.getUsername());
+
+	    command_parts_list.add("-password");
+	    command_parts_list.add(Configuration.fedora_info.getPassword());
+
+	    command_parts_list.add("-protocol");
+	    command_parts_list.add(Configuration.fedora_info.getProtocol());
+	}
+	else {
+	    command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "import.pl");
+	}
+
 	command_parts_list.add("-gli");
 	command_parts_list.add("-language");
@@ -1339,4 +1406,10 @@
     private boolean installCollection()
     {
+	if (Configuration.fedora_info.isActive()) {
+	    DebugStream.println("Fedora build complete. No need to move files.");
+	    return true;
+	}
+
+       
 	DebugStream.println("Build complete. Moving files.");
 
Index: gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java	(revision 14974)
@@ -247,8 +247,26 @@
 		}
 
+
 		// Create the process.
 		Runtime runtime = Runtime.getRuntime();
 		Process process = runtime.exec(args);
+
+		/*
+		for (int i=0; i<args.length; i++) { 
+		    System.err.print(args[i] + " ");
+		}
+		System.err.println("");
+		*/
+
+
 		document = XMLTools.parseXML(process.getErrorStream());
+		
+		if (document == null) {
+		    // command has not generated XML, script has probably failed in some way
+		    for (int i=0; i<args.length; i++) { 
+			DebugStream.print(args[i] + " ");
+		    }
+		    DebugStream.println("");
+		}
 	    }
 
Index: gli/trunk/src/org/greenstone/gatherer/gems/MetadataSetManager.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gems/MetadataSetManager.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/gems/MetadataSetManager.java	(revision 14974)
@@ -82,5 +82,5 @@
         }
 
-	new Configuration(gli_user_directory_path, gsdl_path, gsdl3_path, null, null);         
+	new Configuration(gli_user_directory_path, gsdl_path, gsdl3_path, null, null, null);         
 	current_language = Configuration.getLanguage(); 
 
Index: gli/trunk/src/org/greenstone/gatherer/gui/DesignPane.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/DesignPane.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/gui/DesignPane.java	(revision 14974)
@@ -39,4 +39,7 @@
 import org.greenstone.gatherer.cdm.CollectionDesignManager;
 import org.greenstone.gatherer.cdm.Control;
+
+import org.greenstone.gatherer.Configuration;
+
 public class DesignPane 
     extends BaseConfigPane {
@@ -45,5 +48,10 @@
     public DesignPane() {
 	super();
-	contents = new String [] { "CDM.GUI.Plugins", "CDM.GUI.Indexes", "CDM.GUI.Subcollections",  "CDM.GUI.Classifiers" };
+	if (Configuration.fedora_info.isActive()) {
+	    contents = new String [] { "CDM.GUI.Plugins" };
+	}
+	else {
+	    contents = new String [] { "CDM.GUI.Plugins", "CDM.GUI.Indexes", "CDM.GUI.Subcollections",  "CDM.GUI.Classifiers" };
+	}
 	
     }
Index: gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java	(revision 14974)
@@ -387,5 +387,11 @@
 	    if (Configuration.get("workflow.design", true)) {
 		// "GUI.Design_Tooltip" is used automatically
-		tab_pane.addTab(Dictionary.get("GUI.Design"), JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip"));
+		if (Configuration.fedora_info.isActive()) {
+		    tab_pane.addTab("Plugins", JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip"));
+		}
+		else {
+		    tab_pane.addTab(Dictionary.get("GUI.Design"), JarTools.getImage("design.gif"), design_pane, Dictionary.get("GUI.Design_Tooltip"));
+		}
+
 		tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false);
 	    }
@@ -641,5 +647,5 @@
     public void setTitle(String title, String name) {
 	// Finally display the collection name in the title bar.
-	StringBuffer title_buffer = new StringBuffer(Gatherer.PROGRAM_NAME);
+	StringBuffer title_buffer = new StringBuffer(Configuration.getApplicationTitle());
 	title_buffer.append(StaticStrings.SPACE_CHARACTER);
 	title_buffer.append(Gatherer.PROGRAM_VERSION);
Index: gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/remote/RemoteGreenstoneServer.java	(revision 14974)
@@ -37,4 +37,5 @@
 import org.greenstone.gatherer.DebugStream;
 import org.greenstone.gatherer.Dictionary;
+import org.greenstone.gatherer.FedoraInfo;
 import org.greenstone.gatherer.GAuthenticator;
 import org.greenstone.gatherer.Gatherer;
@@ -854,5 +855,23 @@
 	public void run()
 	{
-	    remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication();
+
+	    if (Configuration.fedora_info.isActive()) {
+
+		FedoraInfo fedora_info = Configuration.fedora_info;
+		
+		String username = fedora_info.getUsername();
+		String password = fedora_info.getPassword();
+
+		//remote_greenstone_server_authentication.setUsername(fedora_info.getUsername());
+		//remote_greenstone_server_authentication.setPassword(fedora_info.getPassword());
+
+		remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication(username,password);
+		
+
+	    }
+	    else {
+		remote_greenstone_server_authentication = new RemoteGreenstoneServerAuthenticator().getAuthentication();
+
+	    }
 	}
 
@@ -861,4 +880,9 @@
 	    extends GAuthenticator
 	{
+	    public PasswordAuthentication getAuthentication(String username, String password)
+	    {
+		return getPasswordAuthentication(username,password);
+	    }
+
 	    public PasswordAuthentication getAuthentication()
 	    {
Index: gli/trunk/src/org/greenstone/gatherer/shell/GShell.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/shell/GShell.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/shell/GShell.java	(revision 14974)
@@ -192,4 +192,5 @@
 	    System.err.println("Collection name: " + collection_name);
 
+
 	    String script_args = "";
 	    for (int i = 1; i < (args.length - 1); i++) {
@@ -404,9 +405,9 @@
  	    else if(type == BUILD) {
  		// download the building directory (if gsdl server is remote)
- 		if (Gatherer.isGsdlRemote) {
+ 		if ((Gatherer.isGsdlRemote) && (!Configuration.fedora_info.isActive())) {
  		    if (progress!=null) {
  			progress.messageOnProgressBar("Downloading index data from server");
  		    }
-		    
+		    			
 		    if (!Gatherer.GS3){
 			// Only need to download build.cfg file
Index: gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java	(revision 14937)
+++ gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java	(revision 14974)
@@ -114,4 +114,10 @@
     static final public String FORMAT_END_TAG = "</format>";
     static final public String FURTHER_DIALOG_INDICATOR = "...";
+    static final public String FEDORA_HOME = "-fedora_home";
+    static final public String FEDORA_HOSTNAME = "-fedora_hostname";
+    static final public String FEDORA_PORT     = "-fedora_port";
+    static final public String FEDORA_USERNAME = "-fedora_username";
+    static final public String FEDORA_PASSWORD = "-fedora_password";
+    static final public String FEDORA_PROTOCOL = "-fedora_protocol";
     static final public String GLI_ATTRIBUTE = "gli";
     static final public String GLISERVER_URL_ARGUMENT = "-gliserver_url";
