Hi all,

I have made some changes to the jdbc module. I haven't committed yet and 
was hoping that one ( or more :) ) of the other jdbc module maintainers 
( or anyone for that matter ) could perform a code review for me. The 
diffs are located here:

http://jira.codehaus.org/browse/GEOT-1058

Summary of changes:

1. Handling of simple xpath expressions. Now I know this sounds scary, 
buts its not. As an example, when sql gets encoded, the xpath expression 
"gml:name" fails, because of course the column has no notion of a 
prefix. To fix is easy:

Instead of doing the following:

PropertyName name = ...
FeatureType featureType = ..

AttributeType attributeType = type.getAttributeType( 
name.getPropertyName() )

We do this:

PropertyName name = ...
FeatureType featureType = ..

AttributeType attributeType = name.evaluate( featureType );

Using the expression to get at the attribute type allows the 
PropertyAccessor extension point ( added a few weeks ago for getting 
properties out of POJO's ) to kick in and evaluate properly.

2. Made it so that when attribute types are created, the "nullability" 
of the database column is checked in order to determine a minOccurs 
value, and if the type is nillable.

3. Setting the "userData" property of geometries that get created to be 
the CRS of the corresponding attribute type. Now I know that this is a 
*bad* way of doing this, and as a toolkit we can't rely on this loose 
coupling between geometry and crs. However, there is no other clean 
option until we abstract the jts geometry class behind the iso 
interface, which is a huge job

And thats all folks :).

-Justin

-- 
Justin Deoliveira
[EMAIL PROTECTED]
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to