[Schmitzm-commits] r1114 - trunk/src/schmitzm/geotools/feature
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Oct 14 20:38:12 CEST 2010
Author: mojays
Date: 2010-10-14 20:38:12 +0200 (Thu, 14 Oct 2010)
New Revision: 1114
Added:
trunk/src/schmitzm/geotools/feature/AttributeModificationDefinition.java
Modified:
trunk/src/schmitzm/geotools/feature/FeatureUtil.java
Log:
Prototypes for feature source modification.
Added: trunk/src/schmitzm/geotools/feature/AttributeModificationDefinition.java
===================================================================
--- trunk/src/schmitzm/geotools/feature/AttributeModificationDefinition.java 2010-10-14 18:35:31 UTC (rev 1113)
+++ trunk/src/schmitzm/geotools/feature/AttributeModificationDefinition.java 2010-10-14 18:38:12 UTC (rev 1114)
@@ -0,0 +1,32 @@
+package schmitzm.geotools.feature;
+
+import java.util.Set;
+
+public class AttributeModificationDefinition {
+ protected int attrIdx;
+ protected String newAttrName;
+ protected Class<?> newAttrClass;
+ protected Set<Object> nullValues;
+
+ public String getNewAttrName() {
+ return newAttrName;
+ }
+ public void setNewAttrName(String newAttrName) {
+ this.newAttrName = newAttrName;
+ }
+ public Class<?> getNewAttrClass() {
+ return newAttrClass;
+ }
+ public void setNewAttrClass(Class<?> newAttrClass) {
+ this.newAttrClass = newAttrClass;
+ }
+ public Set<Object> getNullValues() {
+ return nullValues;
+ }
+ public void setNullValues(Set<Object> nullValues) {
+ this.nullValues = nullValues;
+ }
+ public int getAttrIdx() {
+ return attrIdx;
+ }
+}
Modified: trunk/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/feature/FeatureUtil.java 2010-10-14 18:35:31 UTC (rev 1113)
+++ trunk/src/schmitzm/geotools/feature/FeatureUtil.java 2010-10-14 18:38:12 UTC (rev 1114)
@@ -60,6 +60,7 @@
import org.apache.log4j.Logger;
import org.geotools.coverage.grid.GridCoverage2D;
import org.geotools.coverage.grid.io.AbstractGridCoverage2DReader;
+import org.geotools.data.AbstractDataStore;
import org.geotools.data.DataUtilities;
import org.geotools.data.DefaultQuery;
import org.geotools.data.FeatureSource;
@@ -2446,7 +2447,22 @@
return null;
}
+
+ /**
+ * "Modifies" a {@link FeatureSource} according to the given
+ * {@link AttributeModificationDefinition AttributeModificationDefinitions}
+ * and stores the resulting {@link FeatureSource} in a data store.
+ * @param fs source {@link FeatureSource}
+ * @param destDataStore destination for the new {@link FeatureSource}
+ * @param destAttr defines which attributes of the source {@link FeatureSource}
+ * are copied in the destination, and (optionally) how the
+ * attributes are modified during this procedure
+ */
+ public static void modifyFeatureSource(FeatureSource<SimpleFeatureType,SimpleFeature> fs, AbstractDataStore destDataStore, AttributeModificationDefinition... destAttr) {
+ throw new UnsupportedOperationException("FeatureUtil.modifyFeatureSource(..) not yet implemented!");
+ }
+
// /**
// * Extrahiert alle Geometrien aus einer FeatureCollection. Fuer jedes
// * Geometry-Attribut der FeatureCollection wird eine GeometrieCollection
More information about the Schmitzm-commits
mailing list