[Yanel-commits] rev 22806 -
public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Wed Feb 21 01:15:27 CET 2007
Author: michi
Date: 2007-02-21 01:15:25 +0100 (Wed, 21 Feb 2007)
New Revision: 22806
Modified:
public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java
Log:
rc config creation fixed
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-02-20 22:58:38 UTC (rev 22805)
+++ public/yanel/trunk/src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/ResourceCreatorResource.java 2007-02-21 00:15:25 UTC (rev 22806)
@@ -418,7 +418,14 @@
} else {
log.warn("No RTI properties: " + newResource.getPath());
}
- java.io.Writer writer = newResource.getRealm().getRTIRepository().getWriter(new org.wyona.yarep.core.Path(PathUtil.getRTIPath(newResource.getPath())));
+ org.wyona.yarep.core.Repository rcRepo = newResource.getRealm().getRTIRepository();
+ org.wyona.commons.io.Path newRTIPath = new org.wyona.commons.io.Path(PathUtil.getRTIPath(newResource.getPath()));
+ if (rcRepo.existsNode(newRTIPath.toString())) {
+ // TODO: create node recursively ...
+ rcRepo.getRootNode().addNode(newRTIPath.getName(), org.wyona.yarep.core.NodeType.RESOURCE);
+ log.warn("Node has been created: " + newRTIPath);
+ }
+ java.io.Writer writer = new java.io.OutputStreamWriter(rcRepo.getNode(newRTIPath.toString()).getOutputStream());
writer.write(rtiContent.toString());
writer.close();
}
More information about the Yanel-commits
mailing list