← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15565: minor indent fix

 

------------------------------------------------------------
revno: 15565
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-06-06 09:44:34 +0200
message:
  minor indent fix
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.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/common/BaseAnalyticalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2014-06-06 07:40:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java	2014-06-06 07:44:34 +0000
@@ -802,10 +802,10 @@
     // -------------------------------------------------------------------------
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseNameableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "indicators", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "indicator", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseNameableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "indicators", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "indicator", namespace = DxfNamespaces.DXF_2_0 )
     public List<Indicator> getIndicators()
     {
         return indicators;
@@ -817,10 +817,10 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseNameableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "dataElements", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "dataElement", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseNameableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "dataElements", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "dataElement", namespace = DxfNamespaces.DXF_2_0 )
     public List<DataElement> getDataElements()
     {
         return dataElements;
@@ -832,10 +832,10 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseIdentifiableObject.class)
-    @JsonView(DetailedView.class)
-    @JacksonXmlElementWrapper(localName = "dataElementOperands", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "dataElementOperand", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonView( DetailedView.class )
+    @JacksonXmlElementWrapper( localName = "dataElementOperands", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "dataElementOperand", namespace = DxfNamespaces.DXF_2_0 )
     public List<DataElementOperand> getDataElementOperands()
     {
         return dataElementOperands;
@@ -847,10 +847,10 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseNameableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "dataSets", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "dataSet", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseNameableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "dataSets", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "dataSet", namespace = DxfNamespaces.DXF_2_0 )
     public List<DataSet> getDataSets()
     {
         return dataSets;
@@ -862,10 +862,10 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentAs = BaseNameableObject.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentAs = BaseNameableObject.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "organisationUnits", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "organisationUnit", namespace = DxfNamespaces.DXF_2_0 )
     public List<OrganisationUnit> getOrganisationUnits()
     {
         return organisationUnits;
@@ -877,11 +877,11 @@
     }
 
     @JsonProperty
-    @JsonSerialize(contentUsing = JacksonPeriodSerializer.class)
-    @JsonDeserialize(contentUsing = JacksonPeriodDeserializer.class)
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "periods", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "period", namespace = DxfNamespaces.DXF_2_0)
+    @JsonSerialize( contentUsing = JacksonPeriodSerializer.class )
+    @JsonDeserialize( contentUsing = JacksonPeriodDeserializer.class )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "periods", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "period", namespace = DxfNamespaces.DXF_2_0 )
     public List<Period> getPeriods()
     {
         return periods;
@@ -892,9 +892,9 @@
         this.periods = periods;
     }
 
