Hi,
so one of the first steps to write a CSW service is to create the EMF model
representing requests and responses.

I've been trying to do this for a few hours without much success.
First, the direct generation from the XSD does not work due to references to
ogc filters, so I generated a set of classes that does not compile, threw
away the implementations, modified the annotate interfaces to use our own
objects and changed the package names to avoid having packages named _0 and
_1
around. At this point the ecore model looks good.

Then I generate the implementation again, and the implementation does not
compile
again... this time it seems there are troubles with XMLGregorianCalendar
fields,
where eSet fails to cast to the proper type for some reason, and all the
factories
fail to compile because they try to use EMF methods that are not available
in our
version of EMF. Examples:

 @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case Csw20Package.ACKNOWLEDGEMENT_TYPE__ECHOED_REQUEST:
                setEchoedRequest((EchoedRequestType)newValue);
                return;
            case Csw20Package.ACKNOWLEDGEMENT_TYPE__REQUEST_ID:
                setRequestId((String)newValue);
                return;
            case Csw20Package.ACKNOWLEDGEMENT_TYPE__TIME_STAMP:
                setTimeStamp(newValue); // <- This one needs a cast to
XMLGregorianCalendar
                return;
        }
        super.eSet(featureID, newValue);
    }


    public Adapter createAdapter(Notifier target) {
        return modelSwitch.doSwitch((EObject)target);  // doSwitch is
unknown
    }

This is with Eclipse Juno. Ok, so I've tried with Indigo, in which I did
not have the
EMF tooling, adding it from the Indigo update site results in a sort of
infinite
mirror loop, there is a package,
org.eclipse.emf.doc_2.6.0v201201030-0943.jar.pack.gz
that gets downloaded from all the mirrors in turn, it downloads 1.8MB of
data,
then decides to use another mirror, and so on and so on.
I guess the md5sum or whatever it's used to check the package is broken, and
Eclipse endlessly tries to download that file over and over.

I went back to Helios just to see what would happen, and the result is the
same,
trying to install EMF results in the same endless loop... aaggh!

Long story short, it seems that it's not possible anymore to generate EMF
models
unless one has an old Eclipse with the EMF tooling already installed??

I've put the current status of the module here:
http://demo.geo-solutions.it/share/csw.zip

Can anyone help?

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to