← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14240: Minor

 

------------------------------------------------------------
revno: 14240
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-17 13:11:20 +0100
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2014-03-17 12:07:44 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2014-03-17 12:11:20 +0000
@@ -61,6 +61,7 @@
 import org.hisp.dhis.common.CombinationGenerator;
 import org.hisp.dhis.common.DimensionType;
 import org.hisp.dhis.common.DimensionalObject;
+import org.hisp.dhis.common.DimensionalObjectUtils;
 import org.hisp.dhis.common.ListMap;
 import org.hisp.dhis.common.NameableObject;
 import org.hisp.dhis.dataelement.DataElement;
@@ -90,10 +91,6 @@
     public static final String DISPLAY_NAME_PERIOD = "Period";
     public static final String DISPLAY_NAME_ORGUNIT = "Organisation unit";    
     
-    public static final String DIMENSION_NAME_SEP = ":";
-    public static final String OPTION_SEP = ";";
-    public static final String ITEM_SEP = "-";
-
     public static final List<String> DATA_DIMS = Arrays.asList( INDICATOR_DIM_ID, DATAELEMENT_DIM_ID, DATAELEMENT_OPERAND_ID, DATASET_DIM_ID );
     public static final List<String> FIXED_DIMS = Arrays.asList( DATA_X_DIM_ID, INDICATOR_DIM_ID, DATAELEMENT_DIM_ID, DATASET_DIM_ID, PERIOD_DIM_ID, ORGUNIT_DIM_ID );
     
@@ -872,11 +869,11 @@
         
         Map<MeasureFilter, Double> map = new HashMap<MeasureFilter, Double>();
         
-        String[] criteria = param.split( OPTION_SEP );
+        String[] criteria = param.split( DimensionalObjectUtils.OPTION_SEP );
         
         for ( String c : criteria )
         {
-            String[] criterion = c.split( DIMENSION_NAME_SEP );
+            String[] criterion = c.split( DimensionalObjectUtils.DIMENSION_NAME_SEP );
             
             if ( criterion != null && criterion.length == 2 && MathUtils.isNumeric( criterion[1] ) )
             {

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-03-17 12:07:44 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-03-17 12:11:20 +0000
@@ -30,7 +30,6 @@
 
 import static org.hisp.dhis.analytics.AnalyticsService.NAMES_META_KEY;
 import static org.hisp.dhis.analytics.AnalyticsService.OU_HIERARCHY_KEY;
-import static org.hisp.dhis.analytics.DataQueryParams.DIMENSION_NAME_SEP;
 import static org.hisp.dhis.common.DimensionalObject.ORGUNIT_DIM_ID;
 import static org.hisp.dhis.common.DimensionalObject.PERIOD_DIM_ID;
 import static org.hisp.dhis.common.IdentifiableObjectUtils.getUids;
@@ -401,13 +400,13 @@
     {
         List<QueryItem> items = new ArrayList<QueryItem>();
 
-        if ( !dimension.contains( DIMENSION_NAME_SEP ) )
+        if ( !dimension.contains( DimensionalObjectUtils.DIMENSION_NAME_SEP ) )
         {
             items.add( getItem( program, dimension, null, null ) );
         }
         else // Filter
         {
-            String[] split = dimension.split( DIMENSION_NAME_SEP );
+            String[] split = dimension.split( DimensionalObjectUtils.DIMENSION_NAME_SEP );
 
             if ( split == null || split.length != 3 )
             {