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

michi at wyona.com michi at wyona.com
Fri Dec 29 00:34:47 CET 2006


Author: michi
Date: 2006-12-29 00:34:46 +0100 (Fri, 29 Dec 2006)
New Revision: 21233

Modified:
   public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
Log:
properties added and xslt started

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 20:16:58 UTC (rev 21232)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java	2006-12-28 23:34:46 UTC (rev 21233)
@@ -41,15 +41,21 @@
     }
 
     /**
-     *
+     * Generate view
+     * @param viewId xml, ics, xhtml
      */
     public View getView(String viewId) throws Exception {
+        String categories = getRTI().getProperty("categories");
+        String classes = getRTI().getProperty("classes");
+        String userIds = getRTI().getProperty("user-ids");
+        log.error("DEBUG: " + categories + " " + classes + " " + userIds);
+
         org.wyona.yarep.core.Repository dataRepo = getRealm().getRepository();
         org.wyona.yarep.core.Path[] children = dataRepo.getChildren(new org.wyona.yarep.core.Path(getPath().toString()));
+        //org.wyona.yarep.core.Path[] children = dataRepo.search("categories", categories);
 
         StringBuffer calendar = new StringBuffer("<?xml version=\"1.0\"?>\n<calendar>");
         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]);
                 java.io.ByteArrayOutputStream baos  = new java.io.ByteArrayOutputStream();
@@ -63,7 +69,6 @@
                 }
 
                 String event = baos.toString();
-                log.error("DEBUG: Event: " + event);
                 int endOfProcessingInstruction = event.indexOf("?>");
                 if (endOfProcessingInstruction > 0) {
                     calendar.append(event.toString().substring(endOfProcessingInstruction + 2));
@@ -83,6 +88,8 @@
 	    view.setInputStream(new java.io.StringBufferInputStream(calendar.toString()));
             return view;
         } else {
+            String xslt = getRTD().getConfigFile().getParent();
+            log.error("DEBUG: XSLT: " + xslt);
             //response.getOutputStream();
 
             View view = new View();




More information about the Yanel-commits mailing list