net.sf.bvalid.catalog
Class DiskSchemaCatalog

java.lang.Object
  extended by net.sf.bvalid.catalog.DiskSchemaCatalog
All Implemented Interfaces:
SchemaCatalog

public class DiskSchemaCatalog
extends java.lang.Object
implements SchemaCatalog

A SchemaCatalog that uses a given SchemaIndex in conjunction with files on disk.

Author:
cwilper@cs.cornell.edu

Constructor Summary
DiskSchemaCatalog(SchemaIndex index, java.io.File storageDir)
           
 
Method Summary
 boolean contains(java.lang.String uri)
           
 java.io.InputStream get(java.lang.String uri)
          Get the schema InputStream if in the catalog, else return null.
 java.util.Iterator listURIs()
           
 void put(java.lang.String uri, java.io.InputStream in)
           
 void remove(java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskSchemaCatalog

public DiskSchemaCatalog(SchemaIndex index,
                         java.io.File storageDir)
                  throws ValidatorException
Throws:
ValidatorException
Method Detail

contains

public boolean contains(java.lang.String uri)
                 throws ValidatorException
Specified by:
contains in interface SchemaCatalog
Throws:
ValidatorException

listURIs

public java.util.Iterator listURIs()
                            throws ValidatorException
Specified by:
listURIs in interface SchemaCatalog
Throws:
ValidatorException

get

public java.io.InputStream get(java.lang.String uri)
                        throws ValidatorException
Description copied from interface: SchemaCatalog
Get the schema InputStream if in the catalog, else return null.

Specified by:
get in interface SchemaCatalog
Throws:
ValidatorException

put

public void put(java.lang.String uri,
                java.io.InputStream in)
         throws ValidatorException
Specified by:
put in interface SchemaCatalog
Throws:
ValidatorException

remove

public void remove(java.lang.String uri)
            throws ValidatorException
Specified by:
remove in interface SchemaCatalog
Throws:
ValidatorException