All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geotools.feature.DecoratingFeature Maven / Gradle / Ivy

Go to download

The main module contains the GeoTools public interfaces that are used by other GeoTools modules (and GeoTools applications). Where possible we make use industry standard terms as provided by OGC and ISO standards. The formal GeoTools public api consists of gt-metadata, jts and the gt-main module. The main module contains the default implementations that are available provided to other GeoTools modules using our factory system. Factories are obtained from an appropriate FactoryFinder, giving applications a chance configure the factory used using the Factory Hints facilities. FilterFactory ff = CommonFactoryFinder.getFilterFactory(); Expression expr = ff.add( expression1, expression2 ); If you find yourself using implementation specific classes chances are you doing it wrong: Expression expr = new AddImpl( expression1, expressiom2 );

The newest version!
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2002-2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.feature;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.locationtech.jts.geom.Geometry;
import org.opengis.feature.GeometryAttribute;
import org.opengis.feature.IllegalAttributeException;
import org.opengis.feature.Property;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
import org.opengis.feature.type.AttributeDescriptor;
import org.opengis.feature.type.Name;
import org.opengis.filter.identity.FeatureId;
import org.opengis.geometry.BoundingBox;

/**
 * Base class for feature decorators.
 *
 * 

Subclasses should override those methods which are relevant to the decorator. * * @author Justin Deoliveira, The Open Planning Project * @since 2.5 */ public class DecoratingFeature implements SimpleFeature { protected SimpleFeature delegate; public DecoratingFeature(SimpleFeature delegate) { this.delegate = delegate; } public Object getAttribute(int index) { return delegate.getAttribute(index); } public Object getAttribute(Name arg0) { return delegate.getAttribute(arg0); } public Object getAttribute(String path) { return delegate.getAttribute(path); } public int getAttributeCount() { return delegate.getAttributeCount(); } public List getAttributes() { return delegate.getAttributes(); } public BoundingBox getBounds() { return delegate.getBounds(); } public Object getDefaultGeometry() { return delegate.getDefaultGeometry(); } public GeometryAttribute getDefaultGeometryProperty() { return delegate.getDefaultGeometryProperty(); } public AttributeDescriptor getDescriptor() { return delegate.getDescriptor(); } public SimpleFeatureType getFeatureType() { return delegate.getFeatureType(); } public FeatureId getIdentifier() { return delegate.getIdentifier(); } public String getID() { return delegate.getID(); } public Name getName() { return delegate.getName(); } public Collection getProperties() { return delegate.getProperties(); } public Collection getProperties(Name arg0) { return delegate.getProperties(arg0); } public Collection getProperties(String arg0) { return delegate.getProperties(arg0); } public Property getProperty(Name arg0) { return delegate.getProperty(arg0); } public Property getProperty(String arg0) { return delegate.getProperty(arg0); } public SimpleFeatureType getType() { return delegate.getType(); } public Map getUserData() { return delegate.getUserData(); } public Collection getValue() { return delegate.getValue(); } public boolean isNillable() { return delegate.isNillable(); } public void setAttribute(int position, Object val) { delegate.setAttribute(position, val); } public void setAttribute(Name arg0, Object arg1) { delegate.setAttribute(arg0, arg1); } public void setAttribute(String path, Object attribute) { delegate.setAttribute(path, attribute); } public void setAttributes(List arg0) { delegate.setAttributes(arg0); } public void setAttributes(Object[] arg0) { delegate.setAttributes(arg0); } public void setDefaultGeometry(Object arg0) { delegate.setDefaultGeometry(arg0); } public void setDefaultGeometryProperty(GeometryAttribute arg0) { delegate.setDefaultGeometryProperty(arg0); } public void setDefaultGeometry(Geometry geometry) throws IllegalAttributeException { delegate.setDefaultGeometry(geometry); } public void setValue(Collection arg0) { delegate.setValue(arg0); } public void setValue(Object arg0) { delegate.setValue(arg0); } public boolean equals(Object obj) { return delegate.equals(obj); } public int hashCode() { return delegate.hashCode(); } public String toString() { return "<" + getClass().getCanonicalName() + ">" + delegate.toString(); } public void validate() { delegate.validate(); } }