From: Simon Pepping Date: Fri, 19 Nov 2010 11:25:15 +0000 (+0000) Subject: Reverting renaming of public methods of rev. 1036179 X-Git-Tag: fop-1_1rc1old~406 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bf82c8fb0162ff0c8f31092b73756746b424c3a4;p=xmlgraphics-fop.git Reverting renaming of public methods of rev. 1036179 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1036809 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/examples/embedding/java/embedding/ExampleFO2PDF.java b/examples/embedding/java/embedding/ExampleFO2PDF.java index 20d27c128..6ae674908 100644 --- a/examples/embedding/java/embedding/ExampleFO2PDF.java +++ b/examples/embedding/java/embedding/ExampleFO2PDF.java @@ -94,8 +94,8 @@ public class ExampleFO2PDF { for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) { PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next(); System.out.println("PageSequence " - + (String.valueOf(pageSequenceResults.getId()).length() > 0 - ? pageSequenceResults.getId() : "") + + (String.valueOf(pageSequenceResults.getID()).length() > 0 + ? pageSequenceResults.getID() : "") + " generated " + pageSequenceResults.getPageCount() + " pages."); } System.out.println("Generated " + foResults.getPageCount() + " pages in total."); diff --git a/examples/embedding/java/embedding/MultipleFO2PDF.java b/examples/embedding/java/embedding/MultipleFO2PDF.java index 0da9ae14c..a9ace7cf0 100644 --- a/examples/embedding/java/embedding/MultipleFO2PDF.java +++ b/examples/embedding/java/embedding/MultipleFO2PDF.java @@ -147,8 +147,8 @@ public class MultipleFO2PDF { for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) { PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next(); System.out.println("PageSequence " - + (String.valueOf(pageSequenceResults.getId()).length() > 0 - ? pageSequenceResults.getId() : "") + + (String.valueOf(pageSequenceResults.getID()).length() > 0 + ? pageSequenceResults.getID() : "") + " generated " + pageSequenceResults.getPageCount() + " pages."); } System.out.println("Generated " + foResults.getPageCount() + " pages in total."); diff --git a/src/java/org/apache/fop/apps/PageSequenceResults.java b/src/java/org/apache/fop/apps/PageSequenceResults.java index f94fe8fdb..241f4a5f9 100644 --- a/src/java/org/apache/fop/apps/PageSequenceResults.java +++ b/src/java/org/apache/fop/apps/PageSequenceResults.java @@ -44,7 +44,7 @@ public class PageSequenceResults { * * @return The ID */ - public String getId() { + public String getID() { return this.id; } diff --git a/src/java/org/apache/fop/area/BlockParent.java b/src/java/org/apache/fop/area/BlockParent.java index f2cf01cf2..18f9056da 100644 --- a/src/java/org/apache/fop/area/BlockParent.java +++ b/src/java/org/apache/fop/area/BlockParent.java @@ -27,9 +27,6 @@ import java.util.List; */ public class BlockParent extends Area { - /** - * - */ private static final long serialVersionUID = 7076916890348533805L; // this position is used for absolute position diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java index eff7b76f0..2a5c0d272 100644 --- a/src/java/org/apache/fop/cli/CommandLineOptions.java +++ b/src/java/org/apache/fop/cli/CommandLineOptions.java @@ -89,23 +89,23 @@ public class CommandLineOptions { /* user configuration file */ private File userConfigFile = null; /* input fo file */ - private File foFile = null; + private File fofile = null; /* xsltfile (xslt transformation as input) */ - private File xsltFile = null; + private File xsltfile = null; /* xml file (xslt transformation as input) */ - private File xmlFile = null; + private File xmlfile = null; /* area tree input file */ - private File areatreeFile = null; + private File areatreefile = null; /* intermediate format input file */ - private File ifFile = null; + private File iffile = null; /* area tree input file */ - private File imageFile = null; + private File imagefile = null; /* output file */ - private File outFile = null; + private File outfile = null; /* input mode */ - private int inputMode = NOT_SET; + private int inputmode = NOT_SET; /* output mode */ - private String outputMode = null; + private String outputmode = null; /* true if System.in (stdin) should be used for the input file */ private boolean useStdIn = false; /* true if System.out (stdout) should be used for the output file */ @@ -194,7 +194,7 @@ public class CommandLineOptions { inputHandler = createInputHandler(); - if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputMode)) { + if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputmode)) { //set the system look&feel for the preview dialog try { UIManager.setLookAndFeel( @@ -207,7 +207,7 @@ public class CommandLineOptions { renderer.setRenderable(inputHandler); //set before user agent! renderer.setUserAgent(foUserAgent); foUserAgent.setRendererOverride(renderer); - } else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputMode) + } else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputmode) && mimicRenderer != null) { // render from FO to Intermediate Format Renderer targetRenderer = foUserAgent.getRendererFactory().createRenderer( @@ -220,7 +220,7 @@ public class CommandLineOptions { //Make sure the prepared XMLRenderer is used foUserAgent.setRendererOverride(xmlRenderer); - } else if (MimeConstants.MIME_FOP_IF.equals(outputMode) + } else if (MimeConstants.MIME_FOP_IF.equals(outputmode) && mimicRenderer != null) { // render from FO to Intermediate Format IFSerializer serializer = new IFSerializer(); @@ -447,7 +447,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - foFile = new File(filename); + fofile = new File(filename); } return 1; } @@ -460,7 +460,7 @@ public class CommandLineOptions { throw new FOPException("you must specify the stylesheet " + "file for the '-xsl' option"); } else { - xsltFile = new File(args[i + 1]); + xsltfile = new File(args[i + 1]); return 1; } } @@ -476,7 +476,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - xmlFile = new File(filename); + xmlfile = new File(filename); } return 1; } @@ -508,7 +508,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdOut = true; } else { - outFile = new File(filename); + outfile = new File(filename); } } @@ -701,16 +701,16 @@ public class CommandLineOptions { } private int parseUnknownOption(String[] args, int i) throws FOPException { - if (inputMode == NOT_SET) { - inputMode = FO_INPUT; + if (inputmode == NOT_SET) { + inputmode = FO_INPUT; String filename = args[i]; if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - foFile = new File(filename); + fofile = new File(filename); } - } else if (outputMode == null) { - outputMode = MimeConstants.MIME_PDF; + } else if (outputmode == null) { + outputmode = MimeConstants.MIME_PDF; setOutputFile(args[i]); } else { throw new FOPException("Don't know what to do with " @@ -765,7 +765,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - areatreeFile = new File(filename); + areatreefile = new File(filename); } return 1; } @@ -781,7 +781,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - ifFile = new File(filename); + iffile = new File(filename); } return 1; } @@ -797,7 +797,7 @@ public class CommandLineOptions { if (isSystemInOutFile(filename)) { this.useStdIn = true; } else { - imageFile = new File(filename); + imagefile = new File(filename); } return 1; } @@ -867,8 +867,8 @@ public class CommandLineOptions { } private void setOutputMode(String mime) throws FOPException { - if (outputMode == null) { - outputMode = mime; + if (outputmode == null) { + outputmode = mime; } else { throw new FOPException("you can only set one output method"); } @@ -896,8 +896,8 @@ public class CommandLineOptions { } private void setInputFormat(int format) throws FOPException { - if (inputMode == NOT_SET || inputMode == format) { - inputMode = format; + if (inputmode == NOT_SET || inputmode == format) { + inputmode = format; } else { throw new FOPException("Only one input mode can be specified!"); } @@ -907,100 +907,100 @@ public class CommandLineOptions { * checks whether all necessary information has been given in a consistent way */ private void checkSettings() throws FOPException, FileNotFoundException { - if (inputMode == NOT_SET) { + if (inputmode == NOT_SET) { throw new FOPException("No input file specified"); } - if (outputMode == null) { + if (outputmode == null) { throw new FOPException("No output file specified"); } - if ((outputMode.equals(MimeConstants.MIME_FOP_AWT_PREVIEW) - || outputMode.equals(MimeConstants.MIME_FOP_PRINT)) - && outFile != null) { + if ((outputmode.equals(MimeConstants.MIME_FOP_AWT_PREVIEW) + || outputmode.equals(MimeConstants.MIME_FOP_PRINT)) + && outfile != null) { throw new FOPException("Output file may not be specified " + "for AWT or PRINT output"); } - if (inputMode == XSLT_INPUT) { + if (inputmode == XSLT_INPUT) { // check whether xml *and* xslt file have been set - if (xmlFile == null && !this.useStdIn) { + if (xmlfile == null && !this.useStdIn) { throw new FOPException("XML file must be specified for the transform mode"); } - if (xsltFile == null) { + if (xsltfile == null) { throw new FOPException("XSLT file must be specified for the transform mode"); } // warning if fofile has been set in xslt mode - if (foFile != null) { + if (fofile != null) { log.warn("Can't use fo file with transform mode! Ignoring.\n" + "Your input is " + "\n xmlfile: " - + xmlFile.getAbsolutePath() + + xmlfile.getAbsolutePath() + "\nxsltfile: " - + xsltFile.getAbsolutePath() + + xsltfile.getAbsolutePath() + "\n fofile: " - + foFile.getAbsolutePath()); + + fofile.getAbsolutePath()); } - if (xmlFile != null && !xmlFile.exists()) { + if (xmlfile != null && !xmlfile.exists()) { throw new FileNotFoundException("Error: xml file " - + xmlFile.getAbsolutePath() + + xmlfile.getAbsolutePath() + " not found "); } - if (!xsltFile.exists()) { + if (!xsltfile.exists()) { throw new FileNotFoundException("Error: xsl file " - + xsltFile.getAbsolutePath() + + xsltfile.getAbsolutePath() + " not found "); } - } else if (inputMode == FO_INPUT) { - if (outputMode.equals(MimeConstants.MIME_XSL_FO)) { + } else if (inputmode == FO_INPUT) { + if (outputmode.equals(MimeConstants.MIME_XSL_FO)) { throw new FOPException( "FO output mode is only available if you use -xml and -xsl"); } - if (foFile != null && !foFile.exists()) { + if (fofile != null && !fofile.exists()) { throw new FileNotFoundException("Error: fo file " - + foFile.getAbsolutePath() + + fofile.getAbsolutePath() + " not found "); } - } else if (inputMode == AREATREE_INPUT) { - if (outputMode.equals(MimeConstants.MIME_XSL_FO)) { + } else if (inputmode == AREATREE_INPUT) { + if (outputmode.equals(MimeConstants.MIME_XSL_FO)) { throw new FOPException( "FO output mode is only available if you use -xml and -xsl"); - } else if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { + } else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { throw new FOPException( "Area Tree Output is not available if Area Tree is used as input!"); } - if (areatreeFile != null && !areatreeFile.exists()) { + if (areatreefile != null && !areatreefile.exists()) { throw new FileNotFoundException("Error: area tree file " - + areatreeFile.getAbsolutePath() + + areatreefile.getAbsolutePath() + " not found "); } - } else if (inputMode == IF_INPUT) { - if (outputMode.equals(MimeConstants.MIME_XSL_FO)) { + } else if (inputmode == IF_INPUT) { + if (outputmode.equals(MimeConstants.MIME_XSL_FO)) { throw new FOPException( "FO output mode is only available if you use -xml and -xsl"); - } else if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { + } else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { throw new FOPException( "Area Tree Output is not available if Intermediate Format" + " is used as input!"); - } else if (outputMode.equals(MimeConstants.MIME_FOP_IF)) { + } else if (outputmode.equals(MimeConstants.MIME_FOP_IF)) { throw new FOPException( "Intermediate Output is not available if Intermediate Format" + " is used as input!"); } - if (ifFile != null && !ifFile.exists()) { + if (iffile != null && !iffile.exists()) { throw new FileNotFoundException("Error: intermediate format file " - + ifFile.getAbsolutePath() + + iffile.getAbsolutePath() + " not found "); } - } else if (inputMode == IMAGE_INPUT) { - if (outputMode.equals(MimeConstants.MIME_XSL_FO)) { + } else if (inputmode == IMAGE_INPUT) { + if (outputmode.equals(MimeConstants.MIME_XSL_FO)) { throw new FOPException( "FO output mode is only available if you use -xml and -xsl"); } - if (imageFile != null && !imageFile.exists()) { + if (imagefile != null && !imagefile.exists()) { throw new FileNotFoundException("Error: image file " - + imageFile.getAbsolutePath() + + imagefile.getAbsolutePath() + " not found "); } } @@ -1027,13 +1027,13 @@ public class CommandLineOptions { * @throws FOPException for invalid output formats */ protected String getOutputFormat() throws FOPException { - if (outputMode == null) { + if (outputmode == null) { throw new FOPException("Renderer has not been set!"); } - if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { + if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) { renderingOptions.put("fineDetail", isCoarseAreaXml()); } - return outputMode; + return outputmode; } /** @@ -1042,21 +1042,21 @@ public class CommandLineOptions { * @throws IllegalArgumentException if invalid/missing parameters */ private InputHandler createInputHandler() { - switch (inputMode) { + switch (inputmode) { case FO_INPUT: - return new InputHandler(foFile); + return new InputHandler(fofile); case AREATREE_INPUT: - return new AreaTreeInputHandler(areatreeFile); + return new AreaTreeInputHandler(areatreefile); case IF_INPUT: - return new IFInputHandler(ifFile); + return new IFInputHandler(iffile); case XSLT_INPUT: - InputHandler handler = new InputHandler(xmlFile, xsltFile, xsltParams); + InputHandler handler = new InputHandler(xmlfile, xsltfile, xsltParams); if (useCatalogResolver) { handler.createCatalogResolver(foUserAgent); } return handler; case IMAGE_INPUT: - return new ImageInputHandler(imageFile, xsltFile, xsltParams); + return new ImageInputHandler(imagefile, xsltfile, xsltParams); default: throw new IllegalArgumentException("Error creating InputHandler object."); } @@ -1074,24 +1074,24 @@ public class CommandLineOptions { * Returns the XSL-FO file if set. * @return the XSL-FO file, null if not set */ - public File getFoFile() { - return foFile; + public File getFOFile() { + return fofile; } /** * Returns the input XML file if set. * @return the input XML file, null if not set */ - public File getXmlFile() { - return xmlFile; + public File getXMLFile() { + return xmlfile; } /** * Returns the stylesheet to be used for transformation to XSL-FO. * @return stylesheet */ - public File getXslFile() { - return xsltFile; + public File getXSLFile() { + return xsltfile; } /** @@ -1099,7 +1099,7 @@ public class CommandLineOptions { * @return the output file */ public File getOutputFile() { - return outFile; + return outfile; } /** @@ -1139,13 +1139,13 @@ public class CommandLineOptions { * @return either the fofile or the xmlfile */ public File getInputFile() { - switch (inputMode) { + switch (inputmode) { case FO_INPUT: - return foFile; + return fofile; case XSLT_INPUT: - return xmlFile; + return xmlfile; default: - return foFile; + return fofile; } } @@ -1270,7 +1270,7 @@ public class CommandLineOptions { */ private void dumpConfiguration() { log.info("Input mode: "); - switch (inputMode) { + switch (inputmode) { case NOT_SET: log.info("not set"); break; @@ -1279,7 +1279,7 @@ public class CommandLineOptions { if (isInputFromStdIn()) { log.info("fo input file: from stdin"); } else { - log.info("fo input file: " + foFile.toString()); + log.info("fo input file: " + fofile.toString()); } break; case XSLT_INPUT: @@ -1287,16 +1287,16 @@ public class CommandLineOptions { if (isInputFromStdIn()) { log.info("xml input file: from stdin"); } else { - log.info("xml input file: " + xmlFile.toString()); + log.info("xml input file: " + xmlfile.toString()); } - log.info("xslt stylesheet: " + xsltFile.toString()); + log.info("xslt stylesheet: " + xsltfile.toString()); break; case AREATREE_INPUT: log.info("AT "); if (isInputFromStdIn()) { log.info("area tree input file: from stdin"); } else { - log.info("area tree input file: " + areatreeFile.toString()); + log.info("area tree input file: " + areatreefile.toString()); } break; case IF_INPUT: @@ -1304,7 +1304,7 @@ public class CommandLineOptions { if (isInputFromStdIn()) { log.info("intermediate input file: from stdin"); } else { - log.info("intermediate input file: " + ifFile.toString()); + log.info("intermediate input file: " + iffile.toString()); } break; case IMAGE_INPUT: @@ -1312,28 +1312,28 @@ public class CommandLineOptions { if (isInputFromStdIn()) { log.info("image input file: from stdin"); } else { - log.info("image input file: " + imageFile.toString()); + log.info("image input file: " + imagefile.toString()); } break; default: log.info("unknown input type"); } log.info("Output mode: "); - if (outputMode == null) { + if (outputmode == null) { log.info("not set"); - } else if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputMode)) { + } else if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputmode)) { log.info("awt on screen"); - if (outFile != null) { + if (outfile != null) { log.error("awt mode, but outfile is set:"); - log.error("out file: " + outFile.toString()); + log.error("out file: " + outfile.toString()); } - } else if (MimeConstants.MIME_FOP_PRINT.equals(outputMode)) { + } else if (MimeConstants.MIME_FOP_PRINT.equals(outputmode)) { log.info("print directly"); - if (outFile != null) { + if (outfile != null) { log.error("print mode, but outfile is set:"); - log.error("out file: " + outFile.toString()); + log.error("out file: " + outfile.toString()); } - } else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputMode)) { + } else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputmode)) { log.info("area tree"); if (mimicRenderer != null) { log.info("mimic renderer: " + mimicRenderer); @@ -1341,17 +1341,17 @@ public class CommandLineOptions { if (isOutputToStdOut()) { log.info("output file: to stdout"); } else { - log.info("output file: " + outFile.toString()); + log.info("output file: " + outfile.toString()); } - } else if (MimeConstants.MIME_FOP_IF.equals(outputMode)) { + } else if (MimeConstants.MIME_FOP_IF.equals(outputmode)) { log.info("intermediate format"); - log.info("output file: " + outFile.toString()); + log.info("output file: " + outfile.toString()); } else { - log.info(outputMode); + log.info(outputmode); if (isOutputToStdOut()) { log.info("output file: to stdout"); } else { - log.info("output file: " + outFile.toString()); + log.info("output file: " + outfile.toString()); } } diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index c78421cbe..5db11f731 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -619,7 +619,7 @@ public class FOText extends FONode implements CharSequence { } /** @return the baseline-shift property */ - public Length getBaselineShift() { + public Length getBaseLineShift() { return baselineShift; } diff --git a/src/java/org/apache/fop/fonts/apps/PFMReader.java b/src/java/org/apache/fop/fonts/apps/PFMReader.java index bc294057b..e5e8ca524 100644 --- a/src/java/org/apache/fop/fonts/apps/PFMReader.java +++ b/src/java/org/apache/fop/fonts/apps/PFMReader.java @@ -173,7 +173,7 @@ public class PFMReader extends AbstractFontReader { public void preview(PFMFile pfm) { if (log != null && log.isInfoEnabled()) { log.info("Font: " + pfm.getWindowsName()); - log.info("Name: " + pfm.getPostScriptName()); + log.info("Name: " + pfm.getPostscriptName()); log.info("CharSet: " + pfm.getCharSetName()); log.info("CapHeight: " + pfm.getCapHeight()); log.info("XHeight: " + pfm.getXHeight()); @@ -217,7 +217,7 @@ public class PFMReader extends AbstractFontReader { Element el = doc.createElement("font-name"); root.appendChild(el); - el.appendChild(doc.createTextNode(pfm.getPostScriptName())); + el.appendChild(doc.createTextNode(pfm.getPostscriptName())); // Currently unused. // String s = pfm.getPostscriptName(); diff --git a/src/java/org/apache/fop/fonts/type1/PFMFile.java b/src/java/org/apache/fop/fonts/type1/PFMFile.java index b5faddac1..d1a3d79ff 100644 --- a/src/java/org/apache/fop/fonts/type1/PFMFile.java +++ b/src/java/org/apache/fop/fonts/type1/PFMFile.java @@ -38,7 +38,7 @@ public class PFMFile { // Header stuff private String windowsName; - private String postScriptName; + private String postscriptName; private short dfItalic; private int dfWeight; private short dfCharSet; @@ -164,7 +164,7 @@ public class PFMFile { inStream.reset(); inStream.skip(driverInfoOffset); - postScriptName = inStream.readString(); + postscriptName = inStream.readString(); if (extMetricsOffset != 0) { inStream.reset(); @@ -279,8 +279,8 @@ public class PFMFile { * * @return The Postscript name. */ - public String getPostScriptName() { - return postScriptName; + public String getPostscriptName() { + return postscriptName; } /** @@ -304,7 +304,7 @@ public class PFMFile { case 0: return "WinAnsi"; // AKA ISOAdobe case 2: - if ("Symbol".equals(getPostScriptName())) { + if ("Symbol".equals(getPostscriptName())) { return "Symbol"; } break; diff --git a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java index 0c0c6187c..d5036de7b 100644 --- a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java +++ b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java @@ -226,8 +226,8 @@ public class Type1FontLoader extends FontLoader { names.add(afm.getFamilyName()); returnFont.setFamilyNames(names); } else { - returnFont.setFontName(pfm.getPostScriptName()); - String fullName = pfm.getPostScriptName(); + returnFont.setFontName(pfm.getPostscriptName()); + String fullName = pfm.getPostscriptName(); fullName = fullName.replace('-', ' '); //Hack! Try to emulate full name returnFont.setFullName(fullName); //emulate afm.getFullName() Set names = new java.util.HashSet(); diff --git a/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java b/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java index f2c86b35f..392eb875e 100644 --- a/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java +++ b/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java @@ -178,7 +178,7 @@ public abstract class AbstractGenericSVGHandler implements XMLHandler, RendererC } /** {@inheritDoc} */ - public String getNameSpace() { + public String getNamespace() { return SVGDOMImplementation.SVG_NAMESPACE_URI; } diff --git a/src/java/org/apache/fop/render/XMLHandler.java b/src/java/org/apache/fop/render/XMLHandler.java index 1060bec51..f8152fcbf 100644 --- a/src/java/org/apache/fop/render/XMLHandler.java +++ b/src/java/org/apache/fop/render/XMLHandler.java @@ -60,6 +60,6 @@ public interface XMLHandler { * @return the XML namespace for the XML dialect this XMLHandler supports, * null if all XML content is handled by this instance. */ - String getNameSpace(); + String getNamespace(); } diff --git a/src/java/org/apache/fop/render/XMLHandlerRegistry.java b/src/java/org/apache/fop/render/XMLHandlerRegistry.java index 84177df45..81d9fcc93 100644 --- a/src/java/org/apache/fop/render/XMLHandlerRegistry.java +++ b/src/java/org/apache/fop/render/XMLHandlerRegistry.java @@ -85,7 +85,7 @@ public class XMLHandlerRegistry { * @param handler the XMLHandler instance */ public void addXMLHandler(XMLHandler handler) { - String ns = handler.getNameSpace(); + String ns = handler.getNamespace(); if (ns == null) { setDefaultXMLHandler(handler); } else { diff --git a/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java index cffcf8a25..2687d9071 100644 --- a/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java +++ b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java @@ -124,7 +124,7 @@ public class AFPRendererImageInfo { * * @return the uri */ - public String getUri() { + public String getURI() { return this.uri; } diff --git a/src/java/org/apache/fop/render/intermediate/IFSerializer.java b/src/java/org/apache/fop/render/intermediate/IFSerializer.java index dcc0d3523..edeef9766 100644 --- a/src/java/org/apache/fop/render/intermediate/IFSerializer.java +++ b/src/java/org/apache/fop/render/intermediate/IFSerializer.java @@ -668,8 +668,8 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler throw new NullPointerException("action must not be null"); } if (!action.isComplete()) { - assert action.hasId(); - incompleteActions.put(action.getId(), action); + assert action.hasID(); + incompleteActions.put(action.getID(), action); } } @@ -744,8 +744,8 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler /** {@inheritDoc} */ public void addResolvedAction(AbstractAction action) throws IFException { assert action.isComplete(); - assert action.hasId(); - AbstractAction noted = (AbstractAction)incompleteActions.remove(action.getId()); + assert action.hasID(); + AbstractAction noted = (AbstractAction)incompleteActions.remove(action.getID()); if (noted != null) { completeActions.add(action); } else { diff --git a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java index 8d8a30cf6..340b2e068 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java @@ -33,7 +33,7 @@ public abstract class AbstractAction implements XMLizable { * Sets an ID to make the action referencable. * @param id the ID */ - public void setId(String id) { + public void setID(String id) { this.id = id; } @@ -41,7 +41,7 @@ public abstract class AbstractAction implements XMLizable { * Returns an optional ID for this action. * @return the ID or null */ - public String getId() { + public String getID() { return this.id; } @@ -65,7 +65,7 @@ public abstract class AbstractAction implements XMLizable { * Indicates whether the action has an ID and is therefore referencable. * @return true if the action has an ID */ - public boolean hasId() { + public boolean hasID() { return this.id != null; } @@ -90,7 +90,7 @@ public abstract class AbstractAction implements XMLizable { * Returns a string that is used to prefix a generated ID to make it unique. * @return the prefix string */ - public String getIdPrefix() { + public String getIDPrefix() { return null; } diff --git a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java index 719d2225b..b980f1051 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java @@ -39,7 +39,7 @@ public class ActionSet { */ public synchronized String generateNewID(AbstractAction action) { this.lastGeneratedID++; - String prefix = action.getIdPrefix(); + String prefix = action.getIDPrefix(); if (prefix == null) { throw new IllegalArgumentException("Action class is not compatible"); } @@ -62,12 +62,12 @@ public class ActionSet { * @return the action instance that should be used in place of the given one */ public AbstractAction put(AbstractAction action) { - if (!action.hasId()) { - action.setId(generateNewID(action)); + if (!action.hasID()) { + action.setID(generateNewID(action)); } AbstractAction effAction = normalize(action); if (effAction == action) { - this.actionRegistry.put(action.getId(), action); + this.actionRegistry.put(action.getID(), action); } return effAction; } diff --git a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java index 1d5bc23fe..1e613d7eb 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java @@ -132,7 +132,7 @@ public class DocumentNavigationHandler extends DefaultHandler boolean newWindow = "new".equals(showDestination); URIAction action = new URIAction(gotoURI, newWindow); if (id != null) { - action.setId(id); + action.setID(id); } if (structurePointer != null) { action.setStructurePointer(structurePointer); diff --git a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java index d905c7800..a2b4f31b6 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java @@ -52,7 +52,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx * or null, if the position isn't known, yet */ public GoToXYAction(String id, int pageIndex, Point targetLocation) { - setId(id); + setID(id); if (pageIndex < 0 && targetLocation != null) { throw new IllegalArgumentException( "Page index may not be null if target location is known!"); @@ -144,7 +144,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx AttributesImpl atts = new AttributesImpl(); if (this.isCompleteExceptTargetLocation()) { final Point reportedTargetLocation = this.getTargetLocation(); - atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId()); + atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); atts.addAttribute(null, "page-index", "page-index", XMLUtil.CDATA, Integer.toString(pageIndex)); atts.addAttribute(null, "x", "x", XMLUtil.CDATA, @@ -152,7 +152,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx atts.addAttribute(null, "y", "y", XMLUtil.CDATA, Integer.toString(reportedTargetLocation.y)); } else { - atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getId()); + atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getID()); } handler.startElement(GOTO_XY.getNamespaceURI(), GOTO_XY.getLocalName(), GOTO_XY.getQName(), atts); @@ -162,7 +162,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx /** {@inheritDoc} */ public String toString() { - return "GoToXY: ID=" + getId() + return "GoToXY: ID=" + getID() + ", page=" + getPageIndex() + ", loc=" + getTargetLocation() + ", " + (isComplete() ? "complete" : "INCOMPLETE"); diff --git a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java index 4251619ff..22e7a270c 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java @@ -82,15 +82,15 @@ public class URIAction extends AbstractAction implements DocumentNavigationExten } /** {@inheritDoc} */ - public String getIdPrefix() { + public String getIDPrefix() { return "fop-" + GOTO_URI.getLocalName(); } /** {@inheritDoc} */ public void toSAX(ContentHandler handler) throws SAXException { AttributesImpl atts = new AttributesImpl(); - if (hasId()) { - atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId()); + if (hasID()) { + atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID()); } atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, getURI()); if (isNewWindow()) { diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java index 4a51cb176..c215243a7 100644 --- a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java @@ -129,7 +129,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler /** {@inheritDoc} */ public void addResolvedAction(AbstractAction action) throws IFException { assert action.isComplete(); - PDFAction pdfAction = (PDFAction)this.incompleteActions.remove(action.getId()); + PDFAction pdfAction = (PDFAction)this.incompleteActions.remove(action.getID()); if (pdfAction == null) { getAction(action); } else if (pdfAction instanceof PDFGoTo) { @@ -145,11 +145,11 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler if (action == null) { return null; } - PDFAction pdfAction = (PDFAction)this.completeActions.get(action.getId()); + PDFAction pdfAction = (PDFAction)this.completeActions.get(action.getID()); if (pdfAction != null) { return pdfAction; } else if (action instanceof GoToXYAction) { - pdfAction = (PDFAction) incompleteActions.get(action.getId()); + pdfAction = (PDFAction) incompleteActions.get(action.getID()); if (pdfAction != null) { return pdfAction; } else { @@ -159,7 +159,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler if (action.isComplete()) { updateTargetLocation(pdfGoTo, a); } else { - this.incompleteActions.put(action.getId(), pdfGoTo); + this.incompleteActions.put(action.getID(), pdfGoTo); } return pdfGoTo; } @@ -173,7 +173,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler //Some PDF actions are pooled getPDFDoc().registerObject(pdfAction); } - this.completeActions.put(action.getId(), pdfAction); + this.completeActions.put(action.getID(), pdfAction); return pdfAction; } else { throw new UnsupportedOperationException("Unsupported action type: " @@ -195,7 +195,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler //Queue this object now that it's complete getPDFDoc().addObject(pdfGoTo); - this.completeActions.put(action.getId(), pdfGoTo); + this.completeActions.put(action.getID(), pdfGoTo); } } diff --git a/src/java/org/apache/fop/render/ps/PSImageFormResource.java b/src/java/org/apache/fop/render/ps/PSImageFormResource.java index 4c40c6f92..11c3205e6 100644 --- a/src/java/org/apache/fop/render/ps/PSImageFormResource.java +++ b/src/java/org/apache/fop/render/ps/PSImageFormResource.java @@ -53,7 +53,7 @@ public class PSImageFormResource extends PSResource { * Returns the image URI. * @return the image URI */ - public String getImageUri() { + public String getImageURI() { return this.uri; } diff --git a/src/java/org/apache/fop/render/ps/ResourceHandler.java b/src/java/org/apache/fop/render/ps/ResourceHandler.java index 06d6b9034..502242c17 100644 --- a/src/java/org/apache/fop/render/ps/ResourceHandler.java +++ b/src/java/org/apache/fop/render/ps/ResourceHandler.java @@ -281,7 +281,7 @@ public class ResourceHandler implements DSCParserConstants, PSSupportedFlavors { private void generateFormForImage(PSGenerator gen, PSImageFormResource form) throws IOException { - final String uri = form.getImageUri(); + final String uri = form.getImageURI(); ImageManager manager = userAgent.getFactory().getImageManager(); ImageInfo info = null; diff --git a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java index 29bbecded..d377f740d 100644 --- a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java +++ b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java @@ -149,7 +149,7 @@ final class TextAttributesConverter { attrFont(fobj.getCommonFont(), attrib); attrFontColor(fobj.getColor(), attrib); attrTextDecoration(fobj.getTextDecoration(), attrib); - attrBaseLineShift(fobj.getBaselineShift(), attrib); + attrBaseLineShift(fobj.getBaseLineShift(), attrib); return attrib; } diff --git a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java index f181e1911..d1cf1cf9a 100644 --- a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java +++ b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java @@ -48,7 +48,7 @@ public class XMLXMLHandler implements XMLHandler { } /** {@inheritDoc} */ - public String getNameSpace() { + public String getNamespace() { return null; //Handle all XML content } diff --git a/src/java/org/apache/fop/tools/TestConverter.java b/src/java/org/apache/fop/tools/TestConverter.java index ba03ee567..0c6e09bd0 100644 --- a/src/java/org/apache/fop/tools/TestConverter.java +++ b/src/java/org/apache/fop/tools/TestConverter.java @@ -56,7 +56,7 @@ public class TestConverter { private String outputFormat = MimeConstants.MIME_FOP_AREA_TREE; private File destdir; private File compare = null; - private String basedir = "./"; + private String baseDir = "./"; private Map differ = new java.util.HashMap(); /** @@ -95,7 +95,7 @@ public class TestConverter { } else if (args[count].equals("-d")) { tc.setDebug(true); } else if (args[count].equals("-b")) { - tc.setBasedir(args[++count]); + tc.setBaseDir(args[++count]); } else if (args[count].equals("-results")) { results = args[++count]; } else { @@ -138,8 +138,8 @@ public class TestConverter { * Sets the base directory. * @param str base directory */ - public void setBasedir(String str) { - basedir = str; + public void setBaseDir(String str) { + baseDir = str; } /** @@ -167,11 +167,11 @@ public class TestConverter { logger.debug("running tests in file:" + fname); try { if (compDir != null) { - compare = new File(basedir + "/" + compDir); + compare = new File(baseDir + "/" + compDir); } - destdir = new File(basedir + "/" + dest); + destdir = new File(baseDir + "/" + dest); destdir.mkdirs(); - File f = new File(basedir + "/" + fname); + File f = new File(baseDir + "/" + fname); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder db = factory.newDocumentBuilder(); Document doc = db.parse(f); @@ -271,7 +271,7 @@ public class TestConverter { res = resNode.getNodeValue(); } try { - File xmlFile = new File(basedir + "/" + xml); + File xmlFile = new File(baseDir + "/" + xml); String baseURL = null; try { baseURL = xmlFile.getParentFile().toURI().toURL().toExternalForm(); @@ -284,7 +284,7 @@ public class TestConverter { inputHandler = new InputHandler(xmlFile); } else { inputHandler = new InputHandler(xmlFile, - new File(basedir + "/" + new File(baseDir + "/" + xsl), null); } diff --git a/src/java/org/apache/fop/tools/anttasks/Fop.java b/src/java/org/apache/fop/tools/anttasks/Fop.java index 3aeac1215..58dd1fb5b 100644 --- a/src/java/org/apache/fop/tools/anttasks/Fop.java +++ b/src/java/org/apache/fop/tools/anttasks/Fop.java @@ -85,7 +85,7 @@ public class Fop extends Task { * Sets the filename for the userconfig.xml. * @param userConfig Configuration to use */ - public void setUserConfig(File userConfig) { + public void setUserconfig(File userConfig) { this.userConfig = userConfig; } @@ -93,7 +93,7 @@ public class Fop extends Task { * Returns the file for the userconfig.xml. * @return the userconfig.xml file */ - public File getUserConfig() { + public File getUserconfig() { return this.userConfig; } @@ -101,7 +101,7 @@ public class Fop extends Task { * Sets the input XSL-FO file. * @param foFile input XSL-FO file */ - public void setFoFile(File foFile) { + public void setFofile(File foFile) { this.foFile = foFile; } @@ -109,7 +109,7 @@ public class Fop extends Task { * Gets the input XSL-FO file. * @return input XSL-FO file */ - public File getFoFile() { + public File getFofile() { return foFile; } @@ -267,7 +267,7 @@ public class Fop extends Task { * default is false. * @param throwExceptions true if exceptions should be thrown */ - public void setThrowExceptions(boolean throwExceptions) { + public void setThrowexceptions(boolean throwExceptions) { this.throwExceptions = throwExceptions; } @@ -275,7 +275,7 @@ public class Fop extends Task { * Gets the throw exceptions attribute * @return the throw exceptions attribute */ - public boolean getThrowExceptions() { + public boolean getThrowexceptions() { return this.throwExceptions; } @@ -408,8 +408,8 @@ class FOPTaskStarter { FOPTaskStarter(Fop task) throws SAXException, IOException { this.task = task; - if (task.getUserConfig() != null) { - fopFactory.setUserConfig(task.getUserConfig()); + if (task.getUserconfig() != null) { + fopFactory.setUserConfig(task.getUserconfig()); } } @@ -497,8 +497,8 @@ class FOPTaskStarter { } } else { try { - if (task.getFoFile() != null) { - this.baseURL = task.getFoFile().getParentFile().toURI().toURL(). + if (task.getFofile() != null) { + this.baseURL = task.getFofile().getParentFile().toURI().toURL(). toExternalForm(); } } catch (MalformedURLException mfue) { @@ -517,8 +517,8 @@ class FOPTaskStarter { int skippedcount = 0; // deal with single source file - if (task.getFoFile() != null) { - if (task.getFoFile().exists()) { + if (task.getFofile() != null) { + if (task.getFofile().exists()) { File outf = task.getOutfile(); if (outf == null) { throw new BuildException("outfile is required when fofile is used"); @@ -530,11 +530,11 @@ class FOPTaskStarter { // OR output file doesn't exist OR // output file is older than input file if (task.getForce() || !outf.exists() - || (task.getFoFile().lastModified() > outf.lastModified() )) { - render(task.getFoFile(), outf, outputFormat); + || (task.getFofile().lastModified() > outf.lastModified() )) { + render(task.getFofile(), outf, outputFormat); actioncount++; } else if (outf.exists() - && (task.getFoFile().lastModified() <= outf.lastModified() )) { + && (task.getFofile().lastModified() <= outf.lastModified() )) { skippedcount++; } } @@ -653,7 +653,7 @@ class FOPTaskStarter { inputHandler.renderTo(userAgent, outputFormat, out); success = true; } catch (Exception ex) { - if (task.getThrowExceptions()) { + if (task.getThrowexceptions()) { throw new BuildException(ex); } throw ex; diff --git a/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java b/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java index ea73da0a1..c46c35b99 100644 --- a/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java +++ b/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java @@ -38,7 +38,7 @@ public class SVGSVGHandler implements XMLHandler, SVGRendererContextConstants { /** {@inheritDoc} */ public void handleXML(RendererContext context, org.w3c.dom.Document doc, String ns) throws Exception { - if (getNameSpace().equals(ns)) { + if (getNamespace().equals(ns)) { if (!(doc instanceof SVGDocument)) { DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); doc = DOMUtilities.deepCloneDocument(doc, impl); @@ -46,7 +46,7 @@ public class SVGSVGHandler implements XMLHandler, SVGRendererContextConstants { SVGSVGElement svg = ((SVGDocument) doc).getRootElement(); SVGDocument targetDoc = (SVGDocument)context.getProperty(SVG_DOCUMENT); SVGElement currentPageG = (SVGElement)context.getProperty(SVG_PAGE_G); - Element view = targetDoc.createElementNS(getNameSpace(), "svg"); + Element view = targetDoc.createElementNS(getNamespace(), "svg"); Node newsvg = targetDoc.importNode(svg, true); //view.setAttributeNS(null, "viewBox", "0 0 "); int xpos = ((Integer)context.getProperty(XPOS)).intValue(); @@ -57,7 +57,7 @@ public class SVGSVGHandler implements XMLHandler, SVGRendererContextConstants { // this fixes a problem where the xmlns is repeated sometimes Element ele = (Element) newsvg; ele.setAttributeNS(XMLSupport.XMLNS_NAMESPACE_URI, "xmlns", - getNameSpace()); + getNamespace()); if (ele.hasAttributeNS(null, "xmlns")) { ele.removeAttributeNS(null, "xmlns"); } @@ -74,7 +74,7 @@ public class SVGSVGHandler implements XMLHandler, SVGRendererContextConstants { } /** {@inheritDoc} */ - public String getNameSpace() { + public String getNamespace() { return SVGRenderer.MIME_TYPE; }