public class URIResolver extends Object implements URIResolver, SizeMeasurable, Serializable
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
URIResolver.Entry
Objects of this type connect a prefix (must normally end in :)
with a File (which must be a Directory).
|
static class |
URIResolver.EntryList
This is a list of prefix/directory pairs which is used in the constructor of URIResolver.
|
| Constructor and Description |
|---|
URIResolver()
Create an URIResolver without support for a certain directory.
|
URIResolver(File f)
Deprecated.
|
URIResolver(File f,
URIResolver.EntryList extraDirs)
Deprecated.
|
URIResolver(URL c)
Create an URIResolver for a certain directory.
|
URIResolver(URL c,
boolean overhead)
This constructor does not create an actual object that can be
used.
|
URIResolver(URL c,
URIResolver.EntryList extraDirs)
Besides the current working directory you can also supply an
ordered list of URIResolver.Entry's.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
URIResolver can be used as a key in Maps (Caches).
|
int |
getByteSize()
Determines the byte-size of this object
|
int |
getByteSize(SizeOf sizeof)
Determines the byte-size of this object using the given SizeOf instance.
|
URL |
getCwd()
Returns the working directory which was supplied in the
constructor.
|
String |
getPath()
Creates a 'path' string, which is a list of directories.
|
List<String> |
getPrefixPath()
Creates a List of strings, every entry is a directory prefixed with its 'prefix'.
|
int |
hashCode()
URIResolver can be used as a key in Maps (Caches).
|
static void |
main(String[] argv)
For testing only
|
Source |
resolve(String href,
String base)
Implementation of the resolve method of javax.xml.transform.URIResolver.
|
File |
resolveToFile(String href)
Deprecated.
|
File |
resolveToFile(String href,
String base)
Deprecated.
|
URL |
resolveToURL(String href,
String base) |
String |
toString() |
public URIResolver(URL c, boolean overhead)
c - The directory for which this URIResolver must (not) be created.overhead - A boolean. It is ignored. It serves only to distinct this constructor from the other one.FactoryCachepublic URIResolver(URL c)
c - The directory for which this URIResolver must be created.public URIResolver(File f)
public URIResolver()
public URIResolver(File f, URIResolver.EntryList extraDirs)
public URIResolver(URL c, URIResolver.EntryList extraDirs)
c - 'Current working dir'extraDirs - A EntryList, containing 'extra' dirs with
prefixes. If not specified or null, there will still be one
'extra dir' available, namely the MMBase configuration
directory (with prefix mm:)public URL getCwd()
public String getPath()
public List<String> getPrefixPath()
public URL resolveToURL(String href, String base) throws TransformerException
TransformerExceptionpublic Source resolve(String href, String base) throws TransformerException
resolve in interface URIResolverTransformerExceptionURIResolverpublic int hashCode()
public boolean equals(Object o)
public int getByteSize()
SizeMeasurablegetByteSize in interface SizeMeasurablepublic int getByteSize(SizeOf sizeof)
SizeMeasurablegetByteSize in interface SizeMeasurableMMBase 1.9-SNAPSHOT - ${javadoctimestamp}