Skip to main content



      Home
Home » Modeling » EMF » ecore.ecore
ecore.ecore [message #419060] Fri, 09 May 2008 13:33 Go to next message
Eclipse UserFriend
Hi

This question may be silly, but since my XMl-knowledge seems to be very
limited, I need to pose it here. In the ecore.ecore file I find that all
the elements start with <eClassifiers ...> Even the class EClassifier
itself. Also, I see <eAnnotations ...> <eStructuralFeatures ...> etc.
My question is where do these tags from from?

I have looked at XMLNamespace.ecore file also, it has the same kind of tags.

-aru
Re: ecore.ecore [message #419062 is a reply to message #419060] Fri, 09 May 2008 15:38 Go to previous messageGo to next message
Eclipse UserFriend
Adrian,

When an instance of some type (EClass) is serialized, the element and
attribute names that are used correspond to the feature names, just as a
serialized instance of a complex type uses the element and attribute
names within the complex type. Generally you should expect type names
to appear only on xsi:type references, and for XMI serializations, as
the name of root element.


Adrian Rutle wrote:
> Hi
>
> This question may be silly, but since my XMl-knowledge seems to be
> very limited, I need to pose it here. In the ecore.ecore file I find
> that all the elements start with <eClassifiers ...> Even the class
> EClassifier itself. Also, I see <eAnnotations ...>
> <eStructuralFeatures ...> etc. My question is where do these tags from
> from?
>
> I have looked at XMLNamespace.ecore file also, it has the same kind of
> tags.
>
> -aru
Re: ecore.ecore [message #419145 is a reply to message #419062] Fri, 09 May 2008 16:21 Go to previous messageGo to next message
Eclipse UserFriend
Ed Merks skrev:
> Adrian,
>
> When an instance of some type (EClass) is serialized, the element and
> attribute names that are used correspond to the feature names, just as a
> serialized instance of a complex type uses the element and attribute
> names within the complex type. Generally you should expect type names
> to appear only on xsi:type references, and for XMI serializations, as
> the name of root element.


Aha, thank you Ed,
I think know I understand...

<eClassifiers xsi:type="ecore:EClass" name="EPackage"
eSuperTypes="#//ENamedElement">
....
<eStructuralFeatures xsi:type="ecore:EReference"
name="eClassifiers" upperBound="-1"
eType="#//EClassifier" containment="true"
eOpposite="#//EClassifier/ePackage"/>
....
</eClassifiers>

One more question; inside the <eClassifiers xsi:type="ecore:EClass"
name="EClass" eSuperTypes="#//EClassifier"> element we have both

<eOperations name="isSuperTypeOf" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eParameters name="someClass" eType="#//EClass"/>
</eOperations>

and

<eStructuralFeatures xsi:type="ecore:EReference" name="eOperations"
upperBound="-1"
eType="#//EOperation" containment="true" resolveProxies="false"
eOpposite="#//EOperation/eContainingClass"/>


, the first one is used in the same way as the <eClassifiers ...> tag
is used in EPackage, am I right? Thus there is not difference betwenn
the operation isSuperTypeOf(someClass : EClass) boolean and the
operations that will be returned by eOperations. And this would be the
case for eAttributes also; there is no difference between the attributes
interface and abstract on one side and the attributes that will be
returned by calling eAttributes on an EClass. I even expect that
eAttributes would return the attributes abstract and interface.



>
>
> Adrian Rutle wrote:
>> Hi
>>
>> This question may be silly, but since my XMl-knowledge seems to be
>> very limited, I need to pose it here. In the ecore.ecore file I find
>> that all the elements start with <eClassifiers ...> Even the class
>> EClassifier itself. Also, I see <eAnnotations ...>
>> <eStructuralFeatures ...> etc. My question is where do these tags from
>> from?
>>
>> I have looked at XMLNamespace.ecore file also, it has the same kind of
>> tags.
>>
>> -aru
Re: ecore.ecore [message #419147 is a reply to message #419145] Fri, 09 May 2008 16:46 Go to previous messageGo to next message
Eclipse UserFriend
Adrian,

Comments below.


Adrian Rutle wrote:
> Ed Merks skrev:
>> Adrian,
>>
>> When an instance of some type (EClass) is serialized, the element and
>> attribute names that are used correspond to the feature names, just
>> as a serialized instance of a complex type uses the element and
>> attribute names within the complex type. Generally you should expect
>> type names to appear only on xsi:type references, and for XMI
>> serializations, as the name of root element.
>
>
> Aha, thank you Ed,
> I think know I understand...
>
> <eClassifiers xsi:type="ecore:EClass" name="EPackage"
> eSuperTypes="#//ENamedElement">
> ....
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="eClassifiers" upperBound="-1"
> eType="#//EClassifier" containment="true"
> eOpposite="#//EClassifier/ePackage"/>
> ....
> </eClassifiers>
>
> One more question; inside the <eClassifiers xsi:type="ecore:EClass"
> name="EClass" eSuperTypes="#//EClassifier"> element we have both
>
> <eOperations name="isSuperTypeOf" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
> <eParameters name="someClass" eType="#//EClass"/>
> </eOperations>
>
> and
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="eOperations"
> upperBound="-1"
> eType="#//EOperation" containment="true"
> resolveProxies="false" eOpposite="#//EOperation/eContainingClass"/>
>
>
> , the first one is used in the same way as the <eClassifiers ...> tag
> is used in EPackage, am I right?
Yes, EClass has an eOperations feature.
> Thus there is not difference betwenn the operation
> isSuperTypeOf(someClass : EClass) boolean and the operations that will
> be returned by eOperations. And this would be the case for eAttributes
> also; there is no difference between the attributes interface and
> abstract on one side and the attributes that will be returned by
> calling eAttributes on an EClass. I even expect that eAttributes would
> return the attributes abstract and interface.
I almost couldn't parse any of this. Maybe you could try rephrasing the
question...
>
>
>
>>
>>
>> Adrian Rutle wrote:
>>> Hi
>>>
>>> This question may be silly, but since my XMl-knowledge seems to be
>>> very limited, I need to pose it here. In the ecore.ecore file I find
>>> that all the elements start with <eClassifiers ...> Even the class
>>> EClassifier itself. Also, I see <eAnnotations ...>
>>> <eStructuralFeatures ...> etc. My question is where do these tags
>>> from from?
>>>
>>> I have looked at XMLNamespace.ecore file also, it has the same kind
>>> of tags.
>>>
>>> -aru
Re: ecore.ecore [message #419149 is a reply to message #419145] Fri, 09 May 2008 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Adrian Rutle skrev:
> Ed Merks skrev:
>> Adrian,
>>
>> When an instance of some type (EClass) is serialized, the element and
>> attribute names that are used correspond to the feature names, just as
>> a serialized instance of a complex type uses the element and attribute
>> names within the complex type. Generally you should expect type names
>> to appear only on xsi:type references, and for XMI serializations, as
>> the name of root element.
>
>
> Aha, thank you Ed,
> I think know I understand...
now
>
> <eClassifiers xsi:type="ecore:EClass" name="EPackage"
> eSuperTypes="#//ENamedElement">
> ...
> <eStructuralFeatures xsi:type="ecore:EReference" name="eClassifiers"
> upperBound="-1"
> eType="#//EClassifier" containment="true"
> eOpposite="#//EClassifier/ePackage"/>
> ...
> </eClassifiers>
>
> One more question; inside the <eClassifiers xsi:type="ecore:EClass"
> name="EClass" eSuperTypes="#//EClassifier"> element we have both
>
> <eOperations name="isSuperTypeOf" eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
> <eParameters name="someClass" eType="#//EClass"/>
> </eOperations>
>
> and
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="eOperations"
> upperBound="-1"
> eType="#//EOperation" containment="true" resolveProxies="false"
> eOpposite="#//EOperation/eContainingClass"/>
>
>
> , the first one is used in the same way as the <eClassifiers ...> tag
> is used in EPackage, am I right? Thus there is not difference betwenn
> the operation isSuperTypeOf(someClass : EClass) boolean and the
> operations that will be returned by eOperations. And this would be the
> case for eAttributes also; there is no difference between the attributes
> interface and abstract on one side and the attributes that will be
> returned by calling eAttributes on an EClass. I even expect that
> eAttributes would return the attributes abstract and interface.

Did some testing, the getEAttributes() which returns the list
EAttributes returned only the attributes of the instance. While the call
<instance-object-name>.eClass().eClass().getEAttributes() returned
interface and abstract. So the difference is in that these two

<eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="interface"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>

are attributes of the EClass itself, but these two (and many others)

<eStructuralFeatures xsi:type="ecore:EReference" name="eAllAttributes"
upperBound="-1"
eType="#//EAttribute" changeable="false" volatile="true"
transient="true"
derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="eAttributes"
upperBound="-1"
eType="#//EAttribute" changeable="false" volatile="true"
transient="true"
derived="true"/>

are for instances of EClass.

Adrian
>
>
>
>>
>>
>> Adrian Rutle wrote:
>>> Hi
>>>
>>> This question may be silly, but since my XMl-knowledge seems to be
>>> very limited, I need to pose it here. In the ecore.ecore file I find
>>> that all the elements start with <eClassifiers ...> Even the class
>>> EClassifier itself. Also, I see <eAnnotations ...>
>>> <eStructuralFeatures ...> etc. My question is where do these tags
>>> from from?
>>>
>>> I have looked at XMLNamespace.ecore file also, it has the same kind
>>> of tags.
>>>
>>> -aru
Re: ecore.ecore [message #419150 is a reply to message #419149] Fri, 09 May 2008 16:54 Go to previous messageGo to next message
Eclipse UserFriend
Adrian,

I think so. :-P


Adrian Rutle wrote:
> Adrian Rutle skrev:
>> Ed Merks skrev:
>>> Adrian,
>>>
>>> When an instance of some type (EClass) is serialized, the element
>>> and attribute names that are used correspond to the feature names,
>>> just as a serialized instance of a complex type uses the element and
>>> attribute names within the complex type. Generally you should
>>> expect type names to appear only on xsi:type references, and for XMI
>>> serializations, as the name of root element.
>>
>>
>> Aha, thank you Ed,
>> I think know I understand...
> now
>>
>> <eClassifiers xsi:type="ecore:EClass" name="EPackage"
>> eSuperTypes="#//ENamedElement">
>> ...
>> <eStructuralFeatures xsi:type="ecore:EReference"
>> name="eClassifiers" upperBound="-1"
>> eType="#//EClassifier" containment="true"
>> eOpposite="#//EClassifier/ePackage"/>
>> ...
>> </eClassifiers>
>>
>> One more question; inside the <eClassifiers xsi:type="ecore:EClass"
>> name="EClass" eSuperTypes="#//EClassifier"> element we have both
>>
>> <eOperations name="isSuperTypeOf" eType="ecore:EDataType
>> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
>> <eParameters name="someClass" eType="#//EClass"/>
>> </eOperations>
>>
>> and
>>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="eOperations"
>> upperBound="-1"
>> eType="#//EOperation" containment="true"
>> resolveProxies="false" eOpposite="#//EOperation/eContainingClass"/>
>>
>>
>> , the first one is used in the same way as the <eClassifiers ...>
>> tag is used in EPackage, am I right? Thus there is not difference
>> betwenn the operation isSuperTypeOf(someClass : EClass) boolean and
>> the operations that will be returned by eOperations. And this would
>> be the case for eAttributes also; there is no difference between the
>> attributes interface and abstract on one side and the attributes
>> that will be returned by calling eAttributes on an EClass. I even
>> expect that eAttributes would return the attributes abstract and
>> interface.
>
> Did some testing, the getEAttributes() which returns the list
> EAttributes returned only the attributes of the instance. While the
> call <instance-object-name>.eClass().eClass().getEAttributes()
> returned interface and abstract. So the difference is in that these two
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="interface"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
>
> are attributes of the EClass itself, but these two (and many others)
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="eAllAttributes"
> upperBound="-1"
> eType="#//EAttribute" changeable="false" volatile="true"
> transient="true"
> derived="true"/>
> <eStructuralFeatures xsi:type="ecore:EReference"
> name="eAttributes" upperBound="-1"
> eType="#//EAttribute" changeable="false" volatile="true"
> transient="true"
> derived="true"/>
>
> are for instances of EClass.
>
> Adrian
>>
>>
>>
>>>
>>>
>>> Adrian Rutle wrote:
>>>> Hi
>>>>
>>>> This question may be silly, but since my XMl-knowledge seems to be
>>>> very limited, I need to pose it here. In the ecore.ecore file I
>>>> find that all the elements start with <eClassifiers ...> Even the
>>>> class EClassifier itself. Also, I see <eAnnotations ...>
>>>> <eStructuralFeatures ...> etc. My question is where do these tags
>>>> from from?
>>>>
>>>> I have looked at XMLNamespace.ecore file also, it has the same kind
>>>> of tags.
>>>>
>>>> -aru
Re: ecore.ecore [message #419151 is a reply to message #419150] Fri, 09 May 2008 17:02 Go to previous message
Eclipse UserFriend
Ed Merks skrev:
> Adrian,
>
> I think so. :-P

Thank you again!
;-D
>
>
> Adrian Rutle wrote:
>> Adrian Rutle skrev:
>>> Ed Merks skrev:
>>>> Adrian,
>>>>
>>>> When an instance of some type (EClass) is serialized, the element
>>>> and attribute names that are used correspond to the feature names,
>>>> just as a serialized instance of a complex type uses the element and
>>>> attribute names within the complex type. Generally you should
>>>> expect type names to appear only on xsi:type references, and for XMI
>>>> serializations, as the name of root element.
>>>
>>>
>>> Aha, thank you Ed,
>>> I think know I understand...
>> now
>>>
>>> <eClassifiers xsi:type="ecore:EClass" name="EPackage"
>>> eSuperTypes="#//ENamedElement">
>>> ...
>>> <eStructuralFeatures xsi:type="ecore:EReference"
>>> name="eClassifiers" upperBound="-1"
>>> eType="#//EClassifier" containment="true"
>>> eOpposite="#//EClassifier/ePackage"/>
>>> ...
>>> </eClassifiers>
>>>
>>> One more question; inside the <eClassifiers xsi:type="ecore:EClass"
>>> name="EClass" eSuperTypes="#//EClassifier"> element we have both
>>>
>>> <eOperations name="isSuperTypeOf" eType="ecore:EDataType
>>> http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
>>> <eParameters name="someClass" eType="#//EClass"/>
>>> </eOperations>
>>>
>>> and
>>>
>>> <eStructuralFeatures xsi:type="ecore:EReference" name="eOperations"
>>> upperBound="-1"
>>> eType="#//EOperation" containment="true"
>>> resolveProxies="false" eOpposite="#//EOperation/eContainingClass"/>
>>>
>>>
>>> , the first one is used in the same way as the <eClassifiers ...>
>>> tag is used in EPackage, am I right? Thus there is not difference
>>> betwenn the operation isSuperTypeOf(someClass : EClass) boolean and
>>> the operations that will be returned by eOperations. And this would
>>> be the case for eAttributes also; there is no difference between the
>>> attributes interface and abstract on one side and the attributes
>>> that will be returned by calling eAttributes on an EClass. I even
>>> expect that eAttributes would return the attributes abstract and
>>> interface.
>>
>> Did some testing, the getEAttributes() which returns the list
>> EAttributes returned only the attributes of the instance. While the
>> call <instance-object-name>.eClass().eClass().getEAttributes()
>> returned interface and abstract. So the difference is in that these two
>>
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract"
>> eType="ecore:EDataType
>> http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
>> <eStructuralFeatures xsi:type="ecore:EAttribute" name="interface"
>> eType="ecore:EDataType
>> http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
>>
>> are attributes of the EClass itself, but these two (and many others)
>>
>> <eStructuralFeatures xsi:type="ecore:EReference" name="eAllAttributes"
>> upperBound="-1"
>> eType="#//EAttribute" changeable="false" volatile="true"
>> transient="true"
>> derived="true"/>
>> <eStructuralFeatures xsi:type="ecore:EReference"
>> name="eAttributes" upperBound="-1"
>> eType="#//EAttribute" changeable="false" volatile="true"
>> transient="true"
>> derived="true"/>
>>
>> are for instances of EClass.
>>
>> Adrian
>>>
>>>
>>>
>>>>
>>>>
>>>> Adrian Rutle wrote:
>>>>> Hi
>>>>>
>>>>> This question may be silly, but since my XMl-knowledge seems to be
>>>>> very limited, I need to pose it here. In the ecore.ecore file I
>>>>> find that all the elements start with <eClassifiers ...> Even the
>>>>> class EClassifier itself. Also, I see <eAnnotations ...>
>>>>> <eStructuralFeatures ...> etc. My question is where do these tags
>>>>> from from?
>>>>>
>>>>> I have looked at XMLNamespace.ecore file also, it has the same kind
>>>>> of tags.
>>>>>
>>>>> -aru
Previous Topic:Implementing inheritance: restricting instead of extending ancestor class
Next Topic:Primitive types and Java types in XMI
Goto Forum:
  


Current Time: Sun Jul 06 21:41:35 EDT 2025

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

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

Back to the top