public abstract class BaseSchemaResourceManager extends SchemaImportResolver
Modifier | Constructor and Description |
---|---|
protected |
BaseSchemaResourceManager() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
deleteFile(String filename)
Deletes a file.
|
protected abstract boolean |
fileExists(String filename)
Returns true if the given filename exists.
|
protected abstract String[] |
getAllXSDFilenames()
Returns a list of all the XSD filesnames in the project.
|
protected String |
getDefaultSchemaDir() |
protected String |
getIndexFilename() |
protected void |
init() |
protected abstract InputStream |
inputStreamForFile(String filename)
Gets the data in the given filename as an InputStream.
|
SchemaImportResolver.SchemaResource |
lookupResource(String nsURI,
String schemaLocation)
Called when the ImportLoader wishes to resolve the
given import.
|
void |
process(String[] uris,
String[] filenames,
boolean sync,
boolean refresh,
boolean imports) |
void |
processAll(boolean sync,
boolean refresh,
boolean imports) |
void |
reportActualNamespace(SchemaImportResolver.SchemaResource rresource,
String actualNamespace)
Updates actual namespace in the table.
|
void |
syncCacheWithLocalXsdFiles(String[] filenames,
boolean deleteOnlyMentioned)
Adds items to the cache that point to new files that aren't
described in the cache, and optionally deletes old entries.
|
protected abstract void |
warning(String msg)
Produces diagnostic messages such as "downloading X to file Y".
|
void |
writeCache() |
protected abstract void |
writeInputStreamToFile(InputStream input,
String filename)
Writes an entire file in one step.
|
resolveImports
protected final void init()
public final void writeCache() throws IOException
IOException
public final void processAll(boolean sync, boolean refresh, boolean imports)
public final void process(String[] uris, String[] filenames, boolean sync, boolean refresh, boolean imports)
public final void syncCacheWithLocalXsdFiles(String[] filenames, boolean deleteOnlyMentioned)
If an old file is gone and a new file is found with exactly the same contents, the cache entry is moved to point to the new file.
public SchemaImportResolver.SchemaResource lookupResource(String nsURI, String schemaLocation)
Returns null if the resource reference should be ignored.
lookupResource
in class SchemaImportResolver
public void reportActualNamespace(SchemaImportResolver.SchemaResource rresource, String actualNamespace)
reportActualNamespace
in class SchemaImportResolver
protected String getIndexFilename()
protected String getDefaultSchemaDir()
protected abstract void warning(String msg)
protected abstract boolean fileExists(String filename)
protected abstract InputStream inputStreamForFile(String filename) throws IOException
IOException
protected abstract void writeInputStreamToFile(InputStream input, String filename) throws IOException
IOException
protected abstract void deleteFile(String filename)
protected abstract String[] getAllXSDFilenames()