MergeLoad
        setContext(new org.osid.OsidContext());            
        this.userProperties = new java.util.Properties();
        this.osidImplProperties = new java.util.Properties();
        this.easProperties = new java.util.Properties();
        try
        {
            setUserHomeDirectory(System.getProperties().getProperty("user.home") + "/");
            setEasHomeDirectory(getUserHomeDirectory() + "eas/");
        
            /**
                The user's properties file and whether the user is running Clouseau or
                Narrivation are passed in.  The first step is to load the user's properties,
                the OSID implementations properties, and the application-specific properties.
                Any failure is fatal.
            */
            java.io.InputStream istream = ClassLoader.getSystemResourceAsStream(userPropertiesFile);
            if (istream == null)
            {
                // fatal error
                System.out.println(eas.util.UtilityServices.localize("CANNOT_LOCATE") + " user properties file: " + userPropertiesFile);
                System.exit(1);
            }
            userProperties.load(istream);

            istream = ClassLoader.getSystemResourceAsStream("osidimpl.properties");
            if (istream == null)
            {
                // fatal error
                System.out.println(eas.util.UtilityServices.localize("CANNOT_LOCATE") + " osidimpl.properties");
                System.exit(1);
            }
            this.osidImplProperties.load(istream);

            /*
            
                Load user properties
                
            */
            
            /*
             
                Load directories.  Any directory that does not end in a path separator gets one.
                If they don't, the separator is added.  Any directory that does not yet exist is made.
            */
            
            String propertyString = this.userProperties.getProperty("root_directory");
            if (propertyString == null)
            {
                propertyString = "./";
            }
            else
            {
                propertyString = propertyString.trim();
/*
                if (!propertyString.endsWith(java.io.File.pathSeparator))
                {
                    propertyString += java.io.File.pathSeparator;
                }
                java.io.File file = new java.io.File(propertyString);
                if (!file.isDirectory())
                {
                    file.mkdir();
                }
*/
            }
            setRootDirectory(getEasHomeDirectory() + propertyString);

            propertyString = this.userProperties.getProperty("user_resource_directory");
            if (propertyString == null)
            {
                propertyString = "";
            }
            else
            {
                propertyString = propertyString.trim();
                java.io.File file = new java.io.File(propertyString);
                if (!file.isDirectory())
                {
                    file.mkdir();
                }
            }
            setUserResourceDirectory(getRootDirectory() + propertyString);

            propertyString = this.userProperties.getProperty("localization_directory");
            if (propertyString == null)
            {
                propertyString = "";
            }
            else
            {
                propertyString = propertyString.trim();
                java.io.File file = new java.io.File(propertyString);
                if (!file.isDirectory())
                {
                    file.mkdir();
                }
            }
            setLocalizationDirectory(getRootDirectory() + propertyString);

            propertyString = this.userProperties.getProperty("localization_file");
            if (propertyString == null)
            {
                propertyString = "";
            }
            else
            {
                propertyString = propertyString.trim();
            }
            setLocalizationFile(getLocalizationDirectory() + propertyString);
            
            String debugMode = this.userProperties.getProperty("debug_mode");
            setDebugMode( (debugMode != null) && (debugMode.toLowerCase().trim().equals("true")) );                
  
            String intString = this.userProperties.getProperty("window_width");
            if (intString == null)
            {
                setWindowWidth(750);  //arbitrary default, not meant to be needed
            }
            else
            {
                int windowWidth = (new Integer(intString.trim())).intValue();
                setWindowWidth(windowWidth);
            }
            intString = this.userProperties.getProperty("window_height");
            if (intString == null)
            {
                setWindowHeight(550);  //arbitrary default, not meant to be needed
            }
            else
            {
                int windowHeight = (new Integer(intString.trim())).intValue();
                setWindowHeight(windowHeight);
            }

            setApplicationTitle(eas.util.UtilityServices.localize("DIRECTORYSEARCH_APPLICATION"));
            istream = ClassLoader.getSystemResourceAsStream(easPropertiesFile);
            if (istream == null)
            {
                // fatal error
                System.out.println(eas.util.UtilityServices.localize("CANNOT_LOCATE") + " " + easPropertiesFile);
                System.exit(1);
            }
            this.easProperties.load(istream);
            
            setRunningConnected(isConnected);
            setRunningDisconnected(!isConnected);
            setMac(System.getProperty("mrj.version") != null);
            setWindows(!isMac()); // maybe we can do better
            
            /*
            
                Eas properties
                
            */
                propertyString = this.easProperties.getProperty("system_resource_directory");
                if (propertyString != null)
                {
                    setSystemResourceDirectory(getRootDirectory() + propertyString.trim());
                }
                
                setHelpURL("");
                String helpDirectory = this.easProperties.getProperty("help_directory");
                if (helpDirectory != null)
                {
                    helpDirectory = getEasHomeDirectory() + helpDirectory.trim();
/*
                    if (!helpDirectory.endsWith(java.io.File.pathSeparator))
                    {
                        helpDirectory += java.io.File.pathSeparator;
                    }
*/
                    if (isRunningConnected())
                    {
                        propertyString = this.easProperties.getProperty("eas_help_remote_url");
                        if (propertyString != null)
                        {
                            setHelpURL(propertyString.trim());
                        }
                    }
                    else
                    {
                        propertyString = this.easProperties.getProperty("eas_help_local_url");
                        if (propertyString != null)
                        {
                            setHelpURL("file://" + helpDirectory + propertyString.trim());
                        }
                    }
                }
                
                propertyString = this.easProperties.getProperty("eas_visit_site_url");
                if (propertyString != null)
                {
                    setVisitSiteURL(propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("eas_visit_site_image");
                if (propertyString != null)
                {
                    setVisitSiteImage(propertyString.trim());
                }


                propertyString = this.easProperties.getProperty("splash_image");
                if (propertyString != null)
                {
                    setSplashImage(getSystemResourceDirectory() + propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("about_image");
                if (propertyString != null)
                {
                    setAboutImage(getSystemResourceDirectory() + propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("iconify_image");
                if (propertyString != null)
                {
                    setIconifyImage(getSystemResourceDirectory() + propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("splash_sleep");
                if (propertyString != null)
                {
                    setSplashSleep((new Long(propertyString.trim())).longValue());
                }

                propertyString = this.easProperties.getProperty("search_image");
                if (propertyString != null)
                {
                    setSearchImage(getSystemResourceDirectory() + propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("search_in_progress_image");
                if (propertyString != null)
                {
                    setSearchInProgressImage(getSystemResourceDirectory() + propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("log_file");
                if (propertyString != null)
                {
                    setLogFile(propertyString.trim());
                }
                
                propertyString = this.easProperties.getProperty("logging_implementation");
                if (propertyString != null)
                {
                    setLoggingImplementation(propertyString.trim());
                }
                
                String nextDomain = this.easProperties.getProperty("log_format_domain");
                if (nextDomain != null) nextDomain = nextDomain.trim();
                
                String nextAuthority = this.easProperties.getProperty("log_format_authority");
                if (nextAuthority != null) nextAuthority = nextAuthority.trim();
                
                String nextKeyword = this.easProperties.getProperty("log_format_keyword");
                if (nextKeyword != null) nextKeyword = nextKeyword.trim();
                
                String nextDescription = this.easProperties.getProperty("log_format_description");
                if (nextDescription != null) nextDescription = nextDescription.trim();
                
                setLogFormatType(new eas.util.Type(nextAuthority,nextDomain,nextKeyword,nextDescription));
                
                nextDomain = this.easProperties.getProperty("log_priority_domain");
                if (nextDomain != null) nextDomain = nextDomain.trim();
                
                nextAuthority = this.easProperties.getProperty("log_priority_authority");
                if (nextAuthority != null) nextAuthority = nextAuthority.trim();
                
                nextKeyword = this.easProperties.getProperty("log_priority_keyword");
                if (nextKeyword != null) nextKeyword = nextKeyword.trim();
                
                nextDescription = this.easProperties.getProperty("log_priority_description");
                if (nextDescription != null) nextDescription = nextDescription.trim();
                
                setLogPriorityType(new eas.util.Type(nextAuthority,nextDomain,nextKeyword,nextDescription));

                propertyString = this.easProperties.getProperty("id_implementation");
                if (propertyString != null)
                {
                    setIdImplementation(propertyString.trim());
                }

                propertyString = this.easProperties.getProperty("agent_implementation");
                if (propertyString != null)
                {
                    setAgentImplementation(propertyString.trim());
                }
               
                int footerStartRow = 60;
                intString = this.easProperties.getProperty("print_footer_start_row").trim();
                if (intString != null)
                {
                    footerStartRow = (new Integer(intString)).intValue();
                }
                setPrintFooterStartRow(footerStartRow);
                int footerStartColumn = 10;
                intString = this.easProperties.getProperty("print_footer_start_column").trim();
                if (intString != null)
                {
                    footerStartColumn = (new Integer(intString)).intValue();
                }
                setPrintFooterStartColumn(footerStartColumn);
                String fontName = "sanserif";
                String f = this.easProperties.getProperty("print_footer_font_name").trim();
                if (f != null) fontName = f;
                int fontStyle = 0;
                intString = this.easProperties.getProperty("print_footer_font_style").trim();
                if (intString != null)
                {
                    fontStyle = (new Integer(intString)).intValue();
                }
                int fontSize = 12;
                intString = this.easProperties.getProperty("print_footer_font_size").trim();
                if (intString != null)
                {
                    fontSize = (new Integer(intString)).intValue();
                }
                setPrintFooterFont(new java.awt.Font(fontName,fontStyle,fontSize));
                int rvalue = 153;
                int gvalue = 153;
                int bvalue = 153;
                String rvalueString = this.easProperties.getProperty("print_footer_color_rval").trim();
                String gvalueString = this.easProperties.getProperty("print_footer_color_gval").trim();
                String bvalueString = this.easProperties.getProperty("print_footer_color_bval").trim();
                if (rvalueString != null)
                {
                    rvalue = (new Integer(rvalueString)).intValue();
                }
                if (gvalueString != null)
                {
                        gvalue = (new Integer(gvalueString)).intValue();
                }
                if (bvalueString != null)
                {
                    bvalue = (new Integer(bvalueString)).intValue();
                }
                setPrintFooterColor(new java.awt.Color(rvalue,gvalue,bvalue));
                setPrintFooterText(this.easProperties.getProperty("print_footer_text").trim());
                
            /*
            
                OSID Implementation properties
                
            */                
            this.guiServices = eas.ui.GUIServices.getInstance();
                                
            setDefaultCriteriaEditor(this.osidImplProperties.getProperty("default_criteria_editor").trim());
            int i = 0;
            while ( (nextDomain = this.osidImplProperties.getProperty("type_criteria_editor_" + i + "_domain")) != null )
            {
                nextDomain = nextDomain.trim();
                nextAuthority = this.osidImplProperties.getProperty("type_criteria_editor_" + i + "_authority").trim();
                nextKeyword = this.osidImplProperties.getProperty("type_criteria_editor_" + i + "_keyword").trim();
                nextDescription = this.osidImplProperties.getProperty("type_criteria_editor_" + i + "_description").trim();
                addCriteriaEditorType(new eas.util.Type(nextAuthority,nextDomain,nextKeyword,nextDescription));
                addCriteriaEditor(this.osidImplProperties.getProperty("type_criteria_editor_" + i).trim());
                i++;
            }
        }
        catch(Throwable t)
        {
            if (this.guiServices != null)
            {
                this.guiServices.log(t,"load: " + t.getMessage());
                this.guiServices.debugTrace(t);
            }
            else
            {
                t.printStackTrace();
            }
            System.out.println("Fatal error");
            System.exit(1);
        }
MergeGetCriteriaAdjuster
        try
        {
            int index = adjusterVector.indexOf(packageName + repositoryId.getIdString());
            Class adjuster = Class.forName((String)adjusterVector.elementAt(index));
            return (eas.searcheditor.CriteriaAdjuster)(adjuster.newInstance()); 
        }
        catch (Throwable t)
        {
            this.guiServices.log("getCriteriaAdjuster(): " + t.getMessage());
            this.guiServices.debugTrace(t);
            return null;
        }
MergeAddCriteriaAdjuster
        try
        {
            adjusterVector.addElement(packageName + repositoryId.getIdString());
        }
        catch (Throwable t)
        {
            this.guiServices.log("addCriteriaAdjuster(): " + t.getMessage());
            this.guiServices.debugTrace(t);
        }
MergeGetAgentManager
        if (this.agentManager == null)
        {
            try
            {
                this.agentManager = (org.osid.agent.AgentManager)org.osid.OsidLoader.getManager(
                    "org.osid.agent.AgentManager",
                    getAgentImplementation(),
                    getContext(),
                    new java.util.Properties());
            }
            catch (Throwable t)
            {
                this.guiServices.log(t,t.getMessage());
            }
        }
        return this.agentManager;
MergeGetIdManager
        if (this.idManager == null)
        {
            try
            {
                this.idManager = (org.osid.id.IdManager)org.osid.OsidLoader.getManager(
                    "org.osid.id.IdManager",
                    getIdImplementation(),
                    getContext(),
                    new java.util.Properties());
            }
            catch (Throwable t)
            {
                this.guiServices.log(t,t.getMessage());
            }
        }
        return this.idManager;
