[Yanel-commits] rev 50377 -
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Sun Jun 13 16:49:40 CEST 2010
Author: michi
Date: 2010-06-13 16:49:39 +0200 (Sun, 13 Jun 2010)
New Revision: 50377
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
various protocols implemented
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2010-06-13 12:24:08 UTC (rev 50376)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2010-06-13 14:49:39 UTC (rev 50377)
@@ -89,6 +89,15 @@
private InputStream getContentXML(Repository repo, String yanelPath, String revisionName) throws Exception {
if (yanelPath != null) {
if (log.isDebugEnabled()) log.debug("Yanel Path: " + yanelPath);
+ if (yanelPath.startsWith("yanelrepo:") || yanelPath.startsWith("yanelresource:") || yanelPath.startsWith("http:")) {
+ log.debug("Protocol/Scheme used: " + yanelPath);
+ SourceResolver resolver = new SourceResolver(this);
+ Source source = resolver.resolve(yanelPath, null);
+ return ((javax.xml.transform.stream.StreamSource) source).getInputStream();
+ } else {
+ log.info("No protocol used.");
+ }
+
Resource res = yanel.getResourceManager().getResource(getEnvironment(), getRealm(), yanelPath);
if (ResourceAttributeHelper.hasAttributeImplemented(res, "Viewable", "1")) {
// TODO: Pass the request ...
More information about the Yanel-commits
mailing list