net.sf.bvalid.locator
Interface SchemaLocator

All Known Implementing Classes:
CachingSchemaLocator, CatalogSchemaLocator, ChainingSchemaLocator, URLSchemaLocator

public interface SchemaLocator

Finds schema files given a URI (which is often a URL).

Author:
cwilper@cs.cornell.edu

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.
 

Method Detail

get

java.io.InputStream get(java.lang.String uri,
                        boolean required)
                        throws ValidatorException
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.

Throws:
ValidatorException

successfullyUsed

void successfullyUsed(java.lang.String uri)
                      throws ValidatorException
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.

Throws:
ValidatorException