net.sf.bvalid.catalog
Class FileSchemaIndex
java.lang.Object
net.sf.bvalid.catalog.FileSchemaIndex
- All Implemented Interfaces:
- SchemaIndex
public class FileSchemaIndex
- extends java.lang.Object
- implements SchemaIndex
A file-backed SchemaIndex
implementation.
- Author:
- cwilper@cs.cornell.edu
Method Summary |
java.lang.String |
getFilename(java.lang.String uri)
|
protected java.io.File |
getIndexFile()
|
java.util.Set |
getURISet()
|
protected static java.util.Map |
loadIndex(java.io.File indexFile)
|
java.lang.String |
putFilename(java.lang.String uri,
java.lang.String filename)
|
boolean |
removeMapping(java.lang.String uri)
|
protected static void |
saveIndex(java.io.File indexFile,
java.util.Map indexMap)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_REFRESH_SECONDS
public static final int DEFAULT_REFRESH_SECONDS
- See Also:
- Constant Field Values
FileSchemaIndex
public FileSchemaIndex(java.io.File indexFile)
throws ValidatorException
- Throws:
ValidatorException
FileSchemaIndex
public FileSchemaIndex(java.io.File indexFile,
int refreshSeconds)
throws ValidatorException
- Throws:
ValidatorException
getIndexFile
protected java.io.File getIndexFile()
getURISet
public java.util.Set getURISet()
throws ValidatorException
- Specified by:
getURISet
in interface SchemaIndex
- Throws:
ValidatorException
getFilename
public java.lang.String getFilename(java.lang.String uri)
throws ValidatorException
- Specified by:
getFilename
in interface SchemaIndex
- Throws:
ValidatorException
putFilename
public java.lang.String putFilename(java.lang.String uri,
java.lang.String filename)
throws ValidatorException
- Specified by:
putFilename
in interface SchemaIndex
- Throws:
ValidatorException
removeMapping
public boolean removeMapping(java.lang.String uri)
throws ValidatorException
- Specified by:
removeMapping
in interface SchemaIndex
- Throws:
ValidatorException
loadIndex
protected static java.util.Map loadIndex(java.io.File indexFile)
throws java.io.IOException
- Throws:
java.io.IOException
saveIndex
protected static void saveIndex(java.io.File indexFile,
java.util.Map indexMap)
throws java.io.IOException
- Throws:
java.io.IOException