Skip to main content



      Home
Home » Modeling » EMF » Attribute vs Containment Reference Relationship
Attribute vs Containment Reference Relationship [message #1743205] Tue, 13 September 2016 05:55 Go to next message
Eclipse UserFriend
I wish to learn what is the practical difference between EAttribute and EReference that is a containment.

Thank you.
Re: Attribute vs Containment Reference Relationship [message #1743208 is a reply to message #1743205] Tue, 13 September 2016 06:10 Go to previous message
Eclipse UserFriend
Of course they're both EStructuralFeatures. But the type of an EAttribute must be an EDataType and the type of an EReference must be an EClass. In terms of the structure that's produced from the model, instances of EDataTypes are leaf values in the structure; the value cannot be inspected further using EMF reflection. To be EDataType.serializeable, it must be possible to convert the value to a string representation for which it's possible to produce the original value (or one equal to it). Instances of EClasses are necessarily EObjects. EObjects form a graph of interconnected information than can be inspected using EMF reflection (EObject.eGet). EReferences that are containment references induce a tree (recursively EObject.eContents); container references (EObject.eContainer) are the reverse direction of that tree. EReferences that are cross references (not containment and not container) are cross links (EObject.eCrossReferences) between the nodes in the tree.
Previous Topic:Explain ItemProviderAdapter.getTypeText implementation
Next Topic:EOpposite
Goto Forum:
  


Current Time: Wed Jul 23 15:56:02 EDT 2025

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

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

Back to the top