|
EMF EAttribute not persisting -
09-15-2008, 12:59 AM
I have an ecore whose structure is given below:
Class A contains Class B
Class B contains Class C/Class D
Class D is a subclass of Class C.
The Ecore is:
<?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="model" nsURI="http:///com/gm/tools/frames/stsmodel.ecore"
nsPrefix="com.gm.tools.frames.model">
<eClassifiers xsi:type="ecore:EClass" name="A">
<eStructuralFeatures xsi:type="ecore:EReference" name="requirementPages" upperBound="-1"
eType="#/0/RequirementTab" containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="B">
<eStructuralFeatures xsi:type="ecore:EReference" name="clauses" upperBound="-1"
eType="#/0/Template" containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="C">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="templateId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="templateLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="Clause"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="selected" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="indexPosition" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="D" eSuperTypes="#/0/Template">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="CLAUSE_TYPE" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" defaultValueLiteral="ImportESC" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="file" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"
defaultValueLiteral="" derived="true"/>
</eClassifiers>
</ecore:EPackage>
<ecore:EPackage name="DefaultName8882100"/>
</xmi:XMI>
My model has an instance of Class B containing references of Type Class C whose instances are of Class D.
Problem statement:
When i try to persist this model, the EAttributes of Class D are not getting persisted whereas the EAttributes of its super class D do get persisted.
Would appreciate any clues / solutions.
Thanks.
|