com.legstar.cob2xsd
Class Cob2XsdIO
java.lang.Object
com.legstar.cob2xsd.Cob2Xsd
com.legstar.cob2xsd.Cob2XsdIO
public class Cob2XsdIO
- extends Cob2Xsd
Common code for file translation (as opposed to string translation).
Methods inherited from class com.legstar.cob2xsd.Cob2Xsd |
checkCobolSourceFile, checkTarget, clean, createXmlSchema, emitModel, emitXsd, getErrorHistory, getModel, getNonUniqueCobolNames, getNonUniqueCobolNames, lex, parse, toModel, translate, xsdToString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Cob2XsdIO
public Cob2XsdIO(Cob2XsdModel model)
translate
public File translate(File cobolFile,
File target,
boolean appendBaseFileNameToNamespace)
throws RecognizerException,
XsdGenerationException
- Translates a single COBOL source file.
When requested the file base name is appended to the target namespace.
- Parameters:
cobolFile
- COBOL source filetarget
- target file or folderappendBaseFileNameToNamespace
- true to append base file name to
namespace
- Returns:
- the XML Schema
- Throws:
RecognizerException
- if parser fails
XsdGenerationException
- if COBOL model interpretation fails
getUniqueTargetNamespace
protected static String getUniqueTargetNamespace(String baseName,
String targetNamespacePrefix)
- TargetNamespace, if it is not null, is completed with the baseName.
- Parameters:
baseName
- A name, derived from the COBOL file name, that can be
used to identify generated artifactstargetNamespacePrefix
- the namespace prefix
- Returns:
- the previous value of the model targetNamespace field
Copyright © 2015 LegSem. All rights reserved.