Package org.geotools.feature

Examples of org.geotools.feature.NameImpl


    public String getLocalName() {
        return name;
    }

    public Name getName() {
        return new NameImpl(uri, name);
    }
View Full Code Here


    }
   
    public void testReadOnlyFeatureStore() throws Exception {
        // build up the mock
        SimpleFeatureType schema = createNiceMock(SimpleFeatureType.class);
        expect(schema.getName()).andReturn(new NameImpl("testFT"));
        replay(schema);
        FeatureStore fs = createNiceMock(FeatureStore.class);
        expect(fs.getSchema()).andReturn(schema);
        replay(fs);
       
View Full Code Here

        FeatureSource fs = createNiceMock(FeatureSource.class);
        replay(fs);
        FeatureType schema = createNiceMock(FeatureType.class);
        replay(schema);
        da = createNiceMock(DataAccess.class);
        name = new NameImpl("blah");
        expect(da.getFeatureSource(name)).andReturn(fs);
        replay(da);
    }
View Full Code Here

    /**
     * @see org.geoserver.catalog.ResourceInfo#getQualifiedName()
     */
    public Name getQualifiedName() {
        return new NameImpl(getNamespace().getURI(), getName());
    }
View Full Code Here

   
    /**
     * @see org.geoserver.catalog.ResourceInfo#getQualifiedNativeName()
     */
    public Name getQualifiedNativeName() {
        return new NameImpl(getNamespace().getURI(), getNativeName());
    }
View Full Code Here

    // TODO Try using the SimpleFeatureBuilder class.
    GeometryType geometryType = LimbGeneratorTest.Utils.createGeometryType( LineString.class );
    GeometryDescriptor geometryDescriptor = LimbGeneratorTest.Utils.createGeometryDescriptor( geometryType );
    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
    attributeDescriptors.add( geometryDescriptor );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), attributeDescriptors, geometryDescriptor, false, null, null, null );
    List<Object> attributeValues = new ArrayList<Object>();
    attributeValues.add( null );
    this.feature = new SimpleFeatureImpl( attributeValues, featureType, new FeatureIdImpl( "test" ) );
  }
View Full Code Here

 
  public void setUp() throws Exception
  {
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), null, null, false, null, null, null );
    Feature feature = new SimpleFeatureImpl( new ArrayList<Object>(), featureType, new FeatureIdImpl( "test" ) );
   
    this.limb = new Limb();
    this.limb.setEdges( new HashSet<Edge>() );
    this.limb.setFeature( feature );
View Full Code Here

 
  public void setUp() throws Exception
  {
    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 );
   
    this.feature = new SimpleFeatureImpl( Arrays.asList( null, null ), featureType, new FeatureIdImpl( FEATURE_ID ) );
  }
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 );
   
    this.feature1 = new SimpleFeatureImpl( new ArrayList<Object>( Arrays.asList( NO_VALUE, NO_GEOMETRY ) ),
View Full Code Here

      return createGeometryType( geometry.getClass() );
    }
   
    public static GeometryType createGeometryType( Class<? extends Geometry> clazz )
    {
      return new GeometryTypeImpl( new NameImpl( "dummygeomtype" ), clazz, null, false, false, null, null, null );
    }
View Full Code Here

TOP

Related Classes of org.geotools.feature.NameImpl

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.