Examples of minOccurs()


Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

            for (PropertyDescriptor attbType : sourceFeatureType.getDescriptors()) {
                typeBuilder.add((AttributeDescriptor) attbType);
            }
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_distance",
                    Double.class);
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_bearing",
                    Double.class);
            typeBuilder
                    .setDefaultGeometry(sourceFeatureType.getGeometryDescriptor().getLocalName());
            return typeBuilder.buildFeatureType();
        } catch (Exception e) {
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

                            target = MultiPolygon.class;
                        } else {
                            throw new RuntimeException("Don't know how to handle geometries of type "
                                    + binding.getCanonicalName());
                        }
                        tb.minOccurs(ad.getMinOccurs());
                        tb.maxOccurs(ad.getMaxOccurs());
                        tb.nillable(ad.isNillable());
                        tb.add(ad.getLocalName(), target, gd.getCoordinateReferenceSystem());
                    }
                } else {
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

            this.dataAttribute = dataAttribute;
            this.data = data;

            SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
            for (AttributeDescriptor att : zones.getSchema().getAttributeDescriptors()) {
                tb.minOccurs(att.getMinOccurs());
                tb.maxOccurs(att.getMaxOccurs());
                tb.restrictions(att.getType().getRestrictions());
                if (att instanceof GeometryDescriptor) {
                    GeometryDescriptor gatt = (GeometryDescriptor) att;
                    tb.crs(gatt.getCoordinateReferenceSystem());
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

                    typeBuilder.add(geomAttbType.getLocalName(), Point.class);
                } else {
                    typeBuilder.add((AttributeDescriptor) attbType);
                }
            }
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_distance",
                    Double.class);
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_bearing",
                    Double.class);
            typeBuilder
                    .setDefaultGeometry(sourceFeatureType.getGeometryDescriptor().getLocalName());
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

                    typeBuilder.add((AttributeDescriptor) attbType);
                }
            }
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_distance",
                    Double.class);
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_bearing",
                    Double.class);
            typeBuilder
                    .setDefaultGeometry(sourceFeatureType.getGeometryDescriptor().getLocalName());
            return typeBuilder.buildFeatureType();
        } catch (Exception e) {
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

            typeBuilder.setName(sourceFeatureType.getName().getLocalPart());
            typeBuilder.setNamespaceURI(sourceFeatureType.getName().getNamespaceURI());
            for (PropertyDescriptor attbType : sourceFeatureType.getDescriptors()) {
                typeBuilder.add((AttributeDescriptor) attbType);
            }
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_distance",
                    Double.class);
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_bearing",
                    Double.class);
            typeBuilder
                    .setDefaultGeometry(sourceFeatureType.getGeometryDescriptor().getLocalName());
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

            for (PropertyDescriptor attbType : sourceFeatureType.getDescriptors()) {
                typeBuilder.add((AttributeDescriptor) attbType);
            }
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_distance",
                    Double.class);
            typeBuilder.minOccurs(1).maxOccurs(1).nillable(false).add("nearest_bearing",
                    Double.class);
            typeBuilder
                    .setDefaultGeometry(sourceFeatureType.getGeometryDescriptor().getLocalName());
            return typeBuilder.buildFeatureType();
        } catch (Exception e) {
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

            this.band = band;
            this.classification = classification;

            SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
            for (AttributeDescriptor att : zones.getSchema().getAttributeDescriptors()) {
                tb.minOccurs(att.getMinOccurs());
                tb.maxOccurs(att.getMaxOccurs());
                tb.restrictions(att.getType().getRestrictions());
                if (att instanceof GeometryDescriptor) {
                    GeometryDescriptor gatt = (GeometryDescriptor) att;
                    tb.crs(gatt.getCoordinateReferenceSystem());
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.minOccurs()

                GeometryDescriptor gd = (GeometryDescriptor) ad;
                Class<?> binding = ad.getType().getBinding();
                if (Point.class.isAssignableFrom(binding)) {
                    tb.add(ad);
                } else {
                    tb.minOccurs(ad.getMinOccurs());
                    tb.maxOccurs(ad.getMaxOccurs());
                    tb.nillable(ad.isNillable());
                    tb.add(ad.getLocalName(), Point.class, gd.getCoordinateReferenceSystem());
                }
            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.