javax.xml.stream.XMLResolver, org.w3c.dom.ls.LSResourceResolver, org.xml.sax.EntityResolverpublic class XMLResourceResolver
extends java.lang.Object
implements javax.xml.stream.XMLResolver, org.xml.sax.EntityResolver, org.w3c.dom.ls.LSResourceResolver
| Constructor | Description |
|---|---|
XMLResourceResolver() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Map |
getEntityMap() |
Obtain a read-only view of the current entity map.
|
boolean |
isEntityResolved() |
Returns the boolean value to inform id DTD was found in the XML file or not
|
static boolean |
isWarnOnNonFileURLs() |
|
protected java.io.InputStream |
loadResource(java.lang.ClassLoader loader,
java.lang.String resource,
boolean trace) |
Look for the resource on the given class loader.
|
protected java.io.InputStream |
loadResource(java.lang.String resource,
boolean trace) |
Look for the resource on the class loader that loaded this resolver.
|
static void |
registerEntity(java.lang.String id,
java.lang.String dtdFileName) |
Register the mapping from the public id/system id to the dtd/xsd file
name.
|
void |
registerLocalEntity(java.lang.String id,
java.lang.String dtdOrSchema) |
Register the mapping from the public id/system id to the dtd/xsd file
name.
|
protected org.xml.sax.InputSource |
resolveClasspathName(java.lang.String systemId,
boolean trace) |
Resolve the systemId as a classpath resource.
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId) |
Returns DTD/Schema inputSource.
|
java.lang.Object |
resolveEntity(java.lang.String publicID,
java.lang.String systemID,
java.lang.String baseURI,
java.lang.String namespace) |
|
protected org.xml.sax.InputSource |
resolvePublicID(java.lang.String publicId,
boolean trace) |
Load the schema from the class entity to schema file mapping.
|
org.w3c.dom.ls.LSInput |
resolveResource(java.lang.String type,
java.lang.String namespaceURI,
java.lang.String publicID,
java.lang.String systemID,
java.lang.String baseURI) |
|
protected org.xml.sax.InputSource |
resolveSystemID(java.lang.String systemId,
boolean trace) |
Attempt to use the systemId as a URL from which the schema can be read.
|
protected org.xml.sax.InputSource |
resolveSystemIDasURL(java.lang.String systemId,
boolean trace) |
Attempt to use the systemId as a URL from which the schema can be read.
|
static void |
setWarnOnNonFileURLs(boolean warnOnNonFileURLs) |
public static java.util.Map getEntityMap()
public static boolean isWarnOnNonFileURLs()
public static void setWarnOnNonFileURLs(boolean warnOnNonFileURLs)
public static void registerEntity(java.lang.String id,
java.lang.String dtdFileName)
id - the DOCTYPE public id or system id such as
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"dtdFileName - the simple dtd/xsd file name, "ejb-jar.dtd"public void registerLocalEntity(java.lang.String id,
java.lang.String dtdOrSchema)
id - the DOCTYPE public id or system id such as
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"dtdOrSchema - the simple dtd/xsd file name, "ejb-jar.dtd"public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException,
java.io.IOException
resolveEntity in interface org.xml.sax.EntityResolverpublicId - - Public ID of DTD, or null if it is a schemasystemId - - the system ID of DTD or Schemaorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic boolean isEntityResolved()
protected org.xml.sax.InputSource resolvePublicID(java.lang.String publicId,
boolean trace)
publicId - - the public entity name of the schematrace - - trace level logging flagregisterEntity(String, String)protected org.xml.sax.InputSource resolveSystemID(java.lang.String systemId,
boolean trace)
systemId - - the systemIdtrace - - trace level logging flagprotected org.xml.sax.InputSource resolveSystemIDasURL(java.lang.String systemId,
boolean trace)
systemId - - the systemIdtrace - - trace level logging flagprotected org.xml.sax.InputSource resolveClasspathName(java.lang.String systemId,
boolean trace)
systemId - - the system ID of DTD or Schematrace - - trace level logging flagprotected java.io.InputStream loadResource(java.lang.String resource,
boolean trace)
resource - - the classpath resource name of the schematrace - - trace level logging flagprotected java.io.InputStream loadResource(java.lang.ClassLoader loader,
java.lang.String resource,
boolean trace)
resource - - the classpath resource name of the schematrace - - trace level logging flagpublic java.lang.Object resolveEntity(java.lang.String publicID,
java.lang.String systemID,
java.lang.String baseURI,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException
resolveEntity in interface javax.xml.stream.XMLResolverjavax.xml.stream.XMLStreamExceptionpublic org.w3c.dom.ls.LSInput resolveResource(java.lang.String type,
java.lang.String namespaceURI,
java.lang.String publicID,
java.lang.String systemID,
java.lang.String baseURI)
resolveResource in interface org.w3c.dom.ls.LSResourceResolverCopyright © 2018 JBoss by Red Hat. All rights reserved.