You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2003/06/07 23:19:36 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/source/impl SitemapSourceFactory.java ContextSourceFactory.java
bruno 2003/06/07 14:19:36
Modified: src/java/org/apache/cocoon/components/source/impl
SitemapSourceFactory.java ContextSourceFactory.java
Log:
Implemented URIAbsolutizer interface
Revision Changes Path
1.2 +9 -3 cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSourceFactory.java
Index: SitemapSourceFactory.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSourceFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SitemapSourceFactory.java 9 Mar 2003 00:09:14 -0000 1.1
+++ SitemapSourceFactory.java 7 Jun 2003 21:19:36 -0000 1.2
@@ -61,6 +61,8 @@
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.source.URIAbsolutizer;
+import org.apache.excalibur.source.SourceUtil;
/**
* This class implements the cocoon: protocol.
@@ -72,7 +74,7 @@
*/
public final class SitemapSourceFactory
extends AbstractLogEnabled
- implements SourceFactory, ThreadSafe, Composable
+ implements SourceFactory, ThreadSafe, Composable, URIAbsolutizer
{
/** The <code>ComponentManager</code> */
private ComponentManager manager;
@@ -111,5 +113,9 @@
((SitemapSource)source).recycle();
}
}
-
+
+ public String absolutize(String baseURI, String location) {
+ return SourceUtil.absolutize(baseURI, location, true);
+ }
+
}
1.3 +8 -7 cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java
Index: ContextSourceFactory.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ContextSourceFactory.java 16 Mar 2003 17:49:13 -0000 1.2
+++ ContextSourceFactory.java 7 Jun 2003 21:19:36 -0000 1.3
@@ -55,10 +55,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceFactory;
-import org.apache.excalibur.source.SourceResolver;
+
+import org.apache.excalibur.source.*;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
@@ -81,7 +79,7 @@
*/
public class ContextSourceFactory
extends AbstractLogEnabled
- implements SourceFactory, Composable, Disposable, Contextualizable, ThreadSafe
+ implements SourceFactory, Composable, Disposable, Contextualizable, ThreadSafe, URIAbsolutizer
{
/** The context */
@@ -178,5 +176,8 @@
this.resolver.release( source );
}
}
-
+
+ public String absolutize(String baseURI, String location) {
+ return SourceUtil.absolutize(baseURI, location, true);
+ }
}