Update of /var/cvs/src/org/mmbase/util/xml
In directory james.mmbase.org:/tmp/cvs-serv12016

Modified Files:
      Tag: MMBase-1_8
        BuilderReader.java 
Log Message:
related to   MMB-1619, it is comfortable if you can have multiple indexlists, 
functionlists


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util/xml
See also: http://www.mmbase.org/jira/browse/MMB-1619


Index: BuilderReader.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/xml/BuilderReader.java,v
retrieving revision 1.74.2.12
retrieving revision 1.74.2.13
diff -u -b -r1.74.2.12 -r1.74.2.13
--- BuilderReader.java  11 Mar 2008 16:50:16 -0000      1.74.2.12
+++ BuilderReader.java  12 Mar 2008 15:19:28 -0000      1.74.2.13
@@ -37,7 +37,7 @@
  * @author Rico Jansen
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: BuilderReader.java,v 1.74.2.12 2008/03/11 16:50:16 michiel 
Exp $
+ * @version $Id: BuilderReader.java,v 1.74.2.13 2008/03/12 15:19:28 michiel 
Exp $
  */
 public class BuilderReader extends DocumentReader {
 
@@ -422,8 +422,9 @@
             }
         }
 
-
-        for(Iterator indices = getChildElements("builder.indexlist","index"); 
indices.hasNext(); ) {
+        for(Iterator ns1 = getChildElements("builder", "indexlist"); 
ns1.hasNext(); ) {
+            Element indexList = (Element) ns1.next();
+            for(Iterator indices = getChildElements(indexList,"index"); 
indices.hasNext(); ) {
             Element indexElement   = (Element)indices.next();
             String indexName = indexElement.getAttribute("name");
             if (indexName != null && !indexName.equals("")) {
@@ -445,6 +446,7 @@
                 log.error("index in builder " + builder.getTableName() + " has 
no name");
             }
         }
+        }
         return results;
     }
 
@@ -453,7 +455,10 @@
      */
     public Set getFunctions(final MMObjectBuilder buil) {
         Set results = new HashSet();
-        for(Iterator ns = getChildElements("builder.functionlist","function"); 
ns.hasNext(); ) {
+        for(Iterator ns1 = getChildElements("builder", "functionlist"); 
ns1.hasNext(); ) {
+            Element functionList = (Element) ns1.next();
+
+            for(Iterator ns = getChildElements(functionList,"function"); 
ns.hasNext(); ) {
             try {
                 Element functionElement   = (Element)ns.next();
                 final String functionName = 
functionElement.getAttribute("name");
@@ -518,6 +523,7 @@
             } catch (Throwable e) {
                 log.error(e.getMessage(), e);
             }
+            }
 
         }
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to