public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
{
DataObjectUtil.initRuntime();
EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);
try
{
File inputFile = new File(xsdFileName).getAbsoluteFile();
InputStream inputStream = new FileInputStream(inputFile);
xsdHelper.define(inputStream, inputFile.toURI().toString());
if (targetDirectory == null)
{
targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
}