diff options
author | Jeremias Maerki <jeremias@apache.org> | 2003-03-05 21:48:02 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2003-03-05 21:48:02 +0000 |
commit | 35c376f9f01747df3e433bb95c69e8e583d1d5df (patch) | |
tree | 7a0c0bcfa2249c9cc50f1fb6f878f9320352fc35 /src/org/apache/fop/fo/FONode.java | |
parent | bf1b659f9ad32f669487e9871eb88389b6cb06cf (diff) | |
download | xmlgraphics-fop-35c376f9f01747df3e433bb95c69e8e583d1d5df.tar.gz xmlgraphics-fop-35c376f9f01747df3e433bb95c69e8e583d1d5df.zip |
Switched to long licence
Some general checkstyle fixing
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196020 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/FONode.java')
-rw-r--r-- | src/org/apache/fop/fo/FONode.java | 108 |
1 files changed, 90 insertions, 18 deletions
diff --git a/src/org/apache/fop/fo/FONode.java b/src/org/apache/fop/fo/FONode.java index dabd6ff80..e9851875c 100644 --- a/src/org/apache/fop/fo/FONode.java +++ b/src/org/apache/fop/fo/FONode.java @@ -1,54 +1,126 @@ /* * $Id$ - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. - * For details on use and redistribution please refer to the - * LICENSE file included with these sources. - */ - + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 1999-2003 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 <jtauber@jtauber.com>. For more information on the Apache + * Software Foundation, please see <http://www.apache.org/>. + */ package org.apache.fop.fo; -// FOP -import org.apache.fop.apps.FOPException; -import org.apache.fop.apps.StructureHandler; -import org.apache.fop.util.CharUtilities; +// Java +import java.util.ListIterator; + +// XML +import org.xml.sax.Attributes; // Avalon import org.apache.avalon.framework.logger.Logger; -import org.xml.sax.Attributes; - -import java.util.ListIterator; -import java.util.NoSuchElementException; +// FOP +import org.apache.fop.apps.FOPException; +import org.apache.fop.apps.StructureHandler; +import org.apache.fop.util.CharUtilities; /** * base class for nodes in the XML tree * */ public abstract class FONode { + + /** FO User Agent for this node (for logger etc.)*/ protected FOUserAgent userAgent; + /** Parent FO node */ protected FONode parent; + /** Name of the node */ protected String name; + /** + * Main constructor. + * @param parent parent of this node + */ protected FONode(FONode parent) { this.parent = parent; } + /** + * Sets the name of the node. + * @param str the name + */ public void setName(String str) { name = str; } - public Logger getLogger() { + /** + * Returns the logger for the node. + * @return the logger + */ + protected Logger getLogger() { return userAgent.getLogger(); } + /** + * Sets the user agent for the node. + * @param ua the user agent + */ public void setUserAgent(FOUserAgent ua) { userAgent = ua; } - public FOUserAgent getUserAgent() { + /** + * Returns the user agent for the node. + * @return FOUserAgent + */ + protected FOUserAgent getUserAgent() { return userAgent; } + /** + * Sets the structure handler to send events to. + * @param st StructureHandler instance + */ public void setStructHandler(StructureHandler st) { } @@ -56,7 +128,7 @@ public abstract class FONode { } /** - * returns the name of the object + * Returns the name of the object * @return the name of this object */ public String getName() { @@ -64,7 +136,7 @@ public abstract class FONode { } /** - * adds characters (does nothing here) + * Adds characters (does nothing here) * @param data text * @param start start position * @param length length of the text @@ -99,7 +171,7 @@ public abstract class FONode { * @return A ListIterator. */ public ListIterator getChildren() { - return null; + return null; } /** |