Jody Garnett wrote:
Starting tomorrow, and every day until the unit tests are written, the IRC channel will be going over the aspects of the Feature Model. - http://timeanddate.com/worldclock/fixedtime.html?day=1&month=5&year=2006&hour=22&min=0&sec=0&p1=37

We will only hack for a bit each day so show up with your questions.
In talking with David Blasby, he mentioned a couple of ideas to get people interested in the Feature Model branch. One idea was to talk about what has improved, and to mention successes as they are obtained.

I know that "modeling" is a dry subject best discussed over a Martini (and if the conversation lasts over a minuet something stronger).

So instead I am going to talk about some of the other improvements that make the Feature Model branch a joy to work on. And I miss everytime I come back to trunk or 2.2.x.

The FeatureTypeBuilder is great! It suffers from a raw usability you rarely fine in geotools. A before and after will suffice...

Before (use of TypeFactory):
TypeFactory f =
(TypeFactory) gt.getComponentInstanceOfType( TypeFactory.class );

        List address = new ArrayList();
        address.add( attribute( "name", TEXT ));
        address.add( attribute( "suite", NUMBER ));
address.add( attribute( "address", TEXT )); ComplexType ADDRESS = f.createComplexType( typeName("pigeon://localhost/polly","Person"), address, true, false, null, null, null );
After (use of TypeBuilder):

ComplexTypeBuilder b =
(ComplexTypeBuilder) gt.getComponentInstanceOfType( ComplexTypeBuilder.class );

        b.setNamespaceURI("pigeon://localhost/polly");
        b.setName("Address");
b.attribute("name", TEXT );
        b.attribute("suite", NUMBER );
        b.attribute("address", TEXT );
        ComplexType ADDRESS = b.build();
In case it was not clear from the above example you can combine these things as you do with StringBuffer (or hibernate statements): ComplexType ADDRESS = b.setNamespaceURI("pigeon://localhost/polly"). setName("Address").attribute("name", TEXT ).attribute("suite", NUMBER ).attribute("address", TEXT ).build();

Cheers,
Jody


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to