← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17310: add code field to geoFeature

 

------------------------------------------------------------
revno: 17310
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-29 13:11:10 +0700
message:
  add code field to geoFeature
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java	2014-10-14 11:20:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/GeoFeatureController.java	2014-10-29 06:11:10 +0000
@@ -122,6 +122,7 @@
         {
             GeoFeature feature = new GeoFeature();
             feature.setId( unit.getUid() );
+            feature.setCode( unit.getCode() );
             feature.setHcd( unit.hasChildrenWithCoordinates() );
             feature.setHcu( unit.hasCoordinatesUp() );
             feature.setLe( unit.getLevel() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java	2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/webdomain/GeoFeature.java	2014-10-29 06:11:10 +0000
@@ -45,7 +45,12 @@
      * Identifier.
      */
     private String id;
-    
+
+    /**
+     * Code identifier.
+     */
+    private String code;
+
     /**
      * Name.
      */
@@ -116,6 +121,17 @@
     }
 
     @JsonProperty
+    public String getCode()
+    {
+        return code;
+    }
+
+    public void setCode( String code )
+    {
+        this.code = code;
+    }
+
+    @JsonProperty
     public String getNa()
     {
         return na;