Schuster Stefan ha scritto:
> Hello Andrea,
> 
> thanks a lot for your fast answer, but I still have a problem
> 
> As you suggested I switched to SimpleFeatureTypeBuilder, therefor I replaced
> the code for creating the FeatureType as follows:
> 
> 
> SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
> builder.setName("Ereignisse");
> builder.setCRS(CRS.decode("EPSG:32632"));
> builder.add("Location", MultiLineString.class);
> for (String fieldName : fieldNames) {
>       builder.length(3500).add(fieldName, String.class);
> }
> TYPE = builder.buildFeatureType();
> 
> 
> I can now set a restriction for Strings to be _shorter_ than 255 chars, but
> not to be _longer_.
> I'd need a possible maximum of 3500 chars in Field

That would not be a DBF file anymore, the length of a field can
be specified using a byte, so it can be 255 at most:
http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to