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

## net.sourceforge.jsxe
Class CatalogManager

    java.lang.Object
      net.sourceforge.jsxe.CatalogManager

public class CatalogManager
extends Object

The CatalogManager implements cataloging external entities to a local cache so that it can be later retrieved without having to retrieve it from the external source on every parse.

Version:
  $Id: CatalogManager.java 915 2006-06-08 17:53:30Z ian_lewis $
Author:
  Slava Pestov, Chris Stevenson, Ian Lewis (IanLewis@member.fsf.org)

Method Summary
`static void` | `clearCache()` Clears the resource cache.
`static boolean` | `isLocal(net.sourceforge.jsxe.CatalogManager.Entry e)` Tests whether an entry in the resource cache has a file cached locally on disk.
`static void` | `propertiesChanged()` Notifies the CatalogManager that the application properties have changed and that cache properties need to be reloaded.
`static InputSource` | `resolve(String current, String publicId, String systemId)` Attempts to resolve an external entity.
`static void` | `save()` Saves the resource cache to jsXe's properties.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### resolve

    public static InputSource resolve(String current,
                                      String publicId,
                                      String systemId)
                               throws Exception

  Attempts to resolve an external entity. The internal cache is checked to see if the entity is cached on disk and if so it is retrieved from the cache. If not, it is read from the external source. Local files are resolved relative to the current file.

  Parameters:
    `current` - the uri of the file where the external entity reference is located.
    `publicId` - the public ID of the external entity reference.
    `systemId` - the system ID of the external entity reference.
  Throws:
    `Exception`

### isLocal

    public static boolean isLocal(net.sourceforge.jsxe.CatalogManager.Entry e)

  Tests whether an entry in the resource cache has a file cached locally on disk.

  Parameters:
    `e` - the entry

### propertiesChanged

    public static void propertiesChanged()

  Notifies the CatalogManager that the application properties have changed and that cache properties need to be reloaded.

### save

    public static void save()

  Saves the resource cache to jsXe's properties.

### clearCache

    public static void clearCache()

  Clears the resource cache. If an external entity needs to be resolved after the resource cache has been cleared then it will be reloaded at that time.

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