=== modified file 'dhis-2/dhis-web/dhis-web-api/pom.xml'
--- dhis-2/dhis-web/dhis-web-api/pom.xml 2011-12-26 09:25:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/pom.xml 2012-01-24 13:28:00 +0000
@@ -58,10 +58,6 @@
org.springframework
spring-oxm
-
- org.apache.xmlgraphics
- fop
-
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCache.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCache.java 2011-12-03 14:35:34 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCache.java 2012-01-24 13:28:00 +0000
@@ -43,14 +43,5 @@
* @throws TransformerConfigurationException
*/
Transformer getHtmlTransformer()
- throws TransformerConfigurationException;
-
- /**
- * A transformer for rendering elements to xsl-fop
- *
- * @return the transformer
- * @throws TransformerConfigurationException
- */
- Transformer getFopTransformer()
throws TransformerConfigurationException;
}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCacheImpl.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCacheImpl.java 2011-12-13 14:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/TransformCacheImpl.java 2012-01-24 13:28:00 +0000
@@ -30,6 +30,7 @@
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
+
import javax.xml.transform.ErrorListener;
import javax.xml.transform.Source;
import javax.xml.transform.Templates;
@@ -37,6 +38,7 @@
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamSource;
+
import org.amplecode.staxwax.transformer.LoggingErrorListener;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Component;
@@ -52,18 +54,12 @@
{
static final String MODEL2HTML = "model2html.xsl";
- static final String MODEL2FOP = "model2fop.xsl";
-
static final String HTMLXSLT_RESOURCE = "/templates/html/";
- static final String FOPXSLT_RESOURCE = "/templates/pdf/";
-
static private TransformCache instance;
private Templates htmlCachedTransform;
- private Templates fopCachedTransform;
-
private TransformCacheImpl()
throws IOException, TransformerConfigurationException
{
@@ -73,12 +69,9 @@
factory.setErrorListener( errorListener );
Source model2html = new StreamSource( new ClassPathResource( HTMLXSLT_RESOURCE + MODEL2HTML ).getInputStream() );
- Source model2fop = new StreamSource( new ClassPathResource( FOPXSLT_RESOURCE + MODEL2FOP ).getInputStream() );
factory.setURIResolver( new ClassPathUriResolver( HTMLXSLT_RESOURCE ) );
htmlCachedTransform = factory.newTemplates( model2html );
- factory.setURIResolver( new ClassPathUriResolver( FOPXSLT_RESOURCE ) );
- fopCachedTransform = factory.newTemplates( model2fop );
}
protected static TransformCache instance()
@@ -103,11 +96,4 @@
{
return htmlCachedTransform.newTransformer();
}
-
- @Override
- public Transformer getFopTransformer()
- throws TransformerConfigurationException
- {
- return fopCachedTransform.newTransformer();
- }
}
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/XslFoPdfView.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/XslFoPdfView.java 2011-12-03 14:35:34 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/view/XslFoPdfView.java 1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
-package org.hisp.dhis.api.view;
-
-/*
- * Copyright (c) 2004-2011, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.apache.fop.apps.Fop;
-import org.apache.fop.apps.FopFactory;
-import org.apache.xmlgraphics.util.MimeConstants;
-import org.springframework.web.servlet.view.AbstractUrlBasedView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.util.JAXBSource;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.sax.SAXResult;
-import java.util.Map;
-
-/**
- * @author Morten Olav Hansen
- */
-public class XslFoPdfView extends AbstractUrlBasedView
-{
- public static final String PDF_CONTENT_TYPE = "application/pdf";
-
- public XslFoPdfView()
- {
- setContentType( PDF_CONTENT_TYPE );
- }
-
- @Override
- protected void renderMergedOutputModel( Map model, HttpServletRequest request, HttpServletResponse response ) throws Exception
- {
- response.setContentType( getContentType() );
- model = ViewUtils.filterModel( model );
-
- Object domainModel = model.get( "model" );
-
- if ( domainModel == null )
- {
- // throw exception
- }
-
- JAXBContext context = JAXBContext.newInstance( domainModel.getClass() );
- Marshaller marshaller = context.createMarshaller();
- marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, false );
- marshaller.setProperty( Marshaller.JAXB_ENCODING, "UTF-8" );
-
- Source xmlSource = new JAXBSource( context, domainModel );
-
- Transformer transformer = TransformCacheImpl.instance().getFopTransformer();
-
- FopFactory fopFactory = FopFactory.newInstance();
- Fop fop = fopFactory.newFop( MimeConstants.MIME_PDF, response.getOutputStream() );
-
- Result result = new SAXResult( fop.getDefaultHandler() );
- transformer.transform( xmlSource, result );
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2012-01-05 20:39:23 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/META-INF/dhis/servlet.xml 2012-01-24 13:28:00 +0000
@@ -22,7 +22,6 @@
-
@@ -47,14 +46,6 @@
-
-
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl 2011-12-21 13:29:45 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl 2012-01-24 13:28:00 +0000
@@ -9,7 +9,6 @@
xml |
json |
jsonp |
-
=== removed directory 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf'
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl 2011-12-19 14:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
- ID
-
-
-
- Code
-
-
-
- Last Updated
-
-
-
-
-
-
-
-
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 2011-12-19 14:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 1970-01-01 00:00:00 +0000
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl 2011-12-07 14:04:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/model2fop.xsl 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl 2011-12-19 14:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DataElements
-
-
-
-
-
-
-
-
-
=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml 2012-01-22 05:29:27 +0000
+++ dhis-2/pom.xml 2012-01-24 13:28:00 +0000
@@ -770,13 +770,6 @@
2.2.2
-
-
- org.apache.xmlgraphics
- fop
- 1.0
-
-