From: Andrea A. <aa...@op...> - 2010-02-02 14:43:21
|
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. |