diff options
Diffstat (limited to 'src/java/org/apache/fop/apps')
-rw-r--r-- | src/java/org/apache/fop/apps/FopFactory.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/FopFactoryConfigurator.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/FormattingResults.java | 170 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/MimeConstants.java | 160 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/PageSequenceResults.java | 118 |
5 files changed, 226 insertions, 226 deletions
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java index dc94d92fb..de4c43626 100644 --- a/src/java/org/apache/fop/apps/FopFactory.java +++ b/src/java/org/apache/fop/apps/FopFactory.java @@ -15,7 +15,7 @@ * limitations under the License. */ -/* $Id: $ */ +/* $Id$ */ package org.apache.fop.apps; diff --git a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java index d708cd989..4d4f8d3eb 100644 --- a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java +++ b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -/* $Id: $ */ +/* $Id$ */ package org.apache.fop.apps; diff --git a/src/java/org/apache/fop/apps/FormattingResults.java b/src/java/org/apache/fop/apps/FormattingResults.java index 86ac72a97..af421f4ac 100644 --- a/src/java/org/apache/fop/apps/FormattingResults.java +++ b/src/java/org/apache/fop/apps/FormattingResults.java @@ -1,85 +1,85 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-import java.util.List;
-
-import org.apache.fop.fo.pagination.AbstractPageSequence;
-
-/**
- * Class for reporting back formatting results to the calling application.
- */
-public class FormattingResults {
-
- private int pageCount = 0;
- private List pageSequences = null;
-
- /**
- * Constructor for the FormattingResults object
- */
- public FormattingResults() {
- }
-
- /**
- * Gets the number of pages rendered
- *
- * @return The number of pages overall
- */
- public int getPageCount() {
- return this.pageCount;
- }
-
- /**
- * Gets the results for the individual page-sequences.
- *
- * @return A List with PageSequenceResults objects
- */
- public List getPageSequences() {
- return this.pageSequences;
- }
-
- /**
- * Resets this object
- */
- public void reset() {
- this.pageCount = 0;
- if (this.pageSequences != null) {
- this.pageSequences.clear();
- }
- }
-
- /**
- * Reports the result of one page sequence rendering
- * back into this object.
- *
- * @param pageSequence the page sequence which just completed rendering
- * @param pageCount the number of pages rendered for that PageSequence
- */
- public void haveFormattedPageSequence(AbstractPageSequence pageSequence, int pageCount) {
- this.pageCount += pageCount;
- if (this.pageSequences == null) {
- this.pageSequences = new java.util.ArrayList();
- }
- this.pageSequences.add(
- new PageSequenceResults(pageSequence.getId(),
- pageCount));
- }
-}
-
+/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.apps; + +import java.util.List; + +import org.apache.fop.fo.pagination.AbstractPageSequence; + +/** + * Class for reporting back formatting results to the calling application. + */ +public class FormattingResults { + + private int pageCount = 0; + private List pageSequences = null; + + /** + * Constructor for the FormattingResults object + */ + public FormattingResults() { + } + + /** + * Gets the number of pages rendered + * + * @return The number of pages overall + */ + public int getPageCount() { + return this.pageCount; + } + + /** + * Gets the results for the individual page-sequences. + * + * @return A List with PageSequenceResults objects + */ + public List getPageSequences() { + return this.pageSequences; + } + + /** + * Resets this object + */ + public void reset() { + this.pageCount = 0; + if (this.pageSequences != null) { + this.pageSequences.clear(); + } + } + + /** + * Reports the result of one page sequence rendering + * back into this object. + * + * @param pageSequence the page sequence which just completed rendering + * @param pageCount the number of pages rendered for that PageSequence + */ + public void haveFormattedPageSequence(AbstractPageSequence pageSequence, int pageCount) { + this.pageCount += pageCount; + if (this.pageSequences == null) { + this.pageSequences = new java.util.ArrayList(); + } + this.pageSequences.add( + new PageSequenceResults(pageSequence.getId(), + pageCount)); + } +} + diff --git a/src/java/org/apache/fop/apps/MimeConstants.java b/src/java/org/apache/fop/apps/MimeConstants.java index b17998393..31bdaaab1 100644 --- a/src/java/org/apache/fop/apps/MimeConstants.java +++ b/src/java/org/apache/fop/apps/MimeConstants.java @@ -1,80 +1,80 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-/**
- * Frequently used MIME types for various file formats used when working with Apache FOP.
- */
-public interface MimeConstants {
-
- /** Portable Document Format */
- String MIME_PDF = "application/pdf";
-
- /** PostScript */
- String MIME_POSTSCRIPT = "application/postscript";
- /** Encapsulated PostScript (same MIME type as PostScript) */
- String MIME_EPS = MIME_POSTSCRIPT;
-
- /** HP's PCL */
- String MIME_PCL = "application/x-pcl";
- /** HP's PCL (alternative MIME type) */
- String MIME_PCL_ALT = "application/vnd.hp-PCL";
-
- /** IBM's AFP */
- String MIME_AFP = "application/x-afp";
- /** IBM's AFP (alternative MIME type) */
- String MIME_AFP_ALT = "application/vnd.ibm.modcap";
-
- /** Plain text */
- String MIME_PLAIN_TEXT = "text/plain";
-
- /** Rich text format */
- String MIME_RTF = "application/rtf";
- /** Rich text format (alternative 1) */
- String MIME_RTF_ALT1 = "text/richtext";
- /** Rich text format (alternative 2) */
- String MIME_RTF_ALT2 = "text/rtf";
-
- /** FrameMaker's MIF */
- String MIME_MIF = "application/mif";
-
- /** Structured Vector Graphics */
- String MIME_SVG = "image/svg+xml";
-
- /** GIF images */
- String MIME_GIF = "image/gif";
- /** PNG images */
- String MIME_PNG = "image/png";
- /** JPEG images */
- String MIME_JPEG = "image/jpeg";
- /** TIFF images */
- String MIME_TIFF = "image/tiff";
-
- /** Apache FOP's AWT preview (non-standard MIME type) */
- String MIME_FOP_AWT_PREVIEW = "application/X-fop-awt-preview";
- /** Apache FOP's Direct Printing (non-standard MIME type) */
- String MIME_FOP_PRINT = "application/X-fop-print";
- /** Apache FOP's area tree XML */
- String MIME_FOP_AREA_TREE = "application/X-fop-areatree";
-
- /** Proposed but non-registered MIME type for XSL-FO */
- String MIME_XSL_FO = "text/xsl";
-
-}
+/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.apps; + +/** + * Frequently used MIME types for various file formats used when working with Apache FOP. + */ +public interface MimeConstants { + + /** Portable Document Format */ + String MIME_PDF = "application/pdf"; + + /** PostScript */ + String MIME_POSTSCRIPT = "application/postscript"; + /** Encapsulated PostScript (same MIME type as PostScript) */ + String MIME_EPS = MIME_POSTSCRIPT; + + /** HP's PCL */ + String MIME_PCL = "application/x-pcl"; + /** HP's PCL (alternative MIME type) */ + String MIME_PCL_ALT = "application/vnd.hp-PCL"; + + /** IBM's AFP */ + String MIME_AFP = "application/x-afp"; + /** IBM's AFP (alternative MIME type) */ + String MIME_AFP_ALT = "application/vnd.ibm.modcap"; + + /** Plain text */ + String MIME_PLAIN_TEXT = "text/plain"; + + /** Rich text format */ + String MIME_RTF = "application/rtf"; + /** Rich text format (alternative 1) */ + String MIME_RTF_ALT1 = "text/richtext"; + /** Rich text format (alternative 2) */ + String MIME_RTF_ALT2 = "text/rtf"; + + /** FrameMaker's MIF */ + String MIME_MIF = "application/mif"; + + /** Structured Vector Graphics */ + String MIME_SVG = "image/svg+xml"; + + /** GIF images */ + String MIME_GIF = "image/gif"; + /** PNG images */ + String MIME_PNG = "image/png"; + /** JPEG images */ + String MIME_JPEG = "image/jpeg"; + /** TIFF images */ + String MIME_TIFF = "image/tiff"; + + /** Apache FOP's AWT preview (non-standard MIME type) */ + String MIME_FOP_AWT_PREVIEW = "application/X-fop-awt-preview"; + /** Apache FOP's Direct Printing (non-standard MIME type) */ + String MIME_FOP_PRINT = "application/X-fop-print"; + /** Apache FOP's area tree XML */ + String MIME_FOP_AREA_TREE = "application/X-fop-areatree"; + + /** Proposed but non-registered MIME type for XSL-FO */ + String MIME_XSL_FO = "text/xsl"; + +} diff --git a/src/java/org/apache/fop/apps/PageSequenceResults.java b/src/java/org/apache/fop/apps/PageSequenceResults.java index ae873b5e3..16c74f66b 100644 --- a/src/java/org/apache/fop/apps/PageSequenceResults.java +++ b/src/java/org/apache/fop/apps/PageSequenceResults.java @@ -1,59 +1,59 @@ -/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-/**
- * Class for reporting back formatting results to the calling application. This
- * particular class is used to report the results of a single page-sequence.
- */
-public class PageSequenceResults {
-
- private String id;
- private int pageCount;
-
- /**
- * Constructor for the PageSequenceResults object
- *
- * @param id ID of the page-sequence, if available
- * @param pageCount The number of resulting pages
- */
- public PageSequenceResults(String id, int pageCount) {
- this.id = id;
- this.pageCount = pageCount;
- }
-
- /**
- * Gets the ID of the page-sequence if one was specified.
- *
- * @return The ID
- */
- public String getID() {
- return this.id;
- }
-
- /**
- * Gets the number of pages that resulted by processing the page-sequence.
- *
- * @return The number of pages generated
- */
- public int getPageCount() {
- return this.pageCount;
- }
-}
+/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.apps; + +/** + * Class for reporting back formatting results to the calling application. This + * particular class is used to report the results of a single page-sequence. + */ +public class PageSequenceResults { + + private String id; + private int pageCount; + + /** + * Constructor for the PageSequenceResults object + * + * @param id ID of the page-sequence, if available + * @param pageCount The number of resulting pages + */ + public PageSequenceResults(String id, int pageCount) { + this.id = id; + this.pageCount = pageCount; + } + + /** + * Gets the ID of the page-sequence if one was specified. + * + * @return The ID + */ + public String getID() { + return this.id; + } + + /** + * Gets the number of pages that resulted by processing the page-sequence. + * + * @return The number of pages generated + */ + public int getPageCount() { + return this.pageCount; + } +} |