net.sf.bvalid.locator
Class CatalogSchemaLocator

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

public class CatalogSchemaLocator
extends java.lang.Object
implements SchemaLocator

A SchemaLocator that uses a Catalog as its sole data source.

Author:
cwilper@cs.cornell.edu

Constructor Summary
CatalogSchemaLocator(SchemaCatalog catalog)
           
 
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

CatalogSchemaLocator

public CatalogSchemaLocator(SchemaCatalog catalog)
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)
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