← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12706: Removed outdated properties on MapView: valueType, legendType.

 

------------------------------------------------------------
revno: 12706
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-16 10:49:41 +0200
message:
  Removed outdated properties on MapView: valueType, legendType.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/mapping/hibernate/MapView.hbm.xml
  dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.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-api/src/main/java/org/hisp/dhis/mapping/MapView.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2013-10-06 22:11:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapping/MapView.java	2013-10-16 08:49:41 +0000
@@ -73,21 +73,11 @@
     public static final String LAYER_THEMATIC3 = "thematic3";
     public static final String LAYER_THEMATIC4 = "thematic4";
 
-    public static final String VALUE_TYPE_INDICATOR = "indicator";
-    public static final String VALUE_TYPE_DATAELEMENT = "dataelement";
-
-    public static final String LEGEND_TYPE_AUTOMATIC = "automatic";
-    public static final String LEGEND_TYPE_PREDEFINED = "predefined";
-
     public static final List<String> DATA_LAYERS = Arrays.asList( 
         LAYER_THEMATIC1, LAYER_THEMATIC2, LAYER_THEMATIC3, LAYER_THEMATIC4 );
     
     private String layer;
 
-    private String valueType;
-
-    private String legendType;
-
     private Integer method;
 
     private Integer classes;
@@ -202,32 +192,6 @@
     }
 
     @JsonProperty
-    @JsonView( { DetailedView.class, ExportView.class } )
-    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public String getValueType()
-    {
-        return valueType;
-    }
-
-    public void setValueType( String valueType )
-    {
-        this.valueType = valueType;
-    }
-
-    @JsonProperty
-    @JsonView( { DetailedView.class, ExportView.class } )
-    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public String getLegendType()
-    {
-        return legendType;
-    }
-
-    public void setLegendType( String legendType )
-    {
-        this.legendType = legendType;
-    }
-
-    @JsonProperty
     @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
     public Integer getMethod()
@@ -395,8 +359,6 @@
             MapView mapView = (MapView) other;
 
             layer = mapView.getLayer() == null ? layer : mapView.getLayer();
-            valueType = mapView.getValueType() == null ? valueType : mapView.getValueType();
-            legendType = mapView.getLegendType() == null ? legendType : mapView.getLegendType();
             method = mapView.getMethod() == null ? method : mapView.getMethod();
             classes = mapView.getClasses() == null ? classes : mapView.getClasses();
             colorLow = mapView.getColorLow() == null ? colorLow : mapView.getColorLow();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2013-10-16 08:49:41 +0000
@@ -347,7 +347,6 @@
         mapView.getOrganisationUnits().add( unit );
         mapView.getOrganisationUnitLevels().add( level );
         mapView.setName( indicator.getName() );
-        mapView.setValueType( MapView.VALUE_TYPE_INDICATOR );
 
         return mapView;
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-10-15 16:53:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-10-16 08:49:41 +0000
@@ -156,6 +156,8 @@
         executeSql( "ALTER TABLE mapview DROP COLUMN mapdatetype" );
         executeSql( "ALTER TABLE mapview DROP COLUMN featuretype" );
         executeSql( "ALTER TABLE mapview DROP COLUMN bounds" );
+        executeSql( "ALTER TABLE mapview DROP COLUMN valuetype" );
+        executeSql( "ALTER TABLE mapview DROP COLUMN legendtype" );
         executeSql( "ALTER TABLE mapview RENAME COLUMN mapvaluetype TO valuetype" );
         executeSql( "ALTER TABLE mapview RENAME COLUMN maplegendtype TO legendtype" );
         executeSql( "ALTER TABLE mapview RENAME COLUMN maplegendsetid TO legendsetid" );
@@ -645,7 +647,7 @@
 
         upgradeMapViewsToAnalyticalObject();
 
-		executeSql( "ALTER TABLE users ALTER COLUMN password DROP NOT NULL" );
+	executeSql( "ALTER TABLE users ALTER COLUMN password DROP NOT NULL" );
         
         log.info( "Tables updated" );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/mapping/hibernate/MapView.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/mapping/hibernate/MapView.hbm.xml	2013-10-15 18:20:05 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/mapping/hibernate/MapView.hbm.xml	2013-10-16 08:49:41 +0000
@@ -20,8 +20,6 @@
 
     <property name="layer" not-null="true" />
 
-    <property name="valueType" />
-
     <list name="dataElements" table="mapview_dataelements">
       <cache usage="read-write" />
       <key column="mapviewid" foreign-key="fk_mapview_dataelements_mapviewid" />
@@ -94,8 +92,6 @@
 
     <property name="userOrganisationUnitGrandChildren" />
 
-    <property name="legendType" />
-
     <property name="method" />
 
     <property name="classes" />

=== modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java'
--- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-10-07 11:46:08 +0000
+++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java	2013-10-16 08:49:41 +0000
@@ -170,7 +170,7 @@
             return null;
         }
 
-        boolean isIndicator = MapView.VALUE_TYPE_INDICATOR.equals( mapView.getValueType() );
+        boolean isIndicator = false; //TODO
 
         List<OrganisationUnit> atLevels = new ArrayList<OrganisationUnit>();
         List<OrganisationUnit> inGroups = new ArrayList<OrganisationUnit>();