ResourceFactoryImpl.class);
XMLDocument doc = XMLHelper.INSTANCE.load(new FileInputStream("somefile.xml"), null, options);
Note: this option currently only works for simple schemas without substitution groups or wildcards.
-interfaceDataObject
This option is used to generate static interfaces that extend commonj.sdo.DataObject
-sparsePattern
For SDO metamodels that have classes with many properties of which only a few are typically set at
runtime, this option can be used to produce a space-optimized implementation (at the expense of speed).
-storePattern
This option can be used to generate static classes that work with a Store-based DataObject
implementation. It changes the generator pattern to generate accessors which delegate to the
reflective methods (as opposed to the other way around) and changes the DataObject base class
to org.apache.tuscany.sdo.impl.StoreDataObjectImpl. Note that this option generates classes that
require a Store implementation to be provided before they can be run.
-noGenerate
A basic implementation of this switch is in place, but is not fully implemented. An intention
behind this is to provide commentary on the artifacts that would be generated.
Method Summary |
static org.eclipse.emf.codegen.ecore.genmodel.GenPackage |
createGenPackage(org.eclipse.emf.ecore.EPackage ePackage,
String basePackage,
String prefix,
int genOptions,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
|
protected static org.eclipse.emf.codegen.ecore.genmodel.GenModel |
createGenPackages(Collection ePackages,
Hashtable packageInfoTable,
int genOptions,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
|
static org.eclipse.emf.codegen.ecore.genmodel.GenModel |
ecore2GenModel(org.eclipse.emf.ecore.EPackage ePackage,
String basePackage,
String prefix,
int genOptions)
|
static String |
extractBasePackageName(org.eclipse.emf.ecore.EPackage ePackage,
String javaPackage)
|
static void |
generateFromEPackage(org.eclipse.emf.ecore.EPackage ePackage,
String targetDirectory,
String basePackage,
String prefix,
int genOptions)
|
static void |
generateFromGenModel(org.eclipse.emf.codegen.ecore.genmodel.GenModel genModel,
String targetDirectory,
int genOptions)
|
static void |
generateFromXMLSchema(String xsdFileName,
String targetDirectory,
String javaPackage,
String prefix,
int genOptions)
Deprecated. moved to XSD2JavaGenerator |
protected static org.eclipse.emf.codegen.ecore.genmodel.GenModel |
generatePackages(Collection packageList,
String targetDirectory,
Hashtable packageInfoTable,
int genOptions,
boolean allNamespaces)
|
protected static void |
generatePackages(Collection packageList,
String packageURI,
String shortName,
String targetDirectory,
String javaPackage,
String prefix,
int genOptions)
|
static String |
getSchemaNamespace(String xsdFileName)
Deprecated. |
protected int |
handleArgument(String[] args,
int index)
|
static void |
main(String[] args)
Deprecated. replaced by XSD2JavaGenerator |
protected static void |
printDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic,
String indent)
|
protected static void |
printUsage()
|
protected void |
processArguments(String[] args)
|
protected abstract void |
run(String[] args)
|
static String |
safeQualifiedName(String qualifiedName)
|
static String |
shortName(String qualifiedName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPTION_NO_INTERFACES
public static int OPTION_NO_INTERFACES
OPTION_SPARSE_PATTERN
public static int OPTION_SPARSE_PATTERN
OPTION_STORE_PATTERN
public static int OPTION_STORE_PATTERN
OPTION_NO_CONTAINMENT
public static int OPTION_NO_CONTAINMENT
OPTION_NO_NOTIFICATION
public static int OPTION_NO_NOTIFICATION
OPTION_ARRAY_ACCESSORS
public static int OPTION_ARRAY_ACCESSORS
OPTION_GENERATE_LOADER
public static int OPTION_GENERATE_LOADER
OPTION_NO_UNSETTABLE
public static int OPTION_NO_UNSETTABLE
OPTION_GENERATE_SWITCH
public static int OPTION_GENERATE_SWITCH
OPTION_INTERFACE_DO
public static int OPTION_INTERFACE_DO
OPTION_NO_GENERATE
public static int OPTION_NO_GENERATE
targetDirectory
protected String targetDirectory
javaPackage
protected String javaPackage
prefix
protected String prefix
genOptions
protected int genOptions
xsdFileName
protected String xsdFileName
inputIndex
protected int inputIndex
JavaGenerator
public JavaGenerator()
main
public static void main(String[] args)
- Deprecated. replaced by XSD2JavaGenerator
processArguments
protected void processArguments(String[] args)
handleArgument
protected int handleArgument(String[] args,
int index)
run
protected abstract void run(String[] args)
generateFromXMLSchema
public static void generateFromXMLSchema(String xsdFileName,
String targetDirectory,
String javaPackage,
String prefix,
int genOptions)
- Deprecated. moved to XSD2JavaGenerator
generatePackages
protected static void generatePackages(Collection packageList,
String packageURI,
String shortName,
String targetDirectory,
String javaPackage,
String prefix,
int genOptions)
generatePackages
protected static org.eclipse.emf.codegen.ecore.genmodel.GenModel generatePackages(Collection packageList,
String targetDirectory,
Hashtable packageInfoTable,
int genOptions,
boolean allNamespaces)
getSchemaNamespace
public static String getSchemaNamespace(String xsdFileName)
- Deprecated.
createGenPackages
protected static org.eclipse.emf.codegen.ecore.genmodel.GenModel createGenPackages(Collection ePackages,
Hashtable packageInfoTable,
int genOptions,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
createGenPackage
public static org.eclipse.emf.codegen.ecore.genmodel.GenPackage createGenPackage(org.eclipse.emf.ecore.EPackage ePackage,
String basePackage,
String prefix,
int genOptions,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
generateFromEPackage
public static void generateFromEPackage(org.eclipse.emf.ecore.EPackage ePackage,
String targetDirectory,
String basePackage,
String prefix,
int genOptions)
generateFromGenModel
public static void generateFromGenModel(org.eclipse.emf.codegen.ecore.genmodel.GenModel genModel,
String targetDirectory,
int genOptions)
ecore2GenModel
public static org.eclipse.emf.codegen.ecore.genmodel.GenModel ecore2GenModel(org.eclipse.emf.ecore.EPackage ePackage,
String basePackage,
String prefix,
int genOptions)
extractBasePackageName
public static String extractBasePackageName(org.eclipse.emf.ecore.EPackage ePackage,
String javaPackage)
shortName
public static String shortName(String qualifiedName)
safeQualifiedName
public static String safeQualifiedName(String qualifiedName)
printDiagnostic
protected static void printDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic,
String indent)
printUsage
protected static void printUsage()
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.