org.apache.cocoon.components.url
Class SourceProtocolHandler

java.lang.Object
  extended byorg.apache.batik.util.AbstractParsedURLProtocolHandler
      extended byorg.apache.cocoon.components.url.SourceProtocolHandler
All Implemented Interfaces:
org.apache.batik.util.ParsedURLProtocolHandler

public class SourceProtocolHandler
extends org.apache.batik.util.AbstractParsedURLProtocolHandler

A Batik protocol handler that handles all Cocoon sources. This allows <svg:image xlink:href="..."/> to use any of the protocols handled by Cocoon.

Version:
$Id: SourceProtocolHandler.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected static org.apache.batik.util.ParsedURLProtocolHandler defaultHandler
          Batik's original default handler
protected static InheritableThreadLocal localResolver
          Thread-local source resolver
 
Fields inherited from class org.apache.batik.util.AbstractParsedURLProtocolHandler
protocol
 
Constructor Summary
SourceProtocolHandler(String protocol)
           
 
Method Summary
static SourceResolver getSourceResolver()
          Get the thread-local resolver.
 org.apache.batik.util.ParsedURLData parseURL(org.apache.batik.util.ParsedURL baseURL, String urlStr)
           
 org.apache.batik.util.ParsedURLData parseURL(String urlStr)
           
static void setup(SourceResolver resolver)
          Set the resolver to be used within the current thread.
 
Methods inherited from class org.apache.batik.util.AbstractParsedURLProtocolHandler
getProtocolHandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localResolver

protected static final InheritableThreadLocal localResolver
Thread-local source resolver


defaultHandler

protected static final org.apache.batik.util.ParsedURLProtocolHandler defaultHandler
Batik's original default handler

Constructor Detail

SourceProtocolHandler

public SourceProtocolHandler(String protocol)
Method Detail

setup

public static void setup(SourceResolver resolver)
Set the resolver to be used within the current thread.


getSourceResolver

public static SourceResolver getSourceResolver()
Get the thread-local resolver.


parseURL

public org.apache.batik.util.ParsedURLData parseURL(org.apache.batik.util.ParsedURL baseURL,
                                                    String urlStr)

parseURL

public org.apache.batik.util.ParsedURLData parseURL(String urlStr)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.