public class ApacheCatalog
extends Catalog
<dtd>
and <entity>
) are not added to ApacheCatalog.
See XMLCatalog.java for the details of the entity and URI
resolution algorithms.XMLCatalog
Constructor and Description |
---|
ApacheCatalog() |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(CatalogEntry entry)
This method overrides the superclass method of the same name
in order to add catalog entries back to the controlling
XMLCatalog instance.
|
protected Catalog |
newCatalog()
Create a new ApacheCatalog instance.
|
void |
setResolver(ApacheCatalogResolver resolver)
Set the resolver object to callback.
|
protected Catalog newCatalog()
Create a new ApacheCatalog instance.
This method overrides the superclass method of the same name in order to set the resolver object for callbacks. The reason we have to do this is that internally Catalog creates a new instance of itself for each external catalog file processed. That is, if two external catalog files are processed, there will be a total of two ApacheCatalog instances, and so on.
public void setResolver(ApacheCatalogResolver resolver)
resolver
- the apache catalog resolver.public void addEntry(CatalogEntry entry)
This method overrides the superclass method of the same name in order to add catalog entries back to the controlling XMLCatalog instance. In this way, we can add classpath lookup for these entries.
When we add an external catalog file, the entries inside it get parsed by this method. Therefore, we override it to add each of them back to the controlling XMLCatalog instance. This is done by performing a callback to the ApacheCatalogResolver, which in turn calls the XMLCatalog.
XMLCatalog currently only understands PUBLIC
and URI
entry types, so we ignore the other types.
entry
- The CatalogEntry to process.