[Yanel-commits] rev 29324 - public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf

michi at wyona.com michi at wyona.com
Wed Nov 28 21:46:22 CET 2007


Author: michi
Date: 2007-11-28 21:46:22 +0100 (Wed, 28 Nov 2007)
New Revision: 29324

Modified:
   public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
Log:
debug statements added

Modified: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-11-28 20:12:16 UTC (rev 29323)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-11-28 20:46:22 UTC (rev 29324)
@@ -99,6 +99,8 @@
             }
             sb.append("</wyona:foaf>");
 
+            log.error("DEBUG: XML: " + sb.toString());
+
             if (viewId != null && viewId.equals("source")) {
                 view.setInputStream(new StringBufferInputStream(sb.toString()));
                 view.setMimeType(getMimeType(viewId));
@@ -159,11 +161,11 @@
             return url.openConnection().getInputStream();
         } else {
             String path = getPath();
-	    if (path.lastIndexOf(".rdf") == path.length() - 4) {
-                return getProfilesRepository().getNode(path).getInputStream();
-            } else {
-                return getProfilesRepository().getNode(path.substring(0, path.lastIndexOf(".html")) + ".rdf").getInputStream();
+	    if (path.endsWith(".html")) {
+                path = path.substring(0, path.lastIndexOf(".html")) + ".rdf";
             }
+            log.error("DEBUG: RDF path: " + path);
+            return getProfilesRepository().getNode(path).getInputStream();
         }
     }
 



More information about the Yanel-commits mailing list