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

Modified Files:
        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.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- BuilderReader.java  11 Mar 2008 16:48:18 -0000      1.96
+++ BuilderReader.java  12 Mar 2008 15:21:43 -0000      1.97
@@ -38,7 +38,7 @@
  * @author Rico Jansen
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: BuilderReader.java,v 1.96 2008/03/11 16:48:18 michiel Exp $
+ * @version $Id: BuilderReader.java,v 1.97 2008/03/12 15:21:43 michiel Exp $
  */
 public class BuilderReader extends DocumentReader {
 
@@ -408,8 +408,8 @@
             }
         }
 
-
-        for (Element indexElement : 
getChildElements("builder.indexlist","index")) {
+        for (Element indexList : getChildElements("builder", "indexlist")) {
+            for (Element indexElement : getChildElements(indexList, "index")) {
             String indexName = indexElement.getAttribute("name");
             if (indexName != null && !indexName.equals("")) {
                 String unique = indexElement.getAttribute("unique");
@@ -429,6 +429,7 @@
                 log.error("index in builder " + builder.getTableName() + " has 
no name");
             }
         }
+        }
         return results;
     }
 
@@ -437,7 +438,8 @@
      */
     public Set<Function> getFunctions(final MMObjectBuilder builder) {
         Map<String, Function> results = new HashMap<String, Function>();
-        for (Element functionElement : 
getChildElements("builder.functionlist","function")) {
+        for (Element functionList : 
getChildElements("builder","functionlist")) {
+            for (Element functionElement : 
getChildElements(functionList,"function")) {
             try {
                 final String functionName = 
functionElement.getAttribute("name");
                 String providerKey        = 
functionElement.getAttribute("key");
@@ -532,7 +534,7 @@
             } catch (Throwable e) {
                 log.error(e.getMessage(), e);
             }
-
+            }
         }
         Set<Function> r = new HashSet<Function>();
         for(Function fun : results.values()) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to