[Yanel-commits] rev 25122 - public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources

michi at wyona.com michi at wyona.com
Wed Jun 13 23:42:07 CEST 2007


Author: michi
Date: 2007-06-13 23:42:06 +0200 (Wed, 13 Jun 2007)
New Revision: 25122

Modified:
   public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
Log:
use YarepUtil to create nodes recursively

Modified: public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java	2007-06-13 20:57:14 UTC (rev 25121)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java	2007-06-13 21:42:06 UTC (rev 25122)
@@ -396,6 +396,9 @@
         org.wyona.yarep.core.Repository rcRepo = newResource.getRealm().getRTIRepository();
         org.wyona.commons.io.Path newRCPath = new org.wyona.commons.io.Path(PathUtil.getRCPath(newResource.getPath()));
         log.error("DEBUG: " + newRCPath);
+        org.wyona.yanel.core.util.YarepUtil.addNodes(rcRepo, newRCPath.toString(), org.wyona.yarep.core.NodeType.RESOURCE);
+
+/*
         if (!rcRepo.existsNode(newRCPath.toString())) {
             // TODO: create node recursively ...
             org.wyona.yarep.core.Node newNode = rcRepo.getNode(newRCPath.getParent().toString()).addNode(newRCPath.getName(), org.wyona.yarep.core.NodeType.RESOURCE);
@@ -404,6 +407,8 @@
 	    log.error("Node already exists: " + newRCPath);
             // TODO: Abort ...!
         }
+*/
+
         java.io.Writer writer = new java.io.OutputStreamWriter(rcRepo.getNode(newRCPath.toString()).getOutputStream());
         writer.write(rcContent.toString());
         writer.close();




More information about the Yanel-commits mailing list