|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.legstar.xsd.XsdWriter
public final class XsdWriter
Writes results to the file system.
Field Summary | |
---|---|
static String |
COBOL_FILE_EXTENSION
Extension to add on generated COBOL copybooks. |
static String |
XSD_FILE_EXTENSION
Extension to add on generated XML schema file names. |
Method Summary | |
---|---|
static void |
check(File targetXsdFile,
File targetCobolFile)
Check the output files in which we are supposed to write. |
static File |
getFile(File file,
String fileName)
If the file has no extension, it is considered a folder. |
static void |
writeResults(String defaultName,
File targetXsdFile,
File targetCobolFile,
String targetCobolEncoding,
XsdToCobolStringResult results,
org.apache.commons.logging.Log log)
Write the results to file system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XSD_FILE_EXTENSION
public static final String COBOL_FILE_EXTENSION
Method Detail |
---|
public static void check(File targetXsdFile, File targetCobolFile) throws InvalidParameterException
targetXsdFile
- the output XML schema file or foldertargetCobolFile
- the output COBOL copybook file or folder
InvalidParameterException
- if the file or folders are invalidpublic static void writeResults(String defaultName, File targetXsdFile, File targetCobolFile, String targetCobolEncoding, XsdToCobolStringResult results, org.apache.commons.logging.Log log) throws IOException
defaultName
- the base name to use if output files are folderstargetXsdFile
- the XSD file or foldertargetCobolFile
- the COBOL file or foldertargetCobolEncoding
- the target COBOL file content encodingresults
- the translation resultslog
- a logger to print out the results
IOException
- if writing failspublic static File getFile(File file, String fileName) throws IOException
file
- a folder or filefileName
- a file name to use if file is a folder
IOException
- if folders cannot be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |