[Yanel-commits] rev 42514 - in public/yanel/trunk/src:
contributions/resources/data-repo-sitetree/htdocs
contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation
webapp/global-resource-configs
guillaume at wyona.com
guillaume at wyona.com
Thu Apr 23 16:13:57 CEST 2009
Author: guillaume
Date: 2009-04-23 16:13:57 +0200 (Thu, 23 Apr 2009)
New Revision: 42514
Modified:
public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/sitetree.xsl
public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation/DataRepoSitetreeResource.java
public/yanel/trunk/src/webapp/global-resource-configs/data-repo-sitetree_yanel-rc.xml
Log:
Data-repo sitetree is now recursive thanks to Simon.
Issue: 6978
Modified: public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/sitetree.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/sitetree.xsl 2009-04-23 13:21:59 UTC (rev 42513)
+++ public/yanel/trunk/src/contributions/resources/data-repo-sitetree/htdocs/sitetree.xsl 2009-04-23 14:13:57 UTC (rev 42514)
@@ -26,9 +26,17 @@
</head>
<body>
<h1>Sitetree</h1>
- <a href="?yanel.resource.viewid=xml">XML</a> (TODO: show-all-subnodes)
-<br/>
- <a href="?yanel.resource.viewid=google-sitemap">"Google" sitemap</a> (TODO: show-all-subnodes)
+ <ul>
+ <li>
+ <a href="?yanel.resource.viewid=xml&show-all-subnodes=true">XML</a>
+ </li>
+ <li>
+ <a href="?yanel.resource.viewid=google-sitemap&show-all-subnodes=true">"Google" sitemap</a>
+ </li>
+ <li>
+ <a href="?yanel.resource.viewid=json-node&show-all-subnodes=true">JSON</a>
+ </li>
+ </ul>
<!-- <xsl:apply-templates select="/sitetree/collection"/> -->
<script language="javascript" src="resource-types/http://www.wyona.org/yanel/resource/1.0::data-repo-sitetree/js/org.wyona.yanel.navigation.gwt.navigationtree.NavigationTree.nocache.js"></script>
Modified: public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation/DataRepoSitetreeResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation/DataRepoSitetreeResource.java 2009-04-23 13:21:59 UTC (rev 42513)
+++ public/yanel/trunk/src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation/DataRepoSitetreeResource.java 2009-04-23 14:13:57 UTC (rev 42514)
@@ -4,6 +4,8 @@
package org.wyona.yanel.impl.resources.navigation;
+import javax.xml.transform.Transformer;
+
import org.wyona.yanel.core.navigation.Node;
import org.wyona.yanel.core.navigation.Sitetree;
import org.wyona.yanel.impl.resources.BasicXMLResource;
@@ -85,7 +87,12 @@
} catch (Exception e) {
log.info("could not get property show-all-subnodes. falling back to show-all-subnodes=true.");
}
- //private String getNodeAsXML(com.hp.hpl.jena.rdf.model.Resource resource) {
+ String showAllSubnodesParameter = getParameterAsString("show-all-subnodes");
+ if (showAllSubnodesParameter != null && Boolean.valueOf(showAllSubnodesParameter).booleanValue()) {
+ showAllSubnodes = true;
+ }
+
+ //private String getNodeAsXML(com.hp.hpl.jena.rdf.model.Resource resource) {
//log.error("DEBUG: Path: " + path);
Sitetree sitetree = getRealm().getRepoNavigation();
Node node = sitetree.getNode(getRealm(), path);
@@ -160,4 +167,16 @@
}
return sb.toString();
}
+
+ protected void passTransformerParameters(Transformer transformer) throws Exception {
+ super.passTransformerParameters(transformer);
+ try {
+ String resourceConfigPropertyDomain = getResourceConfigProperty("domain");
+ if (resourceConfigPropertyDomain != null) {
+ transformer.setParameter("domain", resourceConfigPropertyDomain);
+ }
+ } catch (Exception e) {
+ log.error("could not get property domain. domain will not be availabel within transformer chain. " + e.getMessage(), e);
+ }
+ }
}
Modified: public/yanel/trunk/src/webapp/global-resource-configs/data-repo-sitetree_yanel-rc.xml
===================================================================
--- public/yanel/trunk/src/webapp/global-resource-configs/data-repo-sitetree_yanel-rc.xml 2009-04-23 13:21:59 UTC (rev 42513)
+++ public/yanel/trunk/src/webapp/global-resource-configs/data-repo-sitetree_yanel-rc.xml 2009-04-23 14:13:57 UTC (rev 42514)
@@ -4,6 +4,7 @@
<yanel:rti name="data-repo-sitetree" namespace="http://www.wyona.org/yanel/resource/1.0"/>
<yanel:property name="show-all-subnodes" value="false"/>
+ <!-- <yanel:property name="domain" value="ADD YOUR DOMAIN (e.g. http://localhost:8080)"/> -->
<yanel:property name="name4path-parameter" value="node"/>
More information about the Yanel-commits
mailing list