[Yanel-commits] rev 23960 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation

michi at wyona.com michi at wyona.com
Sat Apr 21 23:54:14 CEST 2007


Author: michi
Date: 2007-04-21 23:54:13 +0200 (Sat, 21 Apr 2007)
New Revision: 23960

Modified:
   public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeResConfigAndDataRepoImpl.java
Log:
started to retrieve nodes also from data repo

Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeResConfigAndDataRepoImpl.java
===================================================================
--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeResConfigAndDataRepoImpl.java	2007-04-21 21:34:56 UTC (rev 23959)
+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/navigation/NodeResConfigAndDataRepoImpl.java	2007-04-21 21:54:13 UTC (rev 23960)
@@ -137,7 +137,7 @@
         java.util.Vector c = new java.util.Vector();
         try {
             if (repo.isCollection(path)) {
-                log.debug("Is collection within repo: " + path);
+                log.debug("Is collection within resource config repo: " + path);
                 Path[] children = repo.getChildren(path);
                 for (int i = 0; i < children.length; i++) {
                     if (repo.isCollection(children[i])) {
@@ -153,8 +153,31 @@
                     }
                 }
             } else {
-                log.warn("Is not a collection: " + path);
+                log.debug("Is not a collection within resource config repo: " + path);
             }
+
+            if (dataRepo.isCollection(path)) {
+                log.debug("Is collection within data repository: " + path);
+                Path[] children = dataRepo.getChildren(path);
+                for (int i = 0; i < children.length; i++) {
+                    log.error("DEBUG: " + children[i]);
+/*
+                    if (dataRepo.isCollection(children[i])) {
+                        c.add(children[i].toString());
+                    }
+                    if (children[i].getName().indexOf(".yanel-rti") > 0) {
+                        String cp = children[i].toString().substring(0, children[i].toString().indexOf(".yanel-rti"));
+                        if (!dataRepo.isCollection(new Path(cp))) c.add(cp);
+                    }
+                    if (children[i].getName().indexOf(".yanel-rc") > 0) {
+                        String cp = children[i].toString().substring(0, children[i].toString().indexOf(".yanel-rc"));
+                        if (!dataRepo.isCollection(new Path(cp))) c.add(cp);
+                    }
+*/
+                }
+            } else {
+                log.warn("Is not a collection within data repository: " + path);
+            }
         } catch(Exception e) {
             log.error(e);
         }




More information about the Yanel-commits mailing list