[Yanel-commits] rev 28094 -
public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Wed Oct 24 09:06:43 CEST 2007
Author: michi
Date: 2007-10-24 09:06:41 +0200 (Wed, 24 Oct 2007)
New Revision: 28094
Modified:
public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/DataRepoSitetreeResource.java
Log:
name and debug log message fixed
Modified: public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/DataRepoSitetreeResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/DataRepoSitetreeResource.java 2007-10-23 21:28:06 UTC (rev 28093)
+++ public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/DataRepoSitetreeResource.java 2007-10-24 07:06:41 UTC (rev 28094)
@@ -100,25 +100,25 @@
*
*/
private String getNodeAsXML(String path) {
- log.error("DEBUG: Path: " + path);
+ //log.error("DEBUG: Path: " + path);
Sitetree sitetree = (Sitetree) getYanel().getBeanFactory().getBean("repo-navigation");
Node node = sitetree.getNode(getRealm(), path);
StringBuffer sb = new StringBuffer("");
if (node.isCollection()) {
- sb.append("<collection path=\"" + path + "\">");
+ sb.append("<collection path=\"" + path + "\" name=\" " + node.getName() + "\">");
Node[] children = node.getChildren();
for (int i = 0; i < children.length; i++) {
if (children[i].isCollection()) {
sb.append(getNodeAsXML(children[i].getPath()));
} else if (children[i].isResource()) {
- sb.append("<resource path=\"" + children[i].getPath() + "\"/>");
+ sb.append("<resource path=\"" + children[i].getPath() + "\" name=\"" + children[i].getName() + "\"/>");
} else {
- sb.append("<neither-resource-nor-collection path=\"" + children[i].getPath() + "\"/>");
+ sb.append("<neither-resource-nor-collection path=\"" + children[i].getPath() + "\" name=\"" + children[i].getName() + "\"/>");
}
}
sb.append("</collection>");
} else {
- sb.append("<resource path=\"" + path + "\"/>");
+ sb.append("<resource path=\"" + path + "\" name=\"" + node.getName() + "\"/>");
}
return sb.toString();
}
More information about the Yanel-commits
mailing list