|
JBoss Common Classes 2.2.17.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.xml.JBossEntityResolver
public class JBossEntityResolver
Local entity resolver to handle standard J2EE DTDs and Schemas as well as JBoss specific DTDs.
Function boolean isEntityResolved() is here to avoid validation errors in descriptors that do not have a DOCTYPE declaration.
Constructor Summary | |
---|---|
JBossEntityResolver()
|
Method Summary | |
---|---|
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,
boolean trace)
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,
boolean trace)
Resolve the systemId as a classpath resource. |
InputSource |
resolveEntity(String publicId,
String systemId)
Returns DTD/Schema inputSource. |
protected InputSource |
resolvePublicID(String publicId,
boolean trace)
Load the schema from the class entity to schema file mapping. |
protected InputSource |
resolveSystemID(String systemId,
boolean trace)
Attempt to use the systemId as a URL from which the schema can be read. |
protected InputSource |
resolveSystemIDasURL(String systemId,
boolean trace)
Attempt to use the systemId as a URL from which the schema can be read. |
void |
setReplaceSystemProperties(boolean replaceSystemProperties)
|
static void |
setWarnOnNonFileURLs(boolean warnOnNonFileURLs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JBossEntityResolver()
Method Detail |
---|
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 Schema
SAXException
IOException
public boolean isEntityResolved()
protected InputSource resolvePublicID(String publicId, boolean trace)
publicId
- - the public entity name of the schematrace
- - trace level logging flag
registerEntity(String, String)
protected InputSource resolveSystemID(String systemId, boolean trace)
systemId
- - the systemIdtrace
- - trace level logging flag
protected InputSource resolveSystemIDasURL(String systemId, boolean trace)
systemId
- - the systemIdtrace
- - trace level logging flag
protected InputSource resolveClasspathName(String systemId, boolean trace)
systemId
- - the system ID of DTD or Schematrace
- - trace level logging flag
protected InputStream loadClasspathResource(String resource, boolean trace)
resource
- - the classpath resource name of the schematrace
- - trace level logging flag
|
JBoss Common Classes 2.2.17.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |