You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/12/24 00:32:20 UTC

svn commit: r358882 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: apps/Fop.java fo/Constants.java

Author: jeremias
Date: Fri Dec 23 15:32:13 2005
New Revision: 358882

URL: http://svn.apache.org/viewcvs?rev=358882&view=rev
Log:
Merge from Branch fop-0_91:
Deprecated Fop constructors that use the integer constants for output format selection removed as discussed.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java?rev=358882&r1=358881&r2=358882&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/apps/Fop.java Fri Dec 23 15:32:13 2005
@@ -47,9 +47,6 @@
  */
 public class Fop implements Constants {
 
-    // desired output type: RENDER_PDF, RENDER_PS, etc.
-    //private int renderType = NOT_SET;
-    
     // desired output format: MIME type such as "application/pdf", "application/postscript" etc.
     private String outputFormat = null;
 
@@ -86,66 +83,6 @@
         this(outputFormat, null);
     }
 
-    /**
-     * Constructor for use with already-created FOUserAgents
-     * @param renderType the type of renderer to use.  Must be one of
-     * <ul>
-     * <li>Fop.RENDER_PDF</li>
-     * <li>Fop.RENDER_AWT</li>
-     * <li>Fop.RENDER_PRINT</li>
-     * <li>Fop.RENDER_MIF</li>
-     * <li>Fop.RENDER_XML</li>
-     * <li>Fop.RENDER_PCL</li>
-     * <li>Fop.RENDER_PS</li>
-     * <li>Fop.RENDER_TXT</li>
-     * <li>Fop.RENDER_SVG</li>
-     * <li>Fop.RENDER_RTF</li>
-     * <li>Fop.RENDER_TIFF</li>
-     * <li>Fop.RENDER_PNG</li>
-     * </ul>
-     * @param ua FOUserAgent object
-     * @deprecated Use {@link org.apache.fop.apps.Fop#Fop(java.lang.String, FOUserAgent)} instead!
-     *             This constructor will be removed.
-     */
-    public Fop(int renderType, FOUserAgent ua) {
-        this(getMimeTypeForRenderType(renderType), ua);
-    }
-
-    /**
-     * Constructor that creates a default FOUserAgent
-     * @see org.apache.fop.apps.Fop#Fop(int, FOUserAgent)
-     * @deprecated Use {@link org.apache.fop.apps.Fop#Fop(java.lang.String)} instead!
-     *             This constructor will be removed.
-     */
-    public Fop(int renderType) {
-        this(renderType, null);
-    }
-
-    private static String getMimeTypeForRenderType(int renderType) {
-        switch(renderType) {
-        case Constants.RENDER_PDF: return MimeConstants.MIME_PDF;
-        case Constants.RENDER_PS: return MimeConstants.MIME_POSTSCRIPT;
-        case Constants.RENDER_PCL: return MimeConstants.MIME_PCL;
-        case Constants.RENDER_MIF: return MimeConstants.MIME_MIF;
-        case Constants.RENDER_RTF: return MimeConstants.MIME_RTF;
-        case Constants.RENDER_SVG: return MimeConstants.MIME_SVG;
-        case Constants.RENDER_TXT: return MimeConstants.MIME_PLAIN_TEXT;
-
-        //Bitmap formats
-        case Constants.RENDER_PNG: return MimeConstants.MIME_PNG;
-        case Constants.RENDER_TIFF: return MimeConstants.MIME_TIFF;
-        
-        //Area tree XML: FOP-specific
-        case Constants.RENDER_XML: return MimeConstants.MIME_FOP_AREA_TREE;
-        
-        //Non-standard pseudo MIME types
-        case Constants.RENDER_AWT: return MimeConstants.MIME_FOP_AWT_PREVIEW;
-        case Constants.RENDER_PRINT: return MimeConstants.MIME_FOP_PRINT;
-        default:
-            throw new IllegalArgumentException("Illegal renderType value: " + renderType);
-        }
-    }
-    
     /**
      * Get the FOUserAgent instance for this process
      * @return the user agent

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java?rev=358882&r1=358881&r2=358882&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/Constants.java Fri Dec 23 15:32:13 2005
@@ -30,44 +30,15 @@
  */
 public interface Constants {
 
-    /* These constants are used by apps.CommandLineOptions and
-       apps.Fop to describe the input (either .FO or .XML/.XSL)
-       and desired output (PDF, PS, AWT, etc.) of the document */
+    /* These constants are used by apps.CommandLineOptions 
+       to describe the input (either .FO or .XML/.XSL) */
        
-    /** render constants for bounds checking */
-    int RENDER_MIN_CONST = 1;
-    /** render constants for bounds checking */
-    int RENDER_MAX_CONST = 12;
-    /** input / output not set */
+    /** (input) not set */
     int NOT_SET = 0;
     /** input: fo file */
     int FO_INPUT = 1;
     /** input: xml+xsl file */
     int XSLT_INPUT = 2;
-    /** output: pdf file */
-    int RENDER_PDF = 1;
-    /** output: screen using swing */
-    int RENDER_AWT = 2;
-    /** output: mif file */
-    int RENDER_MIF = 3;
-    /** output: sent swing rendered file to printer */
-    int RENDER_PRINT = 4;
-    /** output: pcl file */
-    int RENDER_PCL = 5;
-    /** output: postscript file */
-    int RENDER_PS = 6;
-    /** output: text file */
-    int RENDER_TXT = 7;
-    /** output: svg file */
-    int RENDER_SVG = 8;
-    /** output: XML area tree */
-    int RENDER_XML = 9;
-    /** output: RTF file */
-    int RENDER_RTF = 10;
-    /** output: TIFF file */
-    int RENDER_TIFF = 11;
-    /** output: PNG file */
-    int RENDER_PNG = 12;
 
     // element constants
     /** FObj base class */



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org