Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration.resolver
Interface EntityRegistry

All Known Implementing Classes:
  DefaultConfigurationBuilder, DefaultEntityResolver, HierarchicalXMLConfiguration, XMLConfiguration

    public interface EntityRegistry

Interface used for registering and retrieving PUBLICID to URL mappings.

Since:
  1.7
Version:
  $Id: EntityRegistry.java 1206577 2011-11-26 20:25:52Z oheger $
Author:
  Commons Configuration team

Method Summary
`Map<String,URL>` | `getRegisteredEntities()` Returns a map with the entity IDs that have been registered using the `registerEntityId()` method.
`void` | `registerEntityId(String publicId, URL entityURL)` Registers the specified URL for the specified public identifier.

Method Detail

### registerEntityId

    void registerEntityId(String publicId,
                          URL entityURL)

  Registers the specified URL for the specified public identifier.

  This implementation maps `PUBLICID`'s to URLs (from which the resource will be loaded). A common use case for this method is to register local URLs (possibly computed at runtime by a class loader) for DTDs and Schemas. This allows the performance advantage of using a local version without having to ensure every `SYSTEM` URI on every processed XML document is local. This implementation provides only basic functionality. If more sophisticated features are required, either calling `XMLConfiguration.setDocumentBuilder(DocumentBuilder)` to set a custom `DocumentBuilder` (which also can be initialized with a custom `EntityResolver`) or creating a custom entity resolver and registering it with the XMLConfiguration is recommended.

  Parameters:
    `publicId` - Public identifier of the Entity to be resolved
    `entityURL` - The URL to use for reading this Entity
  Throws:
    `IllegalArgumentException` - if the public ID is undefined

### getRegisteredEntities

    Map<String,URL> getRegisteredEntities()

  Returns a map with the entity IDs that have been registered using the `registerEntityId()` method.

  Returns:
    a map with the registered entity IDs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.