   /**
    * <p>Gets a <code>Form</code> based on the name of the form and the <code>Locale</code> that 
    * most closely matches the <code>Locale</code> passed in.  The order of <code>Locale</code> 
    * matching is:</p>
    * <ol>
    *    <li>language + country + variant</li>
    *    <li>language + country</li>
    *    <li>language</li>
    *    <li>default locale</li>
    * </ol>
   */
    public Form get(String language, String country, String variant, Object formKey) {
    FormSet fs = null;
    Form f = null;
    String key = null;
    Object o = null;

    // Get formset with language + country + variant
    key = ((language != null && language.length() > 0) ? language : "") + 
            ((country != null && country.length() > 0) ? "_" + country : "") + 
            ((variant != null && variant.length() > 0) ? "_" + variant : "");
      
    Vector v = (Vector) hFormSets.get(key);
    if (v != null)
        {
        Enumeration formsets = v.elements();
        while (formsets.hasMoreElements()) 
            {
            o = formsets.nextElement();
            if (o != null) 
                {
                fs = (FormSet)o;
                if ((fs != null) && (fs.getForm(formKey) != null)) 
                    {
                    return fs.getForm(formKey);
                    }
                }
            }
        }
        
    // Get formset with language + country
    key = ((language != null && language.length() > 0) ? language : "") + 
        ((country != null && country.length() > 0) ? "_" + country : "");
         
    Vector v = (Vector) hFormSets.get(key);
    if (v != null)
        {
        formsets = v.elements();
        while (formsets.hasMoreElements()) 
            {
            o = formsets.nextElement();
            if (o != null) 
                {
                fs = (FormSet)o;
                if ((fs != null) && (fs.getForm(formKey) != null)) 
                    {
                    return fs.getForm(formKey);
                    }
                }
            }
        }
        
    // Get formset with language
    key = ((language != null && language.length() > 0) ? language : "");
    Vector v = (Vector) hFormSets.get(key);
    if (v != null)
        {
        formsets = v.elements();
        while (formsets.hasMoreElements())  
            {
            o = formsets.nextElement();
            if (o != null) 
                {
                fs = (FormSet)o;
                if ((fs != null) && (fs.getForm(formKey) != null)) 
                    {
                    return fs.getForm(formKey);
                    }
                }
            }
        }
    
    // Get formset with default locale
    key = defaultLocale.toString();
    Vector v = (Vector) hFormSets.get(key);
    if (v != null)
        {
        formsets = v.elements();
        while (formsets.hasMoreElements()) 
            {
            o = formsets.nextElement();
            if (o != null) 
                {
                fs = (FormSet)o;
                if ((fs != null) && (fs.getForm(formKey) != null)) 
                    {
                    return fs.getForm(formKey);
                    }
                }
            }
        }
        
    // No form found under any formset
    return null;    
    }

