* @deprecated moved to XSD2JavaGenerator
*/
public static void generateFromXMLSchema(String xsdFileName, 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 HelperContextImpl(extendedMetaData, false)).getXSDHelper();
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();
}
else
{
targetDirectory = new File(targetDirectory).getCanonicalPath();
}
if (!packageRegistry.values().isEmpty())
{
String packageURI = getSchemaNamespace(xsdFileName);
generatePackages(packageRegistry.values(), packageURI, null, targetDirectory, javaPackage, prefix, genOptions);
}
/*
for (Iterator iter = packageRegistry.values().iterator(); iter.hasNext();)
{