Package org.eclipse.emf.ecore.util

Examples of org.eclipse.emf.ecore.util.BasicExtendedMetaData


    copy = new JexXmlResource(original.getURI().trimFileExtension().appendFileExtension(extension));
    copy.getContents().addAll(EcoreUtil.copyAll(original.getContents()));
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResources().add(copy);
    // set up extension
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(resourceSet.getPackageRegistry());
    resourceSet.getLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
    Map extensions = copy.getEObjectToExtensionMap();
    // create extension attribute meta object
    EStructuralFeature originalAttributeFeature = extendedMetaData.demandFeature(null, "original", false);
    // create extension attribute
    AnyType originalAttribute = XMLTypeFactory.eINSTANCE.createAnyType();
    // set extension attribute value
    originalAttribute.eSet(originalAttributeFeature, original.getURI().toString());
    // add attribute to root object
View Full Code Here


   */
  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();
View Full Code Here

  protected void run(String args[])
  {
    String xsdFileName = args[inputIndex];
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    String packageURI = getSchemaNamespace(xsdFileName);
    Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
    generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
  }
View Full Code Here

  }

  public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
  {
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    String packageURI = getSchemaNamespace(xsdFileName);
    Hashtable packageInfoTable = createPackageInfoTable(packageURI, namespace, javaPackage, prefix, null );
    generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, null, false );
  }
View Full Code Here

  {
    try
    {
      processArguments(args);
      EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
      ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
      String xsdFileName = args[inputIndex];
      String packageURI = getSchemaNamespace(xsdFileName);
      Hashtable packageInfoTable = createPackageInfoTable(packageURI, schemaNamespace, javaPackage, prefix, namespaceInfo );
      GenModel genModel = generateFromXMLSchema(xsdFileName, packageRegistry, extendedMetaData, targetDirectory, packageInfoTable, genOptions, generateBuiltIn, allNamespaces);
      generatedPackages = new GeneratedPackages(genModel,extendedMetaData);
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.util.BasicExtendedMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.