Package org.geotools.feature

Examples of org.geotools.feature.AttributeTypeBuilder.buildDescriptor()


        atb.setMinOccurs(isPkNillable() ? 0 : 1);
        atb.setMaxOccurs(1);
        atb.setNillable(isPkNillable());
        atb.setName(FID);
        atb.setBinding(Integer.class);
        AttributeDescriptor fidDescriptor = atb.buildDescriptor(FID);
       
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
        tb.setNamespaceURI(dataStore.getNamespaceURI());
        tb.setName(LAKESVIEW);
        tb.add(fidDescriptor);
View Full Code Here


                build.setName( eg.getName() );
                build.setBinding( type );
                build.setNillable( nillable );
                build.setDefaultValue( defaultValue );

                return build.buildDescriptor(eg.getName());
                              
//                return AttributeTypeFactory.newAttributeDescriptor(
//                        eg.getName(),
//                        type,
//                        nillable,
View Full Code Here

               
                AttributeTypeBuilder build = new AttributeTypeBuilder();
                build.setName( eg.getName() );
                build.setBinding( type );
                build.setNillable( nillable );
                return build.buildDescriptor(eg.getName());
//                return AttributeTypeFactory.newAttributeType(
//                        eg.getName(),
//                        type,
//                        nillable);
            }
View Full Code Here

        }
        AttributeTypeBuilder build = new AttributeTypeBuilder();
        build.setName( eg.getName() );
        build.setBinding( type );
        build.setNillable( nillable );
        return build.buildDescriptor(eg.getName());
        //return AttributeTypeFactory.newAttributeType(eg.getName(),type,(nillable));
    }

    private static AttributeDescriptor getAttribute(String name, Choice eg){
       
View Full Code Here

                if ( rebuild ) {
                    //rebuild with proper crs
                    AttributeTypeBuilder b = new AttributeTypeBuilder();
                    b.init(old);
                    b.setCRS( getCRS(info.getSRS()) );
                    ad = b.buildDescriptor(old.getLocalName());
                }
            }
            catch( Exception e ) {
                //log exception
            }
View Full Code Here

    AttributeTypeBuilder attBuilder = new AttributeTypeBuilder();
    builder.add(toGeometryAttribute(iShapeType, crs,attBuilder));
    builder.setDefaultGeometry("geom");
    for (int i = 0; i < sFields.length; i++) {
      AttributeType type = attBuilder.binding(fields[i]).buildType();
      AttributeDescriptor descriptor = attBuilder.buildDescriptor(sFields[i], type);
      builder.add(descriptor);
    }
    return builder.buildFeatureType();
   
  }
View Full Code Here

                    builder.setMinOccurs(descriptor.getMinOccurs());
                    builder.setMaxOccurs(descriptor.getMaxOccurs());
                    builder.setDefaultValue(descriptor.getDefaultValue());
                    builder.setCRS(this.firstFeatures.features().next().getFeatureType()
                            .getCoordinateReferenceSystem());
                    AttributeDescriptor intersectionDescriptor = builder.buildDescriptor(
                            this.firstFeatures.features().next().getFeatureType().getName()
                                    .getLocalPart()
                                    + "_" + descriptor.getName(), descriptor.getType());
                    tb.add(intersectionDescriptor);
                    tb.addBinding(descriptor.getType());
View Full Code Here

                    builder.setCRS(this.secondFeatures.features().next().getFeatureType()
                            .getCoordinateReferenceSystem());
                    builder.setNamespaceURI(this.secondFeatures.features().next().getFeatureType()
                            .getName().getNamespaceURI());
                    builder.setDefaultValue(descriptor.getDefaultValue());
                    AttributeDescriptor intersectionDescriptor = builder.buildDescriptor(
                            this.secondFeatures.features().next().getFeatureType().getName()
                                    .getLocalPart()
                                    + "_" + descriptor.getName(), descriptor.getType());
                    tb.addBinding(descriptor.getType());
                    tb.add(intersectionDescriptor);
View Full Code Here

                        || (!delegate.getSchema().getGeometryDescriptor().equals(descriptor))) {
                    tb.add(descriptor);
                } else {
                    AttributeTypeBuilder builder = new AttributeTypeBuilder();
                    builder.setBinding(MultiPolygon.class);
                    AttributeDescriptor attributeDescriptor = builder.buildDescriptor(descriptor
                            .getLocalName(), builder.buildType());
                    tb.add(attributeDescriptor);
                    if(tb.getDefaultGeometry() == null) {
                        tb.setDefaultGeometry(descriptor.getLocalName());
                    }
View Full Code Here

                    builder.setMinOccurs(descriptor.getMinOccurs());
                    builder.setMaxOccurs(descriptor.getMaxOccurs());
                    builder.setDefaultValue(descriptor.getDefaultValue());
                    builder.setCRS(this.delegate.features().next().getFeatureType()
                            .getCoordinateReferenceSystem());
                    AttributeDescriptor attributeDescriptor = builder.buildDescriptor(descriptor
                            .getName(), builder.buildType());
                    tb.add(attributeDescriptor);
                } else {
                    tb.add(descriptor);
                }
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.