Revision: 5029
http://sourceforge.net/p/jump-pilot/code/5029
Author: michaudm
Date: 2016-09-22 06:41:00 +0000 (Thu, 22 Sep 2016)
Log Message:
-----------
Add getAttributeNames() to FeatureSchema
Modified Paths:
--------------
core/trunk/ChangeLog
core/trunk/src/com/vividsolutions/jump/feature/FeatureSchema.java
Modified: core/trunk/ChangeLog
===================================================================
--- core/trunk/ChangeLog 2016-09-21 07:00:32 UTC (rev 5028)
+++ core/trunk/ChangeLog 2016-09-22 06:41:00 UTC (rev 5029)
@@ -3,6 +3,9 @@
# 2. make sure that lines break at 80 chars for constricted display situations
#<-------------------------------- 80 chars
---------------------------------->#
+2016-09-22 mmichaud <[email protected]>
+ * Add getAttributeNames() to FeatureSchema
+
2016-09-21 mmichaud <[email protected]>
* Postgis writer : create the sequence in the same schema as the table
* Postgis writer : normalize index name
Modified: core/trunk/src/com/vividsolutions/jump/feature/FeatureSchema.java
===================================================================
--- core/trunk/src/com/vividsolutions/jump/feature/FeatureSchema.java
2016-09-21 07:00:32 UTC (rev 5028)
+++ core/trunk/src/com/vividsolutions/jump/feature/FeatureSchema.java
2016-09-22 06:41:00 UTC (rev 5029)
@@ -37,10 +37,7 @@
import com.vividsolutions.jump.coordsys.CoordinateSystem;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* Metadata for a FeatureCollection: attribute names and types.
@@ -165,6 +162,15 @@
}
/**
+ * Returns an unmodifiable list containing all attribute names.
+ * Method added to facilitate foreach iteration over attributes
+ * @return
+ */
+ public List<String> getAttributeNames() {
+ return Collections.unmodifiableList(attributeNames);
+ }
+
+ /**
* Adds an attribute with the given case-sensitive name.
* @throws AssertionFailedException if a second Geometry is being added
*/
------------------------------------------------------------------------------
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel