|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.xml.MCRURIResolver
public final class MCRURIResolver
Reads XML documents from various URI types. This resolver is used to read DTDs, XML Schema files, XSL document() usages, xsl:include usages and MyCoRe Editor include declarations. DTDs and Schema files are read from the CLASSPATH of the application when XML is parsed. XML document() calls and xsl:include calls within XSL stylesheets can be read from URIs of type resource, webapp, file, session, query or mcrobject. MyCoRe editor include declarations can read XML files from resource, webapp, file, session, http or https, query, or mcrobject URIs.
| Nested Class Summary | |
|---|---|
static interface |
MCRURIResolver.MCRResolver
Resolver interface. |
static interface |
MCRURIResolver.MCRResolverProvider
provides a URI -- Resolver Mapping One can implement this interface to provide additional URI schemes this MCRURIResolver should handle, too. |
| Field Summary | |
|---|---|
(package private) static String |
SESSION_OBJECT_NAME
|
| Method Summary | |
|---|---|
(package private) MCRURIResolver.MCRResolver |
getResolver(String scheme)
|
String |
getScheme(String uri)
Returns the protocol or scheme for the given URI. |
static void |
init(ServletContext ctx,
String webAppBase)
Initializes the MCRURIResolver for servlet applications. |
static MCRURIResolver |
instance()
Returns the MCRURIResolver singleton |
protected Element |
parseStream(InputStream in)
Reads xml from an InputStream and returns the parsed root element. |
Element |
resolve(String uri)
Reads XML from URIs of various type. |
Source |
resolve(String href,
String base)
URI Resolver that resolves XSL document() or xsl:include calls. |
InputSource |
resolveEntity(String publicId,
String systemId)
Implements the SAX EntityResolver interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final String SESSION_OBJECT_NAME
| Method Detail |
|---|
public static MCRURIResolver instance()
public static void init(ServletContext ctx,
String webAppBase)
ctx - the servlet context of this web applicationwebAppBase - the base URL of this web application
public Source resolve(String href,
String base)
throws TransformerException
resolve in interface URIResolverTransformerExceptionURIResolver
public InputSource resolveEntity(String publicId,
String systemId)
throws IOException
resolveEntity in interface EntityResolverIOExceptionEntityResolverpublic Element resolve(String uri)
uri - the URI where to read the XML from
public String getScheme(String uri)
uri - the URI to parse
MCRURIResolver.MCRResolver getResolver(String scheme)
protected Element parseStream(InputStream in)
throws JDOMException,
IOException
in - the InputStream that contains the XML document
IOException
JDOMException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||