net.sf.bvalid.locator
Class ChainingSchemaLocator

java.lang.Object
  extended by net.sf.bvalid.locator.ChainingSchemaLocator
All Implemented Interfaces:
SchemaLocator

public class ChainingSchemaLocator
extends java.lang.Object
implements SchemaLocator

A SchemaLocator that uses multiple locators, in order, to resolve schema files.

Author:
cwilper@cs.cornell.edu

Constructor Summary
ChainingSchemaLocator(java.util.List locators)
           
 
Method Summary
 java.io.InputStream get(java.lang.String uri, boolean required)
          Get the content of the indicated schema.
 void successfullyUsed(java.lang.String uri)
          Notify the locator that the indicated schema was just used for a sucessful validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainingSchemaLocator

public ChainingSchemaLocator(java.util.List locators)
Method Detail

get

public java.io.InputStream get(java.lang.String uri,
                               boolean required)
                        throws ValidatorException
Description copied from interface: SchemaLocator
Get the content of the indicated schema. If the schema is not found and required is false, return null. If the schema is not found and required is true, throw an exception.

Specified by:
get in interface SchemaLocator
Throws:
ValidatorException

successfullyUsed

public void successfullyUsed(java.lang.String uri)
                      throws ValidatorException
Description copied from interface: SchemaLocator
Notify the locator that the indicated schema was just used for a sucessful validation. This information is particularly useful for SchemaLocators that do caching. Other implementations may simply ignore the the message.

Specified by:
successfullyUsed in interface SchemaLocator
Throws:
ValidatorException