public class JBossEntityResolver extends Object implements EntityResolver
Constructor and Description |
---|
JBossEntityResolver() |
Modifier and Type | Method and Description |
---|---|
static 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
|
boolean |
isReplaceSystemProperties() |
static boolean |
isWarnOnNonFileURLs() |
protected InputStream |
loadClasspathResource(String resource)
Look for the resource name on the thread context loader resource path.
|
static void |
registerEntity(String id,
String dtdFileName)
Register the mapping from the public id/system id to the dtd/xsd file
name.
|
void |
registerLocalEntity(String id,
String dtdOrSchema)
Register the mapping from the public id/system id to the dtd/xsd file
name.
|
protected InputSource |
resolveClasspathName(String systemId)
Resolve the systemId as a classpath resource.
|
InputSource |
resolveEntity(String publicId,
String systemId)
Returns DTD/Schema inputSource.
|
protected InputSource |
resolvePublicID(String publicId)
Load the schema from the class entity to schema file mapping.
|
protected InputSource |
resolveSystemID(String systemId)
Attempt to use the systemId as a URL from which the schema can be read.
|
protected InputSource |
resolveSystemIDasURL(String systemId)
Attempt to use the systemId as a URL from which the schema can be read.
|
void |
setReplaceSystemProperties(boolean replaceSystemProperties) |
static void |
setWarnOnNonFileURLs(boolean warnOnNonFileURLs) |
public static Map getEntityMap()
public static boolean isWarnOnNonFileURLs()
public static void setWarnOnNonFileURLs(boolean warnOnNonFileURLs)
public static void registerEntity(String id, 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 boolean isReplaceSystemProperties()
public void setReplaceSystemProperties(boolean replaceSystemProperties)
public void registerLocalEntity(String id, 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 InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
resolveEntity
in interface EntityResolver
publicId
- - Public ID of DTD, or null if it is a schemasystemId
- - the system ID of DTD or SchemaSAXException
IOException
public boolean isEntityResolved()
protected InputSource resolvePublicID(String publicId)
publicId
- - the public entity name of the schemaregisterEntity(String, String)
protected InputSource resolveSystemID(String systemId)
systemId
- - the systemIdprotected InputSource resolveSystemIDasURL(String systemId)
systemId
- - the systemIdprotected InputSource resolveClasspathName(String systemId)
systemId
- - the system ID of DTD or Schemaprotected InputStream loadClasspathResource(String resource)
resource
- - the classpath resource name of the schemaCopyright © 2020 JBoss by Red Hat. All rights reserved.