P13NEntityResolver Class
DEPRECATED Use com.bea.p13n.util.DefaultEntityResolver
instead.
- public class P13NEntityResolver
extends Object
implements EntityResolver
A SAX EntityResolver which can get XML Entities (including DTDs) for WLCS.
This first looks for a file of the SYSTEM ID, relative to the
basePath (either specified in the constructor or defaults to the value of
the "commerce.xml.entity.basePath" property in the
weblogicommerce.properties file, which defaults to "lib/dtd"). If that
fails, it pulls the filename portion of the SYSTEM ID and tries that
relative to the same basePath.
Failing that, it looks in the CLASSPATH for the SYSTEM ID, relative to
the basePath. Failing that, it looks in the CLASSPATH for the SYSTEM ID.
Failing that, it looks in the CLASSPATH for the filename of the SYSTEM ID,
relative to the basePath. Failing that, it looks in the CLASSPATH for
filename of SYSTEM ID.
-
Hierarchy
-
Object
P13NEntityResolver
-
All Implemented Interfaces
-
EntityResolver
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
basePath
protected String
basePath
- Our basePath.
P13NEntityResolver
public P13NEntityResolver()
P13NEntityResolver
public P13NEntityResolver(String
basePath)
- Constructor.
getBasePath() Method
public static String
getBasePath()
Get the base directory where DTDs live from the
weblogiccommerce.properties file.
getInstance() Method
public static EntityResolver
getInstance()
Get the singleton instance.
resolveEntity(String, String) Method
public InputSource
resolveEntity(String
publicId,
String
systemId)
throws IOException
, SAXException
Resolve a SAX Entity to an InputSource.
See the base class comments for the search order.
Parameters
-
publicId
- the entity's PUBLIC ID.
-
systemId
- the entity's SYSTEM ID.
Returns
- the Entity, or null if the parser should do its default action.
Exceptions
-
IOException
- thrown on an I/O error finding the entity.
-
SAXException