|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.util.xml.URIResolver
public class URIResolver
This URIResolver can be used to resolve URI's, also in TransformerFactory's. It has knowledge of a kind of path (as used by shells). Every entry of this path is labeled with a 'prefix'. This path always has at least (and on default) two entries:
| Nested Class Summary | |
|---|---|
(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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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:)| Method Detail |
|---|
public URL getCwd()
public String getPath()
public List<String> getPrefixPath()
public File resolveToFile(String href)
public File resolveToFile(String href,
String base)
public URL resolveToURL(String href,
String base)
throws TransformerException
TransformerException
public Source resolve(String href,
String base)
throws TransformerException
resolve in interface URIResolverTransformerExceptionURIResolverpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int getByteSize()
SizeMeasurable
getByteSize in interface SizeMeasurablepublic int getByteSize(SizeOf sizeof)
SizeMeasurable
getByteSize in interface SizeMeasurablepublic String toString()
toString in class Object
public static void main(String[] argv)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||