Changeset 29989


Ignore:
Timestamp:
06/24/15 14:17:24 (5 years ago)
Author:
kjdon
Message:

add in the replaceListRef macros to the macro resolver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java

    r29090 r29989  
    9393        if (macro_resolver != null)
    9494        {
    95             macro_resolver.setSiteDetails(this.site_http_address, this.cluster_name, this.library_name);
    96             // set up the macro resolver
    97             Element replacement_elem = (Element) GSXML.getChildByTagName(extra_info, GSXML.REPLACE_ELEM + GSXML.LIST_MODIFIER);
    98             if (replacement_elem != null)
    99             {
    100                 macro_resolver.addMacros(replacement_elem);
    101             }
    102         }
     95          macro_resolver.setSiteDetails(this.site_http_address, this.cluster_name, this.getLibraryName());
     96          // set up the macro resolver
     97          Element replacement_elem = (Element) GSXML.getChildByTagName(extra_info, GSXML.REPLACE_ELEM + GSXML.LIST_MODIFIER);
     98          if (replacement_elem != null)
     99            {
     100              macro_resolver.addMacros(replacement_elem);
     101            }
     102         
     103          // look for any refs to global replace lists
     104          NodeList replace_refs_elems = extra_info.getElementsByTagName(GSXML.REPLACE_ELEM + GSXML.LIST_MODIFIER + GSXML.REF_MODIFIER);
     105          for (int i = 0; i < replace_refs_elems.getLength(); i++)
     106            {
     107              String id = ((Element) replace_refs_elems.item(i)).getAttribute("id");
     108              if (!id.equals(""))
     109            {
     110              Element replace_list = GSXML.getNamedElement(this.router.config_info, GSXML.REPLACE_ELEM + GSXML.LIST_MODIFIER, "id", id);
     111              if (replace_list != null)
     112                {
     113                  macro_resolver.addMacros(replace_list);
     114                }
     115            }
     116            }
     117        }
     118
     119       
    103120
    104121        // check that there are classifiers specified
Note: See TracChangeset for help on using the changeset viewer.