From: Peter Bernard West Date: Thu, 15 Jan 2004 03:16:55 +0000 (+0000) Subject: XMLEventPool renamed to XmlEventPool X-Git-Tag: Alt-Design_pre_awt_renderer_import~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5a547f20f0d2d6fed8d94279ddf8d26c79440c6;p=xmlgraphics-fop.git XMLEventPool renamed to XmlEventPool git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197198 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/pool/XMLEventPool.java b/src/java/org/apache/fop/pool/XMLEventPool.java deleted file mode 100644 index 4a77d5d08..000000000 --- a/src/java/org/apache/fop/pool/XMLEventPool.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * $Id$ - * - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999-2004 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. 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. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "FOP" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, 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. - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation and was originally created by - * James Tauber . For more information on the Apache - * Software Foundation, please see . - * - * @author Peter B. West - * @version $Revision$ $Name$ - */ -package org.apache.fop.pool; - -import org.apache.fop.xml.XmlEvent; - -/** - * This class provides a pool of XmlEvent objects. - */ - -public class XMLEventPool extends FopPool { - - private static final String tag = "$Name$"; - private static final String revision = "$Revision$"; - - /** Required argument for constructing new XmlEvents. */ - //protected final Namespaces namespaces; - /** - * The zero-argument constructor - */ - public XMLEventPool() { - } - - /** - * Construct a pool with a given initial size. - * @param initialSize - the initial size of the pool. - */ - public XMLEventPool(int initialSize) { - super(initialSize); - } - - /** - * Acquire an XmlEvent. - * @return an XmlEvent. - */ - public synchronized XmlEvent acquireXMLEvent() { - return (XmlEvent)acquirePoolable(); - } - -} diff --git a/src/java/org/apache/fop/pool/XmlEventPool.java b/src/java/org/apache/fop/pool/XmlEventPool.java new file mode 100644 index 000000000..652b30a6b --- /dev/null +++ b/src/java/org/apache/fop/pool/XmlEventPool.java @@ -0,0 +1,91 @@ +/* + * $Id$ + * + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2004 The Apache Software Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. 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. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "FOP" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, 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. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation and was originally created by + * James Tauber . For more information on the Apache + * Software Foundation, please see . + * + * @author Peter B. West + * @version $Revision$ $Name$ + */ +package org.apache.fop.pool; + +import org.apache.fop.xml.XmlEvent; + +/** + * This class provides a pool of XmlEvent objects. + */ + +public class XmlEventPool extends FopPool { + + private static final String tag = "$Name$"; + private static final String revision = "$Revision$"; + + /** Required argument for constructing new XmlEvents. */ + //protected final Namespaces namespaces; + /** + * The zero-argument constructor + */ + public XmlEventPool() { + } + + /** + * Construct a pool with a given initial size. + * @param initialSize - the initial size of the pool. + */ + public XmlEventPool(int initialSize) { + super(initialSize); + } + + /** + * Acquire an XmlEvent. + * @return an XmlEvent. + */ + public synchronized XmlEvent acquireXMLEvent() { + return (XmlEvent)acquirePoolable(); + } + +} diff --git a/src/java/org/apache/fop/xml/Namespaces.java b/src/java/org/apache/fop/xml/Namespaces.java index 030020e74..167d9467b 100644 --- a/src/java/org/apache/fop/xml/Namespaces.java +++ b/src/java/org/apache/fop/xml/Namespaces.java @@ -58,7 +58,7 @@ import org.apache.fop.pool.*; * One instance of Namespaces is maintained across all documents * that may be processed in a single invocation of XMLSerialhandler. * A reference to that instance is kept with every instance of XmlEvent. - * An XMLEventPool pool of event objects is maintained for every + * An XmlEventPool pool of event objects is maintained for every * namesapce encountered in parsing. The pool for the * http://www.w3.org/1999/XSL/Format (XSL_FO) namespace is created immediately; * other pools are created only as elements from a particular namespace are @@ -120,12 +120,12 @@ public class Namespaces { { DefAttrNSpace, XSLNamespace, FOXNamespace, SVGNamespace }; /** - * An array of XMLEventPools. This ArrayList is indexed by + * An array of XmlEventPools. This ArrayList is indexed by * the namespace index used in this Namespaces object. * This allows for the maintenance of individual event pools for each * namespace active in the current document. */ - private XMLEventPool[] pools = new XMLEventPool[LAST_NS_INDEX + 1]; + private XmlEventPool[] pools = new XmlEventPool[LAST_NS_INDEX + 1]; /** * The pool for UriLocalName objects. @@ -182,13 +182,13 @@ public class Namespaces { nsSequences[i] = 0; } pools[DefAttrNSIndex] = - new XMLEventPool(INITIAL_DEF_ATTR_NS_POOL_SIZE); + new XmlEventPool(INITIAL_DEF_ATTR_NS_POOL_SIZE); pools[XSLNSpaceIndex] = - new XMLEventPool(INITIAL_XSL_NS_POOL_SIZE); + new XmlEventPool(INITIAL_XSL_NS_POOL_SIZE); pools[FOXNSpaceIndex] = - new XMLEventPool(INITIAL_FOX_NS_POOL_SIZE); + new XmlEventPool(INITIAL_FOX_NS_POOL_SIZE); pools[SVGNSpaceIndex] = - new XMLEventPool(INITIAL_SVG_NS_POOL_SIZE); + new XmlEventPool(INITIAL_SVG_NS_POOL_SIZE); uriLocalNamePool = new UriLocalNamePool(BUFFER_SIZE); }