public class Cob2XsdIO extends Cob2Xsd
| Constructor and Description |
|---|
Cob2XsdIO(Cob2XsdConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCobolSourceFile(File cobolSourceFile)
make sure the COBOL file is valid.
|
protected void |
checkTarget(File target)
make sure the target, folder or file, is valid.
|
protected String |
getUniqueTargetNamespace(String targetNamespacePrefix,
String baseName)
TargetNamespace, if it is not null, is completed with the baseName.
|
File |
translate(File cobolFile,
String cobolFileEncoding,
File target,
String targetNamespacePrefix,
String xsltFileName)
Translates a single COBOL source file.
|
clean, createXmlSchema, emitModel, emitXsd, getConfig, getErrorHistory, getNonUniqueCobolNames, getNonUniqueCobolNames, lex, parse, toModel, translate, xsdToStringpublic Cob2XsdIO(Cob2XsdConfig config)
public File translate(File cobolFile, String cobolFileEncoding, File target, String targetNamespacePrefix, String xsltFileName) throws RecognizerException, XsdGenerationException
When requested the file base name is appended to the target namespace.
cobolFile - COBOL source filecobolFileEncoding - COBOL source file encoding (null to use platform
default)target - target file or foldertargetNamespacePrefix - used as a prefix prepended to the cobol file
base name to form a unique target namespace for the generated
XML schemaxsltFileName - an optional xslt to apply on the XML SchemaRecognizerException - if parser failsXsdGenerationException - if COBOL model interpretation failsprotected void checkCobolSourceFile(File cobolSourceFile) throws IOException
cobolSourceFile - the COBOL source fileIOException - if file cannot be locatedprotected void checkTarget(File target) throws IOException
target - the target folder or fileIOException - if file cannot be locatedprotected String getUniqueTargetNamespace(String targetNamespacePrefix, String baseName) throws IOException
targetNamespacePrefix - the target namespace prefixbaseName - A name, derived from the COBOL file name, that can be
used to identify generated artifactsIOException - if unable to create a namespaceCopyright © 2021 LegSem. All rights reserved.