org.cdlib.xtf.servletBase
Class StylesheetCache.DepResolver

Object
  extended by StylesheetCache.DepResolver
All Implemented Interfaces:
URIResolver
Enclosing class:
StylesheetCache

private class StylesheetCache.DepResolver
extends Object
implements URIResolver

While loading a stylesheet, we record all the sub-stylesheets referenced by it, so that we can form a list of all the dependencies. That way, if any of them are changed, the stylesheet will be auto- matically reloaded. We do it by implementing a pass-through URIResolver that adds a dependency and then does the normal URIResolver work.


Field Summary
(package private)  GeneratingCache cache
          The cache to add dependencies to
(package private)  URIResolver realResolver
          Does the work of resolving the URI's
 
Constructor Summary
StylesheetCache.DepResolver(GeneratingCache cache, URIResolver realResolver)
          Constructor.
 
Method Summary
 Source resolve(String href, String base)
          Resolve a URI, and add a dependency for it to the cache.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

GeneratingCache cache
The cache to add dependencies to


realResolver

URIResolver realResolver
Does the work of resolving the URI's

Constructor Detail

StylesheetCache.DepResolver

StylesheetCache.DepResolver(GeneratingCache cache,
                            URIResolver realResolver)
Constructor.

Parameters:
cache - The cache to add dependencies to
realResolver - The URIResolver that does the resolution
Method Detail

resolve

public Source resolve(String href,
                      String base)
               throws TransformerException
Resolve a URI, and add a dependency for it to the cache.

Specified by:
resolve in interface URIResolver
Parameters:
href - Full or partial hyperlink reference
base - Base URI of the document
Returns:
A Source representing the resolved URI.
Throws:
TransformerException