123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- /*
- * $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.
- */
-
- package org.apache.fop.fo;
-
- // FOP
- import org.apache.fop.apps.FOPException;
- import org.apache.fop.apps.StructureHandler;
- import org.apache.fop.util.CharUtilities;
-
- // Avalon
- import org.apache.avalon.framework.logger.Logger;
-
- import org.xml.sax.Attributes;
-
- import java.util.ListIterator;
- import java.util.NoSuchElementException;
-
- /**
- * base class for nodes in the XML tree
- *
- */
- abstract public class FONode {
- protected FOUserAgent userAgent;
- protected FONode parent;
- protected String name;
-
- protected FONode(FONode parent) {
- this.parent = parent;
- }
-
- public void setName(String str) {
- name = str;
- }
-
- public Logger getLogger() {
- return userAgent.getLogger();
- }
-
- public void setUserAgent(FOUserAgent ua) {
- userAgent = ua;
- }
-
- public void setStructHandler(StructureHandler st) {
- }
-
- public void handleAttrs(Attributes attlist) throws FOPException {
- }
-
- /**
- * returns the name of the object
- * @return the name of this object
- */
- public String getName() {
- return this.name;
- }
-
- /**
- * adds characters (does nothing here)
- * @param data text
- * @param start start position
- * @param length length of the text
- */
- protected void addCharacters(char data[], int start, int length) {
- // ignore
- }
-
- /**
- *
- */
- protected void start() {
- // do nothing by default
- }
-
- /**
- *
- */
- protected void end() {
- // do nothing by default
- }
-
- protected void addChild(FONode child) {
- }
-
- public FONode getParent() {
- return this.parent;
- }
-
- /**
- * Return an iterator over all the children of this FObj.
- * @return A ListIterator.
- */
- public ListIterator getChildren() {
- return null;
- }
-
- /**
- * Return an iterator over the object's children starting
- * at the pased node.
- * @param childNode First node in the iterator
- * @return A ListIterator or null if childNode isn't a child of
- * this FObj.
- */
- public ListIterator getChildren(FONode childNode) {
- return null;
- }
-
- public CharIterator charIterator() {
- return new OneCharIterator(CharUtilities.CODE_EOT);
- }
-
- }
|