org.apache.wicket.util.xml
Class CustomEntityResolver

java.lang.Object
  extended by org.apache.wicket.util.xml.CustomEntityResolver
All Implemented Interfaces:
org.xml.sax.EntityResolver

public class CustomEntityResolver
extends java.lang.Object
implements org.xml.sax.EntityResolver

entity resolver that tries to locate a document type definition (DTD) using a set of custom entity resolvers

Author:
pete

Nested Class Summary
static class CustomEntityResolver.EntityKey
          key for entity

consists of id + url

static interface CustomEntityResolver.EntityLocator
          entity locator

manages locating an entity

static class CustomEntityResolver.ServletApiEntityLocator
          entity locator for resources inside servlet-api.jar
 
Constructor Summary
CustomEntityResolver()
           
 
Method Summary
static CustomEntityResolver getPreloaded()
          get default instances of custom entity resolver with preloaded well-known entities
 void put(CustomEntityResolver.EntityKey key, CustomEntityResolver.EntityLocator locator)
          add custom entity resolver
 org.xml.sax.InputSource resolveEntity(java.lang.String id, java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomEntityResolver

public CustomEntityResolver()
Method Detail

getPreloaded

public static CustomEntityResolver getPreloaded()
get default instances of custom entity resolver with preloaded well-known entities

Returns:
instance of resolver

put

public void put(CustomEntityResolver.EntityKey key,
                CustomEntityResolver.EntityLocator locator)
add custom entity resolver

Parameters:
key - key for lookup (contains id and url)
locator - locator for looking up entity

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String id,
                                             java.lang.String url)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Throws:
org.xml.sax.SAXException
java.io.IOException


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.