Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] *.xmi or *.ecore as an output
[Xcore] *.xmi or *.ecore as an output [message #1724300] Mon, 22 February 2016 22:28 Go to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Hello to every boby,

First of all I should have say that I'm new in these tools ( Grammatik, Dsl, Modell and ...). I have used Xcore and developed the following skript

@Ecore(nsURI="http://www.eclipse.org/emf/2002/EcoreI")
package ecoreI

class PhoneBook{
	 contains Person[] AllPersons
	 
}
class Person{
	String Surname
	String Forename
	String MobileNumber
	String OfficeNumber
	contains Address[] address
	

}
class Address{
	String City
	String Street
	String ZIP
	String Number
}



now I need an output from this skript as following

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoreI" nsURI="http://www.eclipse.org/emf/2002/EcoreI" nsPrefix="ecoreI">
  <eClassifiers xsi:type="ecore:EClass" name="PhoneBook">
    <eStructuralFeatures xsi:type="ecore:EReference" name="AllPersons" upperBound="-1" eType="//Person" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Address">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="City">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="ZIP">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Street">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Number">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Person">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Forename">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="MobileNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="OfficeNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="//Address" containment="true"/>
  </eClassifiers>
</ecore:EPackage>




I should have create this output programmatically. How can I implement it?

Re: [Xcore] *.xmi or *.ecore as an output [message #1724430 is a reply to message #1724300] Tue, 23 February 2016 22:00 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Hi,

I have tried to generate XSD through Xcore and then generate ecore from xsd but the output file is not what I wanted.
	public static void XSD2Ecore(String sourcename, String targetname) {

		try {
			XSDEcoreBuilder xsdEcoreBuilder = new XSDEcoreBuilder();
			ResourceSet resourceSet = new ResourceSetImpl();
			

			Collection eCorePackages = xsdEcoreBuilder.generate(URI
					.createURI(sourcename));

			resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
					.put("xmi", new XMIResourceFactoryImpl());
			Resource resource = resourceSet.createResource(URI
					.createURI(targetname));

			for (Iterator iter = eCorePackages.iterator(); iter.hasNext();) {
				EPackage element = (EPackage) iter.next();
				resource.getContents().add(element);
			}

			resource.save(null);
			System.out.println(":) Xmi file created for ecore.");
		} catch (IOException e) {
			System.out.println(":( Error during creating Xmi for ecore.");
			System.out.println(e.getMessage());
			e.printStackTrace();
		}
	}


The output looks like following
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
  <ecore:EPackage name="org.omg.xmi" nsURI="http://www.omg.org/XMI" nsPrefix="xmi">
    <eClassifiers xsi:type="ecore:EClass" name="Add" eSuperTypes="#/0/Difference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Add"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="addition" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="addition"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="position" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="position"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Any">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Any"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="any" unique="false" upperBound="-1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="elementWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":1"/>
          <details key="processing" value="skip"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="anyAttribute" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attributeWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":2"/>
          <details key="processing" value="skip"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Delete" eSuperTypes="#/0/Difference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Delete"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Difference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Difference"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="target" upperBound="-1"
          eType="#/0/TargetType" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="target"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="difference" upperBound="-1"
          eType="#/0/Difference" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="difference"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="container" upperBound="-1"
          eType="#/0/Difference" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="container"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="container1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="container"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="label"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="target1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="target"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="type"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="uuid"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          defaultValueLiteral="2.0" unsettable="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="version"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Documentation">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Documentation"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="contact" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="contact"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporter" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="exporter"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporterVersion" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="exporterVersion"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="longDescription" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="longDescription"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortDescription" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="shortDescription"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="notice" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="notice"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="owner" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="owner"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="contact1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="contact"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporter1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="exporter"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporterVersion1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="exporterVersion"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="label"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="longDescription1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="longDescription"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="notice1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="notice"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="owner1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="owner"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortDescription1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="shortDescription"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="type"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="uuid"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          defaultValueLiteral="2.0" unsettable="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="version"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value=""/>
        <details key="kind" value="mixed"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="elementWildcard"/>
          <details key="name" value=":mixed"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1"
          eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
          transient="true" containment="true" resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="xmlns:prefix"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1"
          eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
          transient="true" containment="true" resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="xsi:schemaLocation"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="add" upperBound="-2"
          eType="#/0/Add" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Add"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="delete" upperBound="-2"
          eType="#/0/Delete" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Delete"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="difference" upperBound="-2"
          eType="#/0/Difference" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Difference"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="documentation" upperBound="-2"
          eType="#/0/Documentation" volatile="true" transient="true" derived="true"
          containment="true" resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Documentation"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="extension" upperBound="-2"
          eType="#/0/Extension" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Extension"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="import" upperBound="-2"
          eType="#/0/Import" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Import"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="metaModel" upperBound="-2"
          eType="#/0/MetaModel" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="MetaModel"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="model" upperBound="-2"
          eType="#/0/Model" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Model"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="packageReference" upperBound="-2"
          eType="#/0/PackageReference" volatile="true" transient="true" derived="true"
          containment="true" resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="PackageReference"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="replace" upperBound="-2"
          eType="#/0/Replace" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Replace"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="xMI" upperBound="-2"
          eType="#/0/XMI" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="XMI"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//ID"
          iD="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="id"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Extension">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Extension"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="any" unique="false" upperBound="-1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="elementWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":1"/>
          <details key="processing" value="lax"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="extender" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="extender"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="extenderID" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="extenderID"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="label"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="type"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="uuid"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          defaultValueLiteral="2.0" unsettable="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="version"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Import" eSuperTypes="#/0/PackageReference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Import"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="MetaModel" eSuperTypes="#/0/PackageReference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="MetaModel"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Model" eSuperTypes="#/0/PackageReference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Model"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="PackageReference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="PackageReference"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="name"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="version"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="label"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="name1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="name"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="type"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="uuid"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          defaultValueLiteral="2.0" unsettable="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="version"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Replace" eSuperTypes="#/0/Difference">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Replace"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="position" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="position"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="replacement" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="replacement"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="TargetType">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="target_._type"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="any" unique="false" upperBound="-1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="elementWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":1"/>
          <details key="processing" value="skip"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="anyAttribute" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attributeWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":2"/>
          <details key="processing" value="skip"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="XMI">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="XMI"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="any" unique="false" upperBound="-1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
          volatile="true" transient="true" derived="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="elementWildcard"/>
          <details key="wildcards" value="##any"/>
          <details key="name" value=":1"/>
          <details key="processing" value="strict"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="label"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="type"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="uuid"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" lowerBound="1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
          defaultValueLiteral="2.0" unsettable="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="version"/>
          <details key="namespace" value="##targetNamespace"/>
        </eAnnotations>
      </eStructuralFeatures>
    </eClassifiers>
  </ecore:EPackage>
  <ecore:EPackage name="org.eclipse.emf._2002.ecore.i" nsURI="http://www.eclipse.org/emf/2002/EcoreI"
      nsPrefix="i">
    <eClassifiers xsi:type="ecore:EClass" name="Address">
      <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
        <details key="name" value="Address"/>
        <details key="kind" value="elementOnly"/>
      </eAnnotations>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false"
          upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="group"/>
          <details key="name" value="group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EReference" name="extension" upperBound="-1"
          eType="#/0/Extension" volatile="true" transient="true" derived="true" containment="true"
          resolveProxies="false">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="element"/>
          <details key="name" value="Extension"/>
          <details key="namespace" value="http://www.omg.org/XMI"/>
          <details key="group" value="#group:0"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="city" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="City"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="href" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="href"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//ID"
          iD="true">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="id"/>
          <details key="namespace" value="http://www.omg.org/XMI"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
        <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
          <details key="kind" value="attribute"/>
          <details key="name" value="idref"/>
          <details key="namespace" value="http://www.omg.org/XMI"/>
        </eAnnotations>
      </eStructuralFeatures>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
        <eAnno



Re: [Xcore] *.xmi or *.ecore as an output [message #1724514 is a reply to message #1724430] Wed, 24 February 2016 09:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
It's completely unclear to me what you're trying to accomplish.

On 23.02.2016 23:00, Parisa Moosavi wrote:
> Hi,
>
> I have tried to generate XSD through Xcore and then generate ecore
> from xsd but the output file is not what I wanted.
>
> public static void XSD2Ecore(String sourcename, String targetname) {
>
> try {
> XSDEcoreBuilder xsdEcoreBuilder = new XSDEcoreBuilder();
> ResourceSet resourceSet = new ResourceSetImpl();
>
>
> Collection eCorePackages = xsdEcoreBuilder.generate(URI
> .createURI(sourcename));
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
> .put("xmi", new XMIResourceFactoryImpl());
> Resource resource = resourceSet.createResource(URI
> .createURI(targetname));
>
> for (Iterator iter = eCorePackages.iterator();
> iter.hasNext();) {
> EPackage element = (EPackage) iter.next();
> resource.getContents().add(element);
> }
>
> resource.save(null);
> System.out.println(":) Xmi file created for ecore.");
> } catch (IOException e) {
> System.out.println(":( Error during creating Xmi for
> ecore.");
> System.out.println(e.getMessage());
> e.printStackTrace();
> }
> }
>
>
> The output looks like following
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
> <ecore:EPackage name="org.omg.xmi" nsURI="http://www.omg.org/XMI"
> nsPrefix="xmi">
> <eClassifiers xsi:type="ecore:EClass" name="Add"
> eSuperTypes="#/0/Difference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Add"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="addition"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="addition"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="position"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="position"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Any">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Any"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="group"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="any"
> unique="false" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="elementWildcard"/>
> <details key="wildcards" value="##any"/>
> <details key="name" value=":1"/>
> <details key="processing" value="skip"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="anyAttribute" unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attributeWildcard"/>
> <details key="wildcards" value="##any"/>
> <details key="name" value=":2"/>
> <details key="processing" value="skip"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Delete"
> eSuperTypes="#/0/Difference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Delete"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Difference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Difference"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="group"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="target"
> upperBound="-1"
> eType="#/0/TargetType" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="target"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="difference" upperBound="-1"
> eType="#/0/Difference" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="difference"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="container"
> upperBound="-1"
> eType="#/0/Difference" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="container"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="container1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="container"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="href"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="href"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="idref"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="label"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="label"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="target1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREFS">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="target"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="type"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="type"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uuid"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="version"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
> defaultValueLiteral="2.0" unsettable="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="version"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Documentation">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Documentation"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="group"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="contact"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="contact"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporter"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="exporter"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="exporterVersion" unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="exporterVersion"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="longDescription" unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="longDescription"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="shortDescription" unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="shortDescription"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="notice"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="notice"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="owner"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="owner"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="contact1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="contact"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="exporter1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="exporter"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="exporterVersion1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="exporterVersion"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="href"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="href"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="idref"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="label"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="label"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="longDescription1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="longDescription"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="notice1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="notice"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="owner1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="owner"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="shortDescription1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="shortDescription"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="type"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="type"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uuid"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="version"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
> defaultValueLiteral="2.0" unsettable="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="version"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value=""/>
> <details key="kind" value="mixed"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="elementWildcard"/>
> <details key="name" value=":mixed"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xMLNSPrefixMap" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xmlns:prefix"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="xSISchemaLocation" upperBound="-1"
> eType="ecore:EClass
> http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
> transient="true" containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="xsi:schemaLocation"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="add"
> upperBound="-2"
> eType="#/0/Add" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Add"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="delete"
> upperBound="-2"
> eType="#/0/Delete" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Delete"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="difference" upperBound="-2"
> eType="#/0/Difference" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Difference"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="documentation" upperBound="-2"
> eType="#/0/Documentation" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Documentation"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="extension"
> upperBound="-2"
> eType="#/0/Extension" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Extension"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="import"
> upperBound="-2"
> eType="#/0/Import" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Import"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="metaModel"
> upperBound="-2"
> eType="#/0/MetaModel" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="MetaModel"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="model"
> upperBound="-2"
> eType="#/0/Model" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Model"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="packageReference" upperBound="-2"
> eType="#/0/PackageReference" volatile="true" transient="true"
> derived="true"
> containment="true" resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="PackageReference"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="replace"
> upperBound="-2"
> eType="#/0/Replace" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="Replace"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="xMI"
> upperBound="-2"
> eType="#/0/XMI" volatile="true" transient="true"
> derived="true" containment="true"
> resolveProxies="false">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="XMI"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="id"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//ID"
> iD="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="id"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Extension">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Extension"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="group"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="any"
> unique="false" upperBound="-1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="elementWildcard"/>
> <details key="wildcards" value="##any"/>
> <details key="name" value=":1"/>
> <details key="processing" value="lax"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="extender"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="extender"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute"
> name="extenderID" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="extenderID"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="href"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="href"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="idref"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="idref"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="label"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="label"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="type"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//QName">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="type"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="uuid"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="version"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"
> defaultValueLiteral="2.0" unsettable="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="attribute"/>
> <details key="name" value="version"/>
> <details key="namespace" value="##targetNamespace"/>
> </eAnnotations>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Import"
> eSuperTypes="#/0/PackageReference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Import"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="MetaModel"
> eSuperTypes="#/0/PackageReference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="MetaModel"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Model"
> eSuperTypes="#/0/PackageReference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="Model"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="PackageReference">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="name" value="PackageReference"/>
> <details key="kind" value="elementOnly"/>
> </eAnnotations>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="group"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="group"/>
> <details key="name" value="group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="name"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="version"
> unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String"
> volatile="true" transient="true" derived="true">
> <eAnnotations
> source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
> <details key="kind" value="element"/>
> <details key="name" value="version"/>
> <details key="group" value="#group:0"/>
> </eAnnotations>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="href"
> eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String

Re: [Xcore] *.xmi or *.ecore as an output [message #1724586 is a reply to message #1724514] Wed, 24 February 2016 19:41 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
I need such an output from xcore
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoreI" nsURI="http://www.eclipse.org/emf/2002/EcoreI" nsPrefix="ecoreI">
  <eClassifiers xsi:type="ecore:EClass" name="PhoneBook">
    <eStructuralFeatures xsi:type="ecore:EReference" name="AllPersons" upperBound="-1" eType="//Person" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Address">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="City">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="ZIP">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Street">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Number">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Person">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Forename">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="MobileNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="OfficeNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="//Address" containment="true"/>
  </eClassifiers>
</ecore:EPackage>
Re: [Xcore] *.xmi or *.ecore as an output [message #1724588 is a reply to message #1724514] Wed, 24 February 2016 19:44 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
I only need such an output from what develope in xcore file
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoreI" nsURI="http://www.eclipse.org/emf/2002/EcoreI" nsPrefix="ecoreI">
  <eClassifiers xsi:type="ecore:EClass" name="PhoneBook">
    <eStructuralFeatures xsi:type="ecore:EReference" name="AllPersons" upperBound="-1" eType="//Person" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Address">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="City">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="ZIP">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Street">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Number">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Person">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Forename">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="MobileNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="OfficeNumber">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="address" eType="//Address" containment="true"/>
  </eClassifiers>
</ecore:EPackage>
Re: [Xcore] *.xmi or *.ecore as an output [message #1724590 is a reply to message #1724588] Wed, 24 February 2016 20:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
It's just not clear to me what you want. You say you want a certain
output, and then show the output. Okay, so there you go, you have what
you want. But clearly there's more to the story. What might it be. Is
there some input that should product that output? Try to keep in mind
that a "?" is a key part of your post. What exactly is the question?
Note that if you have a *.xcore resource open, in the Xcore editor menu,
you can export this to Ecore. Perhaps that's what you want? It's just
not clear what you want, especially given you show exactly what you want
so you clearly laready have what you want...


On 24.02.2016 20:44, Parisa Moosavi wrote:
> I only need such an output from what develope in xcore file
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecoreI"
> nsURI="http://www.eclipse.org/emf/2002/EcoreI" nsPrefix="ecoreI">
> <eClassifiers xsi:type="ecore:EClass" name="PhoneBook">
> <eStructuralFeatures xsi:type="ecore:EReference" name="AllPersons"
> upperBound="-1" eType="//Person" containment="true"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Address">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="City">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="ZIP">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Street">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Number">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Person">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Forename">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="MobileNumber">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="OfficeNumber">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
> <eStructuralFeatures xsi:type="ecore:EReference" name="address"
> eType="//Address" containment="true"/>
> </eClassifiers>
> </ecore:EPackage>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1724629 is a reply to message #1724590] Wed, 24 February 2016 22:33 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Smile
I have a Xcore file. I need the Ecore of this file. But I want to generate it via a methode call.
How could I do it?

"I have the output or better to say I have what I need to generate, because there is a project which have been developed with EMF and Ecore Models and I should have developed the same project with Xtext and Xcore and this output is the common point for these two projects. Both I them should have the same output and it should be generated automatically (for example when I save xcore file). "

[Updated on: Wed, 24 February 2016 22:47]

Report message to a moderator

Re: [Xcore] *.xmi or *.ecore as an output [message #1724640 is a reply to message #1724629] Thu, 25 February 2016 07:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
If you have a *.xcore resource loaded, you can have a look at the
Resource.contents and you'll notice it contains an EPackage. You can
EcoreUtil.copy this to a *.ecore resource and save it.


On 24.02.2016 23:33, Parisa Moosavi wrote:
> :)
> I have a Xcore file. I need the Ecore of this file. But I want to
> generate it via a methode call.
> How can I do it?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1724798 is a reply to message #1724640] Fri, 26 February 2016 07:12 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
I have tried to write the code but I couldn't.
You know, because the *.xcore file is open in Editor, certainly exist ecore model of xcore file in Memory. I wanted to Access it and then save it. Is it possible?
Re: [Xcore] *.xmi or *.ecore as an output [message #1724799 is a reply to message #1724798] Fri, 26 February 2016 07:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Parisa,

What have you tried? For example, have you looked at the editor's code
to see how it loads the *.xcore resource?


On 26.02.2016 08:12, Parisa Moosavi wrote:
> I have tried to write the code but I couldn't.
> You know, because the *.xcore file is open in Editor, certainly exist
> ecore model of xcore file in Memory. I wanted to Access it and then
> save it. Is it possible?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1724968 is a reply to message #1724799] Sun, 28 February 2016 08:51 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
In previous days I have tried to find the editor's code that you have mentioned but I only found this one.
https://github.com/merks/Xcore/blob/master/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/ConvertToEcoreActionDelegate.java

I have tried to change and use it but I coudln't.
Re: [Xcore] *.xmi or *.ecore as an output [message #1724971 is a reply to message #1724968] Sun, 28 February 2016 09:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
The code is here:

http://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/

It might be easiest if you import the project into your workspace via
File -> Import... -> Plug-in development -> Plug-ins and fragments. Be
sure to choose Projects with source folders.

Keep in mind that while I'll answer your questions, I won't actually do
your work for you.

On 28.02.2016 09:51, Parisa Moosavi wrote:
> In previous days I have tried to find the editor's code that you have
> mentioned but I only found this one.
> https://github.com/merks/Xcore/blob/master/org.eclipse.emf.ecore.xcore.ui/src/org/eclipse/emf/ecore/xcore/ui/ConvertToEcoreActionDelegate.java
>
>
> I have tried to change and use it but I coudln't.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1725665 is a reply to message #1724971] Sun, 06 March 2016 09:15 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Hello,

A question!
When we right click a *.xcore file and generate a genmodel file from it, a *.ecore file is generated. Where can I find the code of GenModel creation?
Re: [Xcore] *.xmi or *.ecore as an output [message #1725806 is a reply to message #1725665] Mon, 07 March 2016 18:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
In general the plug-in spy is very useful. Shift-Alt-F1 shows stuff
about how the current view and selection are implemented. Shift-Alt-F2
(menu spy) lets you find would who/what is contributed to the menu.
From these things, you can track down the implementations of what you
are seeing.

On 06.03.2016 10:15, Parisa Moosavi wrote:
> Hello,
>
> A question!
> When we right click a *.xcore file and generate a genmodel file from
> it, a *.ecore file is generated. Where can I find the code of GenModel
> creation?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1730553 is a reply to message #1725806] Tue, 26 April 2016 15:59 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Ed,

As I explained before I wanted to generate a *.ecore file from *.xcore file because I have another DSLs which need ecore file is generated from this xcore file. Therefore I have developed a multi editor to control the save and generate ecore file programmatically. This my editor. Now I want to write an operation in xcore with following body. Is it possible?

index.php/fa/25768/0/


class Person{
	unique String Surname
	unique String Forename
	unique String MobileNumber
	unique String OfficeNumber
	resolving contains Address[0..1] address
	op void callMobileNumber(){
		//"String uri = &quot;tel:&quot; + this.getMobileNumber();&#xD;&#xA;
		var uri = 'tel:' + 'this.getMobileNumber();'
		
		//android.content.Intent intent = new    &#xD;&#xA;
		//android.content.Intent(android.content.Intent.ACTION_CALL);
		//&#xD;&#xA;intent.setData(android.net.Uri.parse(uri));
		//&#xD;&#xA;intent.addFlags(android.content.Intent.&#xD;&#xA;
		//FLAG_ACTIVITY_NEW_TASK);
		//&#xD;&#xA;context.startActivity(intent);"
	}
	
}



thanks

[Updated on: Tue, 26 April 2016 16:01]

Report message to a moderator

Re: [Xcore] *.xmi or *.ecore as an output [message #1730615 is a reply to message #1730553] Wed, 27 April 2016 07:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Parisa,

I don't see a body. In any case, have a look at
org.eclipse.emf.ecore.xcore.importer.XcoreImporter.doComputeEPackages(Monitor),
particularly at the line:

xcoreGenerator.generateBodyAnnotations(xPackage);


On 26.04.2016 17:59, Parisa Moosavi wrote:
> Ed,
>
> As I explained before I wanted to generate a *.ecore file from *.xcore file because I have another DSLs which need ecore file is generated from this xcore file. Therefore I have developed a multi editor to control the save and generate ecore file programmatically. This my editor. Now I want to write an operation in xcore with following body. Is it possible?
>
>
>
> thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1730704 is a reply to message #1730615] Wed, 27 April 2016 18:33 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Ed,

I will test the methode which you have mentioned. I want to write the following body with xbase is it possible?

class Person{
	unique String Surname
	unique String Forename
	unique String MobileNumber
	unique String OfficeNumber
	resolving contains Address[0..1] address
	op void callMobileNumber() {
		//"String uri = 'tel:' + this.getMobileNumber();
		//android.content.Intent intent = new android.content.Intent(android.content.Intent.ACTION_CALL);
		//intent.setData(android.net.Uri.parse(uri));
		//intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
		//context.startActivity(intent);"
	}
}
Re: [Xcore] *.xmi or *.ecore as an output [message #1730730 is a reply to message #1730704] Thu, 28 April 2016 06:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Parisa,

Just try it. Be sure to read
https://www.eclipse.org/Xtext/documentation/305_xbase.html#xbase-language-ref-introduction

On 27.04.2016 20:33, Parisa Moosavi wrote:
> Ed,
>
> I will test the methode which you have mentioned. I want to write the
> following body with xbase is it possible?
>
>
> class Person{
> unique String Surname
> unique String Forename
> unique String MobileNumber
> unique String OfficeNumber
> resolving contains Address[0..1] address
> op void callMobileNumber() {
> //"String uri = 'tel:' + this.getMobileNumber();
> //android.content.Intent intent = new
> android.content.Intent(android.content.Intent.ACTION_CALL);
> //intent.setData(android.net.Uri.parse(uri));
> //intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
> //context.startActivity(intent);"
> }
> }
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] *.xmi or *.ecore as an output [message #1731582 is a reply to message #1730730] Sat, 07 May 2016 07:09 Go to previous messageGo to next message
Parisa Moosavi is currently offline Parisa MoosaviFriend
Messages: 81
Registered: June 2015
Member
Hi,

I have such a xcore file:
@Ecore(nsURI="http://www.eclipse.org/emf/2002/EcoreI")
package ecoreI


import android.content.Intent
import android.content.Context

type Intent wraps Intent
type Context wraps Context

class PhoneBook{
	resolving contains Person[0..*] AllPersons
}

class Person{
	unique String Surname
	unique String Forename
	unique String MobileNumber
	unique String OfficeNumber
	resolving contains Address[0..1] address
	
	unique Intent intent
	unique Context context
	
	op void callMobileNumber() {
		var uri = 'tel:' + this.getMobileNumber();
		intent = new android.content.Intent(android.content.Intent.ACTION_CALL);
		intent.setData(android.net.Uri.parse(uri));
		intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
		context.startActivity(intent);
	}
}

class Address{
	unique String City
	unique String ZIP
	unique String Street
	unique String Number
}




after generating ecore file from this xcore file I see such a conversion
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
      <eType xsi:type="ecore:EDataType" href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
    </eStructuralFeatures>


but what I expected is :
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
      <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eStructuralFeatures>



which parameter should be set in xcore file to have a href like href="http://www.eclipse.org/emf/2002/Ecore#//EString"?

Thanks
Re: [Xcore] *.xmi or *.ecore as an output [message #1731583 is a reply to message #1731582] Sat, 07 May 2016 07:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Parisa,

Both are correct and both should work fine. One refers to the static
generated EcorePackage.eINSTANCE while the other refers to the
development time instance loaded from the Ecore plugin in your target
platform. Xcore will always use the latter.


On 07.05.2016 09:09, Parisa Moosavi wrote:
> Hi,
>
> I have such a xcore file:
>
> @Ecore(nsURI="http://www.eclipse.org/emf/2002/EcoreI")
> package ecoreI
>
>
> import android.content.Intent
> import android.content.Context
>
> type Intent wraps Intent
> type Context wraps Context
>
> class PhoneBook{
> resolving contains Person[0..*] AllPersons
> }
>
> class Person{
> unique String Surname
> unique String Forename
> unique String MobileNumber
> unique String OfficeNumber
> resolving contains Address[0..1] address
>
> unique Intent intent
> unique Context context
>
> op void callMobileNumber() {
> var uri = 'tel:' + this.getMobileNumber();
> intent = new
> android.content.Intent(android.content.Intent.ACTION_CALL);
> intent.setData(android.net.Uri.parse(uri));
> intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
> context.startActivity(intent);
> }
> }
>
> class Address{
> unique String City
> unique String ZIP
> unique String Street
> unique String Number
> }
>
>
>
>
> after generating ecore file from this xcore file I see such a conversion
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
> <eType xsi:type="ecore:EDataType"
> href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
> </eStructuralFeatures>
>
>
> but what I expected is :
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
>
>
>
> which parameter should be set in xcore file to have a href like
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"?
>
> Thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Find all references in ecore model
Next Topic:How to build EMF project with Maven
Goto Forum:
  


Current Time: Thu Mar 28 22:59:29 GMT 2024

Powered by FUDForum. Page generated in 0.05097 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top