Package org.apache.xmlbeans.impl.tool
Class SchemaResourceManager
java.lang.Object
org.apache.xmlbeans.impl.tool.SchemaImportResolver
org.apache.xmlbeans.impl.tool.BaseSchemaResourceManager
org.apache.xmlbeans.impl.tool.SchemaResourceManager
public class SchemaResourceManager extends BaseSchemaResourceManager
-
Constructor Summary
Constructors Constructor Description SchemaResourceManager(File directory)
-
Method Summary
Modifier and Type Method Description protected void
deleteFile(String filename)
Deletes a file.protected boolean
fileExists(String filename)
Returns true if the given filename exists.protected String[]
getAllXSDFilenames()
Returns a list of all the XSD filesnames in the project.protected InputStream
inputStreamForFile(String filename)
Gets the data in the given filename as an InputStream.static void
main(String[] args)
static void
printUsage()
protected void
warning(String msg)
Sends messages to System.out.protected void
writeInputStreamToFile(InputStream input, String filename)
Writes an entire file in one step.Methods inherited from class org.apache.xmlbeans.impl.tool.BaseSchemaResourceManager
getDefaultSchemaDir, getIndexFilename, init, lookupResource, process, processAll, reportActualNamespace, syncCacheWithLocalXsdFiles, writeCache
-
Constructor Details
-
Method Details
-
printUsage
public static void printUsage() -
main
- Throws:
IOException
-
warning
Sends messages to System.out.- Specified by:
warning
in classBaseSchemaResourceManager
-
fileExists
Returns true if the given filename exists. The filenames are of the form "/foo/bar/zee.xsd" and should be construed as rooted at the root of the project.- Specified by:
fileExists
in classBaseSchemaResourceManager
-
inputStreamForFile
Gets the data in the given filename as an InputStream.- Specified by:
inputStreamForFile
in classBaseSchemaResourceManager
- Throws:
IOException
-
writeInputStreamToFile
Writes an entire file in one step. An InputStream is passed and copied to the file.- Specified by:
writeInputStreamToFile
in classBaseSchemaResourceManager
- Throws:
IOException
-
deleteFile
Deletes a file. Sometimes immediately after writing a new file we notice that it's exactly the same as an existing file and we delete it. We never delete a file that was given to us by the user.- Specified by:
deleteFile
in classBaseSchemaResourceManager
-
getAllXSDFilenames
Returns a list of all the XSD filesnames in the project.- Specified by:
getAllXSDFilenames
in classBaseSchemaResourceManager
-