Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problems with emf ecore model
Problems with emf ecore model [message #504108] Thu, 17 December 2009 09:54
Thomas is currently offline ThomasFriend
Messages: 79
Registered: October 2009
Member
hi,

i have some problems with my ecore model.
http://img13.imageshack.us/img13/3929/ecore.jpg

I have some problems with my simple shape ecore model:

i want that every element can contain every other element
(like mindmap tutorial, with subtopic)

Element Event is just a Property Object. It is on a propertyTabpage

There are 1 ore more Color (gradientColor) to fill the shape.

Thanks
Thomas

ECORE:
<?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="model"
nsURI="http://model/1.0" nsPrefix="model">
<eClassifiers xsi:type="ecore:EClass" name="Diagram">
<eStructuralFeatures xsi:type="ecore:EReference" name="Elements" lowerBound="1"
upperBound="-1" eType="#//Element" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Element" abstract="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Element"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="y" ordered="false" unique="false"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="y"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="x" ordered="false" unique="false"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="x"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="ElementEvents" ordered="false"
unique="false" eType="#//ElementEvents" transient="true" unsettable="true"
resolveProxies="false">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="x"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="x"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="subElements" ordered="false"
unique="false" upperBound="-1" eType="#//Element" transient="true" resolveProxies="false">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="x"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="linewidth" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="linewidth"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gradientColor" transient="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="attribute"/>
<details key="name" value="gradientColor"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EEList">
<eTypeArguments/>
</eGenericType>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RectangleShape" eSuperTypes="#//Element">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="width" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" unique="false"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EllipseShape" eSuperTypes="#//Element">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="cx" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="cy" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ElementEvents">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="prop" ordered="false" unique="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
unique="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="EventId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LineShape" eSuperTypes="#//Element">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endX" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endY" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
defaultValueLiteral="0"/>
</eClassifiers>
</ecore:EPackage>

[Updated on: Thu, 17 December 2009 10:30]

Report message to a moderator

Re: Problems with emf ecore model [message #504136 is a reply to message #504108] Thu, 17 December 2009 07:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Thomas,

Comments below.

Thomas wrote:
> hi,
>
> i have some problems with my ecore model.
> http://img13.imageshack.us/i/ecore.jpg/
It's like an eye chart.
>
> I have some problems with my simple shape ecore model:
>
> i want that every element can contain every other element
> (like mindmap tutorial, with subtopic)
So you want to make subElements have containment=true I guess...
>
> Element Event is just a Property Object. It is on a propertyTabpage
>
> There are 1 ore more Color (gradientColor) to fill the shape.
>
> Thanks
> Thomas
>
> ECORE:
> <?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="model"
> nsURI="http://model/1.0" nsPrefix="model">
> <eClassifiers xsi:type="ecore:EClass" name="Diagram">
> <eStructuralFeatures xsi:type="ecore:EReference" name="Elements"
> lowerBound="1"
> upperBound="-1" eType="#//Element" containment="true"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="Element" abstract="true">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="y"
> ordered="false" unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="x"
> ordered="false" unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="ElementEvents" ordered="false"
> unique="false" eType="#//ElementEvents" transient="true"
> unsettable="true"
> resolveProxies="false"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="ID"
> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="subElements"
> ordered="false"
> unique="false" upperBound="-1" eType="#//Element"
> transient="true" resolveProxies="false"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Linewidth"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="gradient"
> lowerBound="1"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="RectangleShape"
> eSuperTypes="#//Element">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="width"
> unique="false" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="height"
> unique="false"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="EllipseShape"
> eSuperTypes="#//Element">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="cx"
> unique="false" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="cy"
> unique="false" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ElementEvents">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="prop"
> ordered="false" unique="false"
> upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"
> changeable="false"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
> ordered="false"
> unique="false" upperBound="-1" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EString"
> changeable="false"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="EventId"
> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="LineShape"
> eSuperTypes="#//Element">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="endX"
> unique="false" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="endY"
> unique="false" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
> defaultValueLiteral="0"/>
> </eClassifiers>
> </ecore:EPackage>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Does the Gastro sample work with current 3.0?
Next Topic:OCL to generate EMF behaviour
Goto Forum:
  


Current Time: Fri Apr 26 05:32:22 GMT 2024

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

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

Back to the top