Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMap of EMaps
EMap of EMaps [message #403406] Wed, 06 September 2006 15:09 Go to next message
Eclipse User
Originally posted by: andrew1.us.ibm.com

Ed - I found an example that you posted on how to create an EMap whose
values are EMaps - back last Nov 2005. One question - you define an
interface X which contains a map. Are the keyType and valueType values
optional in the declaration (see below) since you also specify a mapType
value. I thought one used either mapType or keyType/valueType. I have
the example and can play around with it, but wanted to know what's the
required info in declaring the top level map.

Thanks;

Andy R.


public interface X extends EObject
{
/**
* Returns the value of the '<em><b>Map</b></em>' map.
* The key is of type {@link java.lang.String},
* and the value is of type list of {@link java.util.Map.Entry},
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Map</em>' map isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Map</em>' map.
* @see map.MapPackage#getX_Map()
* @model mapType="map.Y" keyType="java.lang.String"
valueType="java.util.Map.Entry"
* @generated
*/
EMap getMap();

}
Re: EMap of EMaps [message #403409 is a reply to message #403406] Thu, 07 September 2006 08:44 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
Andrew,

If the referenced mapType is already defined in the XyzPackage, then the
keyType and the valueType are redundant because they will also be
specified there.


Andrew Roberts wrote:
> Ed - I found an example that you posted on how to create an EMap whose
> values are EMaps - back last Nov 2005. One question - you define an
> interface X which contains a map. Are the keyType and valueType
> values optional in the declaration (see below) since you also specify
> a mapType value. I thought one used either mapType or
> keyType/valueType. I have the example and can play around with it,
> but wanted to know what's the required info in declaring the top level
> map.
>
> Thanks;
>
> Andy R.
>
>
> public interface X extends EObject
> {
> /**
> * Returns the value of the '<em><b>Map</b></em>' map.
> * The key is of type {@link java.lang.String},
> * and the value is of type list of {@link java.util.Map.Entry},
> * <!-- begin-user-doc -->
> * <p>
> * If the meaning of the '<em>Map</em>' map isn't clear,
> * there really should be more of a description here...
> * </p>
> * <!-- end-user-doc -->
> * @return the value of the '<em>Map</em>' map.
> * @see map.MapPackage#getX_Map()
> * @model mapType="map.Y" keyType="java.lang.String"
> valueType="java.util.Map.Entry"
> * @generated
> */
> EMap getMap();
>
> }
Previous Topic:[Announce] EMF 2.2.1 M200608311032 is available
Next Topic:Building EMF
Goto Forum:
  


Current Time: Tue Sep 02 12:53:59 EDT 2014

Powered by FUDForum. Page generated in 0.02743 seconds