Package org.geotools.feature.type

Examples of org.geotools.feature.type.AttributeDescriptorImpl


    super.setUp();
   
    AttributeTypeImpl textAttributeType = new AttributeTypeImpl( new NameImpl( "textType" ), String.class, false, false, null, null, null );
    AttributeTypeImpl numericAttributeType = new AttributeTypeImpl( new NameImpl( "numericType" ), Number.class, false, false, null, null, null );
   
    AttributeDescriptor attribute1 = new AttributeDescriptorImpl( textAttributeType, new NameImpl( TEXT_ATTRIBUTE_ID ), 0, 0, true, null );
    AttributeDescriptor attribute2 = new AttributeDescriptorImpl( numericAttributeType, new NameImpl( NUMERIC_ATTRIBUTE_ID ), 0, 100, true, null );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ),
                                                               Arrays.asList( attribute1, attribute2 ),
                                                               null, false, null, null, null );
   
View Full Code Here


    LinearRing exampleLinearRing = this.geometryFactory.createLinearRing( Utils.createBoxCoords( 0, 1, 0, 1 ) );
    Polygon examplePolygon = this.geometryFactory.createPolygon( exampleLinearRing, null );
    this.linearRingGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( exampleLinearRing ) );
    this.polygonGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( examplePolygon ) );
   
    AttributeDescriptor simpleTextAttribute = new AttributeDescriptorImpl( STRING_TYPE, new NameImpl( NAME_ATTRIBUTE_NAME ), 0, 1, true, null );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ),
                                                               new ArrayList<AttributeDescriptor>( Arrays.asList( simpleTextAttribute, this.polygonGeomDescriptor ) ),
                                                               this.polygonGeomDescriptor,
                                                               false, null, null, null );
   
View Full Code Here

        for (AttributeDescriptor descriptor : descriptors) {
            String name = descriptor.getName().getLocalPart();
            Preconditions.checkArgument(!name.equals(geomName),
                    "The provided geom name is already in use by another attribute");
            if (name.equals(oldGeomName)) {
                AttributeDescriptorImpl newDescriptor = new AttributeDescriptorImpl(
                        descriptor.getType(), new NameImpl(geomName), descriptor.getMinOccurs(),
                        descriptor.getMaxOccurs(), descriptor.isNillable(),
                        descriptor.getDefaultValue());
                newAttributes.add(newDescriptor);
            } else {
View Full Code Here

    /**
     * @see org.opengis.feature.Attribute#getDescriptor()
     */
    @Override
    public AttributeDescriptor getDescriptor() {
        return new AttributeDescriptorImpl(featureType, featureType.getName(), 0,
                Integer.MAX_VALUE, true, null);
    }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        ABSTRACTTIMETOPOLOGYPRIMITIVETYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","AbstractTimeTopologyPrimitive"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XLINKSchema._ACTUATE_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","actuate"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","arcrole"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","href"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        NILREASONTYPE_TYPE,
                        new NameImpl("nilReason"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","remoteSchema"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","role"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XLINKSchema._SHOW_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","show"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.STRING_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","title"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.STRING_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","type"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.BOOLEAN_TYPE,
                        new NameImpl("owns"),
                        0, 1, true, null));
                return descriptors;
            }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        LINESTRINGSEGMENTARRAYPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","stopLines"),
                        0, 2147483647, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        LINESTRINGSEGMENTARRAYPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","breakLines"),
                        0, 2147483647, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        LENGTHTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","maxLength"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TINTYPE_CONTROLPOINT_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","controlPoint"),
                        1, 1, false, null));
                return descriptors;
            }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        DIRECTPOSITIONLISTTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","posList"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        DIRECTPOSITIONTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","pos"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        POINTPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","pointProperty"),
                        1, 1, false, null));
                return descriptors;
            }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOCOMPLEXTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","TopoComplex"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XLINKSchema._ACTUATE_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","actuate"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","arcrole"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","href"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        NILREASONTYPE_TYPE,
                        new NameImpl("nilReason"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","remoteSchema"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.ANYURI_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","role"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XLINKSchema._SHOW_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","show"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.STRING_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","title"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.STRING_TYPE,
                        new NameImpl("http://www.w3.org/1999/xlink","type"),
                        0, 1, true, null));
                return descriptors;
            }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOCOMPLEXPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","maximalComplex"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOCOMPLEXPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","superComplex"),
                        0, 2147483647, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOCOMPLEXPROPERTYTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","subComplex"),
                        0, 2147483647, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOPRIMITIVEMEMBERTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","topoPrimitiveMember"),
                        0, 2147483647, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOPRIMITIVEARRAYASSOCIATIONTYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","topoPrimitiveMembers"),
                        0, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.BOOLEAN_TYPE,
                        new NameImpl("isMaximal"),
                        0, 1, true, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        AGGREGATIONTYPE_TYPE,
                        new NameImpl("aggregationType"),
                        0, 1, true, null));
                return descriptors;
            }
View Full Code Here

            }
            @Override
            public Collection<PropertyDescriptor> buildDescriptors() {
                List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
                descriptors.add(
                    new AttributeDescriptorImpl(
                        TOPOCURVETYPE_TYPE,
                        new NameImpl("http://www.opengis.net/gml/3.2","TopoCurve"),
                        1, 1, false, null));
                descriptors.add(
                    new AttributeDescriptorImpl(
                        XSSchema.BOOLEAN_TYPE,
                        new NameImpl("owns"),
                        0, 1, true, null));
                return descriptors;
            }
View Full Code Here

TOP

Related Classes of org.geotools.feature.type.AttributeDescriptorImpl

Copyright © 2018 www.massapicom. 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.