-    @JsonProperty(value = "relativePeriods")
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonProperty( value = "relativePeriods" )
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public RelativePeriods getRelatives()
     {
         return relatives;
@@ -916,9 +916,9 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "dataElementGroups", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "dataElementGroup", namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "dataElementGroups", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "dataElementGroup", namespace = DxfNamespaces.DXF_2_0 )
     public List<DataElementGroup> getDataElementGroups()
     {
         return dataElementGroups;
@@ -930,9 +930,9 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "organisationUnitGroup", namespace = DxfNamespaces.DXF_2_0 )
     public List<OrganisationUnitGroup> getOrganisationUnitGroups()
     {
         return organisationUnitGroups;
@@ -975,8 +975,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isUserOrganisationUnit()
     {
         return userOrganisationUnit;
@@ -988,8 +988,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isUserOrganisationUnitChildren()
     {
         return userOrganisationUnitChildren;
@@ -1001,8 +1001,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isUserOrganisationUnitGrandChildren()
     {
         return userOrganisationUnitGrandChildren;
@@ -1014,9 +1014,9 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "organisationUnitLevels", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "organisationUnitLevel", namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "organisationUnitLevels", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "organisationUnitLevel", namespace = DxfNamespaces.DXF_2_0 )
     public List<Integer> getOrganisationUnitLevels()
     {
         return organisationUnitLevels;
@@ -1028,9 +1028,9 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class })
-    @JacksonXmlElementWrapper(localName = "itemOrganisationUnitGroups", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "itemOrganisationUnitGroup", namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class } )
+    @JacksonXmlElementWrapper( localName = "itemOrganisationUnitGroups", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "itemOrganisationUnitGroup", namespace = DxfNamespaces.DXF_2_0 )
     public List<OrganisationUnitGroup> getItemOrganisationUnitGroups()
     {
         return itemOrganisationUnitGroups;
@@ -1042,8 +1042,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class, DimensionalView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public boolean isRewindRelativePeriods()
     {
         return rewindRelativePeriods;
@@ -1055,8 +1055,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class, DimensionalView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getDigitGroupSeparator()
     {
         return digitGroupSeparator;
@@ -1068,8 +1068,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class, DimensionalView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public int getSortOrder()
     {
         return sortOrder;
@@ -1081,8 +1081,8 @@
     }
 
     @JsonProperty
-    @JsonView({ DetailedView.class, ExportView.class, DimensionalView.class })
-    @JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
+    @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public int getTopLimit()
     {
         return topLimit;
@@ -1120,11 +1120,11 @@
     // -------------------------------------------------------------------------
 
     @JsonProperty
-    @JsonDeserialize(contentAs = BaseDimensionalObject.class)
-    @JsonSerialize(contentAs = BaseDimensionalObject.class)
-    @JsonView({ DimensionalView.class })
-    @JacksonXmlElementWrapper(localName = "columns", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "column", namespace = DxfNamespaces.DXF_2_0)
+    @JsonDeserialize( contentAs = BaseDimensionalObject.class )
+    @JsonSerialize( contentAs = BaseDimensionalObject.class )
+    @JsonView( { DimensionalView.class } )
+    @JacksonXmlElementWrapper( localName = "columns", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "column", namespace = DxfNamespaces.DXF_2_0 )
     public List<DimensionalObject> getColumns()
     {
         return columns;
@@ -1136,11 +1136,11 @@
     }
 
     @JsonProperty
-    @JsonDeserialize(contentAs = BaseDimensionalObject.class)
-    @JsonSerialize(contentAs = BaseDimensionalObject.class)
-    @JsonView({ DimensionalView.class })
-    @JacksonXmlElementWrapper(localName = "rows", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "row", namespace = DxfNamespaces.DXF_2_0)
+    @JsonDeserialize( contentAs = BaseDimensionalObject.class )
+    @JsonSerialize( contentAs = BaseDimensionalObject.class )
+    @JsonView( { DimensionalView.class } )
+    @JacksonXmlElementWrapper( localName = "rows", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "row", namespace = DxfNamespaces.DXF_2_0 )
     public List<DimensionalObject> getRows()
     {
         return rows;
@@ -1152,11 +1152,11 @@
     }
 
     @JsonProperty
-    @JsonDeserialize(contentAs = BaseDimensionalObject.class)
-    @JsonSerialize(contentAs = BaseDimensionalObject.class)
-    @JsonView({ DimensionalView.class })
-    @JacksonXmlElementWrapper(localName = "filters", namespace = DxfNamespaces.DXF_2_0)
-    @JacksonXmlProperty(localName = "filter", namespace = DxfNamespaces.DXF_2_0)
+    @JsonDeserialize( contentAs = BaseDimensionalObject.class )
+    @JsonSerialize( contentAs = BaseDimensionalObject.class )
+    @JsonView( { DimensionalView.class } )
+    @JacksonXmlElementWrapper( localName = "filters", namespace = DxfNamespaces.DXF_2_0 )
+    @JacksonXmlProperty( localName = "filter", namespace = DxfNamespaces.DXF_2_0 )
     public List<DimensionalObject> getFilters()
     {
         return filters;
@@ -1168,7 +1168,7 @@
     }
 
     @JsonProperty
-    @JsonView({ DimensionalView.class })
+    @JsonView( { DimensionalView.class } )
     public Map<String, String> getParentGraphMap()
     {
         return parentGraphMap;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-04-21 11:05:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-06-06 07:44:34 +0000
@@ -28,11 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.common.view.DimensionalView;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonView;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -40,8 +35,12 @@
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-
-@JacksonXmlRootElement( localName = "dimensionalObject", namespace = DxfNamespaces.DXF_2_0)
+import org.hisp.dhis.common.view.DimensionalView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@JacksonXmlRootElement( localName = "dimensionalObject", namespace = DxfNamespaces.DXF_2_0 )
 public class BaseDimensionalObject
     extends BaseNameableObject implements DimensionalObject
 {
@@ -61,27 +60,27 @@
      * The dimensional items for this dimension.
      */
     private List<NameableObject> items = new ArrayList<NameableObject>();
-    
+
     /**
      * Filter. Applicable for events. Contains operator and filter on this format:
      * <operator>:<filter>;<operator>:<filter>
      * Operator and filter pairs can be repeated any number of times.
      */
     private String filter;
-    
+
     //--------------------------------------------------------------------------
     // Constructors
     //--------------------------------------------------------------------------
 
     public BaseDimensionalObject()
-    {        
+    {
     }
 
     public BaseDimensionalObject( String dimension )
     {
         this.uid = dimension;
     }
-    
+
     public BaseDimensionalObject( String dimension, List<? extends NameableObject> items )
     {
         this.uid = dimension;
@@ -124,7 +123,7 @@
     // -------------------------------------------------------------------------
     // Logic
     // -------------------------------------------------------------------------
-    
+
     /**
      * Indicates whether this dimension should use all dimension items. All
      * dimension options is represented as an option list of zero elements.
@@ -141,7 +140,7 @@
     {
         return items != null && !items.isEmpty();
     }
-    
+
     /**
      * Returns dimension name with fall back to dimension.
      */
@@ -149,13 +148,13 @@
     {
         return dimensionName != null ? dimensionName : uid;
     }
-        
+
     //--------------------------------------------------------------------------
     // Getters and setters
     //--------------------------------------------------------------------------
 
     @JsonProperty
-    @JsonView( {DimensionalView.class} )
+    @JsonView( { DimensionalView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getDimension()
     {
@@ -168,7 +167,7 @@
     }
 
     @JsonProperty
-    @JsonView( {DimensionalView.class} )
+    @JsonView( { DimensionalView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public DimensionType getDimensionType()
     {
@@ -199,7 +198,7 @@
 
     @Override
     @JsonProperty
-    @JsonView( {DimensionalView.class} )
+    @JsonView( { DimensionalView.class } )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
     public String getFilter()
     {
@@ -218,6 +217,6 @@
     @Override
     public String toString()
     {
-        return "[" + uid + ", type: " + dimensionType  + ", " + items + "]";
+        return "[" + uid + ", type: " + dimensionType + ", " + items + "]";
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-06-06 07:40:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java	2014-06-06 07:44:34 +0000
@@ -28,14 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.dataset.DataSet.NO_EXPIRY;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.attribute.AttributeValue;
 import org.hisp.dhis.common.BaseDimensionalObject;
 import org.hisp.dhis.common.BaseIdentifiableObject;
@@ -50,12 +48,13 @@
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.period.YearlyPeriodType;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import static org.hisp.dhis.dataset.DataSet.NO_EXPIRY;
 
 /**
  * A DataElement is a definition (meta-information about) of the entities that