Hi,

I thought my problems with EMF were over, but alas they are not!  This is
more of a general EMF question than anything so it's a bit out of place here
(I couldn't find an EMF messageboard or forum...).

Basically, the GridType interface contains a getLimits method which should
return a com.vividsolutions.jts.geom.Envelope.  However, the generated
GridTypeImpl class implements the getLimits method as follows:

public Envelope getLimits() {
        if (limits != null && ((EObject)limits).eIsProxy()) {
                InternalEObject oldLimits = (InternalEObject)limits;
                limits = (Envelope)eResolveProxy(oldLimits);
                if (limits != oldLimits) {
                        if (eNotificationRequired())
                                eNotify(new ENotificationImpl(this, 
Notification.RESOLVE,
Gml4wcsPackage.GRID_TYPE__LIMITS, oldLimits, limits));
                }
        }
        return limits;
}

The first line of this give me a ClassCastException because 'limits' is not
an EObject!  I'm not sure how to solve this, I've played around with the
GridType interface and reloading the model but haven't managed to solve it. 
The original model declaration for getLimits() in the interface is as
follows:

/**
 * Returns the value of the '<em>Limits</em>' reference.
 * <!-- begin-user-doc -->
 * <p>
 * If the meaning of the '<em>Limits</em>' reference isn't clear,
 * there really should be more of a description here...
 * </p>
 * <!-- end-user-doc -->
 * @return the value of the '<em>Limits</em>' reference.
 * @see #setLimits(Envelope)
 * @see net.opengis.gml.Gml4wcsPackage#getGridType_Limits()
 * @model type="net.opengis.gml.Envelope" required="true"
 *        extendedMetaData="kind='element' name='limits'
namespace='##targetNamespace'"
 * @generated
 */
Envelope getLimits();

Any EMF wizards know why this is happening?

Thanks,

Jon
-- 
View this message in context: 
http://n2.nabble.com/Another-EMF-%2B-WCS-problem....-tp3055274p3055274.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to