There is a data utilities method that will create you an array of objects populated with the default values for a provided FeatureType. But I suppose that depends on having a valid default provided by the AttributeType? Regardless changing this method to look for a default no argument constructor for the target class in question would be a good move - and I suspect already done.
Jody > Hi All, > > I'm trying to copy features into Shapefile datastore from a WFS. The > WFS creates a FeatureType based on the describeFeature operation > which correctly sets the nillable flag on the AttributeTypes. > However it doesn't have a way to find a "default" value so > createDefaultValue returns null, which is in direct conflict with the > FeatureType. When I try to write to the ShapefileDatastore the > FeatureWriter creates a feature based on the FeatureType.createFeature > () method... But it is not a legal Feature so it throws an exception. > > I'm looking for suggestions on how to fix/work-around this issue. > Ideas? > > ------------------------------------------------------------------------- > 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 > ------------------------------------------------------------------------- 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
