[Yanel-commits] rev 21218 - public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Thu Dec 28 12:53:43 CET 2006


Author: michi
Date: 2006-12-28 12:53:40 +0100 (Thu, 28 Dec 2006)
New Revision: 21218

Modified:
   public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
Log:
read events

Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java	2006-12-28 10:25:08 UTC (rev 21217)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java	2006-12-28 11:53:40 UTC (rev 21218)
@@ -44,7 +44,24 @@
      *
      */
     public View getView(String viewId) throws Exception {
-        log.warn("Not implemented yet!");
+        org.wyona.yarep.core.Repository dataRepo = getRealm().getRepository();
+        org.wyona.yarep.core.Path[] children = dataRepo.getChildren(new org.wyona.yarep.core.Path(getPath().toString()));
+        for (int i = 0; i < children.length; i++) {
+            log.error("DEBUG: Child: " + children[i]);
+            if (dataRepo.isResource(children[i])) {
+            java.io.InputStream in = dataRepo.getInputStream(children[i]);
+            StringBuffer event = new StringBuffer();
+            
+            byte[] buffer = new byte[8192];
+            int bytesRead;
+            while ((bytesRead = in.read(buffer)) != -1) {
+                event.append(new String(buffer));
+            }
+
+            log.error("DEBUG: Event: " + event);
+            }
+        }
+
         //response.getOutputStream();
 
         View view = new View();




More information about the Yanel-commits mailing list