Revision: 5882
          http://sourceforge.net/p/jump-pilot/code/5882
Author:   michaudm
Date:     2018-06-20 21:31:10 +0000 (Wed, 20 Jun 2018)
Log Message:
-----------
Fix FlexibleFeature#getAttributes (was not implemented)

Modified Paths:
--------------
    core/trunk/ChangeLog
    core/trunk/src/com/vividsolutions/jump/feature/FlexibleFeature.java

Modified: core/trunk/ChangeLog
===================================================================
--- core/trunk/ChangeLog        2018-06-17 16:39:49 UTC (rev 5881)
+++ core/trunk/ChangeLog        2018-06-20 21:31:10 UTC (rev 5882)
@@ -3,15 +3,18 @@
 # 2. make sure that lines break at 80 chars for constricted display situations
 #<-------------------------------- 80 chars 
---------------------------------->#
 
+2018-06-20
+  * Fix FlexibleFeature#getAttributes() (was not implemented)
+
 2018-06-11 Giuseppe Aruta. Raster profile plugin:
-   * Simplified additional result output.
-   * Added capability to draw a slope profile
+  * Simplified additional result output.
+  * Added capability to draw a slope profile
 
 2018-06-08 mmichaud <m.michael.mich...@orange.fr>
   * bugfix in SkeletonPlugIn (PLUS version, GraphToolBox)
 
 2018-06-03 Giuseppe Aruta. Added histogram plugin for raster which calculates
-     also statistic indices, relative and cumulative frequancies
+  * also statistic indices, relative and cumulative frequancies
 
 2018-06-03 mmichaud <m.michael.mich...@orange.fr>
   * bugfix in Dissolve2 : could not use geometry attribute as key

Modified: core/trunk/src/com/vividsolutions/jump/feature/FlexibleFeature.java
===================================================================
--- core/trunk/src/com/vividsolutions/jump/feature/FlexibleFeature.java 
2018-06-17 16:39:49 UTC (rev 5881)
+++ core/trunk/src/com/vividsolutions/jump/feature/FlexibleFeature.java 
2018-06-20 21:31:10 UTC (rev 5882)
@@ -117,12 +117,15 @@
   }
 
   /**
-   * TODO: the method shouldn't be used anyway, still maybe we will have to
-   * implement it later
+   * Returns all attributes in an array of Objects. Use getAttribute(i)
+   * to convert raw gml strings into typed attributes.
    */
   @Override
   public Object[] getAttributes() {
-    throw new UnsupportedOperationException("currently not implemented");
+    int length = getSchema().getAttributeCount();
+    Object[] copy = new Object[length];
+    for (int i = 0 ; i < length ; i++) copy[i] = getAttribute(i);
+    return copy;
   }
 
   /**


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to