|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.io.XMLEntityResolver
A flexable entity resolver for use with parsing XML files. This implements:
A list of class loaders maybe associated with this object. If so
an attempt will be made to resolve file:
URLs from
the class path.
XCatalog
Field Summary | |
static java.lang.String |
CLASSPATH_PROTOCOL
Protocol to use in specifying a URL pointing to the CLASSPATH. |
static java.lang.String |
CLASSPATH_PROTOCOL_PREFIX
Protocol prefix. |
static java.lang.String |
DEFAULT_ENTITY_CATALOG
URL for Enhydra default entity catalog. |
static java.lang.String |
LUTRIS_ENTITY_CATALOG
URL for Lutrus Enhydra default entity catalog. |
Constructor Summary | |
XMLEntityResolver()
|
Method Summary | |
void |
addClassLoader(java.lang.ClassLoader classLoader)
Add a classloader to the end of the order list of classloaders to search for entities. |
void |
addPublicMapping(java.lang.String publicId,
java.lang.String systemId)
Adds a public to system identifier mapping. |
void |
addSystemMapping(java.lang.String systemId1,
java.lang.String systemId2)
Adds a system identifier alias. |
java.util.Enumeration |
getClassLoaders()
Get an enumeration of the class loaders. |
java.io.PrintWriter |
getDebugWriter()
Get the debug writer. |
java.lang.String |
getPublicMapping(java.lang.String publicId)
Returns a public identifier mapping. |
java.util.Enumeration |
getPublicMappingKeys()
Returns an enumeration of public identifier mapping keys. |
java.lang.String |
getSystemMapping(java.lang.String systemId)
Returns a system identifier alias. |
java.util.Enumeration |
getSystemMappingKeys()
Returns an enumeration of system identifier mapping keys. |
void |
loadCatalog(org.xml.sax.InputSource source)
Loads a catalog specified by the given input source and appends the contents to the catalog object. |
void |
removePublicMapping(java.lang.System publicId)
Removes a public identifier mapping. |
void |
removeSystemMapping(java.lang.String systemId)
Removes a system identifier alias. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
void |
setDebugWriter(java.io.PrintWriter writer)
Set a writer used to output debug messages. |
void |
setDefaultResolving()
Load the default entity catalog and enable loading entities the classloader for the classloader that loaded this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CLASSPATH_PROTOCOL
public static final java.lang.String CLASSPATH_PROTOCOL_PREFIX
public static final java.lang.String DEFAULT_ENTITY_CATALOG
#loadDefaultCatalog
,
Constant Field Valuespublic static final java.lang.String LUTRIS_ENTITY_CATALOG
#loadDefaultCatalog
,
Constant Field ValuesConstructor Detail |
public XMLEntityResolver()
Method Detail |
public void setDebugWriter(java.io.PrintWriter writer)
public java.io.PrintWriter getDebugWriter()
public void loadCatalog(org.xml.sax.InputSource source) throws org.xml.sax.SAXException, java.io.IOException
source
- The catalog source.
org.xml.sax.SAXException
- Throws exception on SAX error.
java.io.IOException
- Throws exception on i/o error.public void setDefaultResolving() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public void addPublicMapping(java.lang.String publicId, java.lang.String systemId)
publicId
- The public identifier, or "key".systemId
- The system identifier, or "value".public void removePublicMapping(java.lang.System publicId)
publicId
- The public identifier to remove.public java.util.Enumeration getPublicMappingKeys()
public java.lang.String getPublicMapping(java.lang.String publicId)
publicId
- The public identifier, or "key".
public void addSystemMapping(java.lang.String systemId1, java.lang.String systemId2)
public void removeSystemMapping(java.lang.String systemId)
systemId
- The system identifier to remove.public java.util.Enumeration getSystemMappingKeys()
public java.lang.String getSystemMapping(java.lang.String systemId)
systemId
- The system identifier "key".
public void addClassLoader(java.lang.ClassLoader classLoader)
public java.util.Enumeration getClassLoaders()
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.EntityResolver
org.xml.sax.SAXException
java.io.IOException
EntityResolver
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |