← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17564: removed unused file / imports

 

------------------------------------------------------------
revno: 17564
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-11-21 20:25:22 +0700
message:
  removed unused file / imports
removed:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/cross2dxf2.xsl
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.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/DataValueSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.java	2014-11-10 14:05:42 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataValueSetController.java	2014-11-21 13:25:22 +0000
@@ -28,17 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_CSV;
-import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_JSON;
-import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.dxf2.datavalueset.DataValueSetService;
@@ -46,7 +35,6 @@
 import org.hisp.dhis.dxf2.metadata.ExportOptions;
 import org.hisp.dhis.dxf2.metadata.ImportOptions;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -58,21 +46,25 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Set;
+
+import static org.hisp.dhis.webapi.utils.ContextUtils.*;
+
 @Controller
 @RequestMapping( value = DataValueSetController.RESOURCE_PATH )
 public class DataValueSetController
 {
     public static final String RESOURCE_PATH = "/dataValueSets";
-    public static final String SDMXCROSS2DXF2_TRANSFORM = "/templates/cross2dxf2.xsl";
 
     private static final Log log = LogFactory.getLog( DataValueSetController.class );
 
     @Autowired
     private DataValueSetService dataValueSetService;
 
-    @Autowired
-    private OrganisationUnitService organisationUnitService;
-
     // -------------------------------------------------------------------------
     // Get
     // -------------------------------------------------------------------------
@@ -104,7 +96,7 @@
         else
         {
             log.info( "Get XML bulk data value set for start date: " + startDate + ", end date: " + endDate );
-            
+
             dataValueSetService.writeDataValueSetXml( dataSet, startDate, endDate, orgUnit, children, response.getOutputStream(), exportOptions );
         }
     }
@@ -136,7 +128,7 @@
         else
         {
             log.info( "Get JSON bulk data value set for start date: " + startDate + ", end date: " + endDate );
-            
+
             dataValueSetService.writeDataValueSetJson( dataSet, startDate, endDate, orgUnit, children, response.getOutputStream(), exportOptions );
         }
     }
@@ -153,7 +145,7 @@
         HttpServletResponse response ) throws IOException
     {
         response.setContentType( CONTENT_TYPE_CSV );
-        
+
         boolean isSingleDataValueSet = dataSet.size() == 1 && period != null && orgUnit.size() == 1;
 
         if ( isSingleDataValueSet )
@@ -168,9 +160,9 @@
         else
         {
             log.info( "Get CSV bulk data value set for start date: " + startDate + ", end date: " + endDate );
-            
+
             dataValueSetService.writeDataValueSetCsv( dataSet, startDate, endDate, orgUnit, children, response.getWriter(), exportOptions );
-        }        
+        }
     }
 
     // -------------------------------------------------------------------------

=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/cross2dxf2.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/cross2dxf2.xsl	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/cross2dxf2.xsl	1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-  xmlns:d="http://dhis2.org/schema/dxf/2.0";
-  version="1.0">
-
-  <xsl:output method="xml" indent="yes" />
-
-  <xsl:template match="/">
-    <xsl:for-each select="//*[local-name()='DataSet']">
-      <d:dataValueSet period='{@TIME_PERIOD}'
-        orgUnitIdScheme='code'
-        dataElementIdScheme='code'
-        dataSet='{@datasetID}'
-        orgUnit='{@FACILITY}'>
-        <xsl:apply-templates />
-      </d:dataValueSet>
-    </xsl:for-each>
-  </xsl:template>
-
-  <xsl:template match='*[local-name()="OBS_VALUE"]'>
-    <xsl:element name="d:dataValue">
-      <xsl:attribute name="dataElement">
-        <xsl:value-of select="@DATAELEMENT" />
-      </xsl:attribute>
-      <xsl:if test="@DISAGG">
-        <xsl:attribute name="categoryOptionCombo">
-          <xsl:value-of select="@DISAGG" />
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:attribute name="value">
-        <xsl:value-of select="@value" />
-      </xsl:attribute>
-    </xsl:element>
-
-  </xsl:template>
-</xsl:stylesheet>