|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.DefaultHandler | +--org.sape.carbon.core.config.format.jdom.ConfigEntityResolver
Used to resolve entities in the JDOMConfigurationFactory.
The major functionality added in this over the DefaultHandler
is the ability to specify locations inside the classpath
for enties such as classpath://com/sapient/foo.dtd
thus allowing the validation documents to be inside the
jars of the functional classes.
Field Summary | |
private static String |
CLASSPATH_PREFIX
Protocol prefix indicating to classload the path. |
protected String |
name
Holds the name of the node being loaded. |
Constructor Summary | |
ConfigEntityResolver(String name)
Constructs a new ConfigEntityResolver. |
Method Summary | |
InputSource |
resolveEntity(String publicId,
String systemId)
Resolves the external entity. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSPATH_PREFIX
protected String name
Constructor Detail |
public ConfigEntityResolver(String name)
name
- the name of the node being loaded.Method Detail |
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
The only functionality added here is to check for the CLASSPATH_PREFIX and then attempt to classload the external entity from the location given. If there is no CLASSPATH_PREFIX or it fails to load, it will pass off resolution to the DefaultHandler it extends.
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
publicId
- The public identifier of the external entity
being referenced, or null if none was suppliedsystemId
- The system identifier of the external entity being
referenced.
SAXException
- indicates an error resolving the entity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |