Changeset 26491 for main

Show
Ignore:
Timestamp:
21.11.2012 01:48:53 (7 years ago)
Author:
davidb
Message:

Another place where we now also want to check for gsf:foreach-metadata

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java

    r26087 r26491  
    101101  protected void extractMetadataNames(Element format, HashSet<String> meta_names) 
    102102    { 
    103  
    104       NodeList metadata_nodes = format.getElementsByTagNameNS(GSXML.GSF_NAMESPACE, "metadata"); 
     103         
     104      NodeList metadata_nodes = format.getElementsByTagNameNS(GSXML.GSF_NAMESPACE, "metadata"); // gsf:metadata 
    105105      for (int i = 0; i < metadata_nodes.getLength(); i++) 
    106106        { 
     
    115115        } 
    116116           
     117      NodeList foreach_metadata_nodes = format.getElementsByTagNameNS(GSXML.GSF_NAMESPACE, "foreach-metadata"); // gsf:foreach-metadata 
     118      for (int i = 0; i < foreach_metadata_nodes.getLength(); i++) 
     119        { 
     120          Element elem = (Element) foreach_metadata_nodes.item(i); 
     121          String name = elem.getAttribute("name"); 
     122          String select = elem.getAttribute("select"); 
     123 
     124          if (!select.equals("")) { 
     125        name = select+GSConstants.META_RELATION_SEP+name; 
     126          } 
     127          meta_names.add(name); 
     128        }          
    117129    } 
    118130