]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Initial FOs as holders for properties.
authorPeter Bernard West <pbwest@apache.org>
Fri, 8 Nov 2002 11:33:46 +0000 (11:33 +0000)
committerPeter Bernard West <pbwest@apache.org>
Fri, 8 Nov 2002 11:33:46 +0000 (11:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195456 13f79535-47bb-0310-9956-ffa450edef68

38 files changed:
src/org/apache/fop/fo/flow/FoBasicLink.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoBidiOverride.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoBlock.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoBlockContainer.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoCharacter.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoExternalGraphic.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoFloat.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoFootnote.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoFootnoteBody.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoInitialPropertySet.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoInline.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoInlineContainer.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoInstreamForeignObject.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoLeader.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoListBlock.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoListItem.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoListItemBody.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoListItemLabel.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMarker.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMultiCase.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMultiProperties.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMultiPropertySet.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMultiSwitch.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoMultiToggle.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoNoFo.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoPageNumber.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoPageNumberCitation.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoRetrieveMarker.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTable.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableAndCaption.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableBody.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableCaption.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableCell.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableColumn.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableFooter.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableHeader.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoTableRow.java [new file with mode: 0644]
src/org/apache/fop/fo/flow/FoWrapper.java [new file with mode: 0644]

diff --git a/src/org/apache/fop/fo/flow/FoBasicLink.java b/src/org/apache/fop/fo/flow/FoBasicLink.java
new file mode 100644 (file)
index 0000000..9414ba2
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoBasicLink extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.DESTINATION_PLACEMENT_OFFSET);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.EXTERNAL_DESTINATION);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INDICATE_DESTINATION);
+        propsets.set(PropNames.INTERNAL_DESTINATION);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.SHOW_DESTINATION);
+        propsets.set(PropNames.TARGET_PROCESSING_CONTEXT);
+        propsets.set(PropNames.TARGET_PRESENTATION_CONTEXT);
+        propsets.set(PropNames.TARGET_STYLESHEET);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoBasicLink
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.BASIC_LINK, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoBidiOverride.java b/src/org/apache/fop/fo/flow/FoBidiOverride.java
new file mode 100644 (file)
index 0000000..0dc3bed
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoBidiOverride extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.DIRECTION);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.SCORE_SPACES);
+        propsets.set(PropNames.UNICODE_BIDI);
+        propsets.set(PropNames.WORD_SPACING);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoBidiOverride
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.BIDI_OVERRIDE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoBlock.java b/src/org/apache/fop/fo/flow/FoBlock.java
new file mode 100644 (file)
index 0000000..f5aafa4
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoBlock extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.hyphenationSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.TEXT_DEPTH);
+        propsets.set(PropNames.TEXT_ALTITUDE);
+        propsets.set(PropNames.HYPHENATION_KEEP);
+        propsets.set(PropNames.HYPHENATION_LADDER_COUNT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LAST_LINE_END_INDENT);
+        propsets.set(PropNames.LINEFEED_TREATMENT);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.LINE_HEIGHT_SHIFT_ADJUSTMENT);
+        propsets.set(PropNames.LINE_STACKING_STRATEGY);
+        propsets.set(PropNames.ORPHANS);
+        propsets.set(PropNames.WHITE_SPACE_TREATMENT);
+        propsets.set(PropNames.SPAN);
+        propsets.set(PropNames.TEXT_ALIGN);
+        propsets.set(PropNames.TEXT_ALIGN_LAST);
+        propsets.set(PropNames.TEXT_INDENT);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK);
+        propsets.set(PropNames.WHITE_SPACE_COLLAPSE);
+        propsets.set(PropNames.WIDOWS);
+        propsets.set(PropNames.WRAP_OPTION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoBlock
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.BLOCK, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoBlockContainer.java b/src/org/apache/fop/fo/flow/FoBlockContainer.java
new file mode 100644 (file)
index 0000000..3522906
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoBlockContainer extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.absolutePositionSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.CLIP);
+        propsets.set(PropNames.DISPLAY_ALIGN);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.OVERFLOW);
+        propsets.set(PropNames.REFERENCE_ORIENTATION);
+        propsets.set(PropNames.SPAN);
+        propsets.set(PropNames.WIDTH);
+        propsets.set(PropNames.WRITING_MODE);
+        propsets.set(PropNames.Z_INDEX);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoBlockContainer
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.BLOCK_CONTAINER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoCharacter.java b/src/org/apache/fop/fo/flow/FoCharacter.java
new file mode 100644 (file)
index 0000000..d22e859
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoCharacter extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.hyphenationSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.TREAT_AS_WORD_SPACE);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.CHARACTER);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.TEXT_DEPTH);
+        propsets.set(PropNames.TEXT_ALTITUDE);
+        propsets.set(PropNames.GLYPH_ORIENTATION_HORIZONTAL);
+        propsets.set(PropNames.GLYPH_ORIENTATION_VERTICAL);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.SCORE_SPACES);
+        propsets.set(PropNames.SUPPRESS_AT_LINE_BREAK);
+        propsets.set(PropNames.TEXT_DECORATION);
+        propsets.set(PropNames.TEXT_SHADOW);
+        propsets.set(PropNames.TEXT_TRANSFORM);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.WORD_SPACING);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoCharacter
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.CHARACTER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoExternalGraphic.java b/src/org/apache/fop/fo/flow/FoExternalGraphic.java
new file mode 100644 (file)
index 0000000..587d0b9
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoExternalGraphic extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.CLIP);
+        propsets.set(PropNames.CONTENT_HEIGHT);
+        propsets.set(PropNames.CONTENT_TYPE);
+        propsets.set(PropNames.CONTENT_WIDTH);
+        propsets.set(PropNames.DISPLAY_ALIGN);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.OVERFLOW);
+        propsets.set(PropNames.SCALING);
+        propsets.set(PropNames.SCALING_METHOD);
+        propsets.set(PropNames.SRC);
+        propsets.set(PropNames.TEXT_ALIGN);
+        propsets.set(PropNames.WIDTH);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoExternalGraphic
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.EXTERNAL_GRAPHIC, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoFloat.java b/src/org/apache/fop/fo/flow/FoFloat.java
new file mode 100644 (file)
index 0000000..ce0f2ab
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoFloat extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.set(PropNames.CLEAR);
+        propsets.set(PropNames.FLOAT);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoFloat
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.FLOAT, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoFootnote.java b/src/org/apache/fop/fo/flow/FoFootnote.java
new file mode 100644 (file)
index 0000000..a0599d5
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoFootnote extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoFootnote
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.FOOTNOTE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoFootnoteBody.java b/src/org/apache/fop/fo/flow/FoFootnoteBody.java
new file mode 100644 (file)
index 0000000..b684605
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoFootnoteBody extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoFootnoteBody
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.FOOTNOTE_BODY, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoInitialPropertySet.java b/src/org/apache/fop/fo/flow/FoInitialPropertySet.java
new file mode 100644 (file)
index 0000000..cd1d863
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoInitialPropertySet extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.SCORE_SPACES);
+        propsets.set(PropNames.TEXT_DECORATION);
+        propsets.set(PropNames.TEXT_SHADOW);
+        propsets.set(PropNames.TEXT_TRANSFORM);
+        propsets.set(PropNames.WORD_SPACING);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoInitialPropertySet
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.INITIAL_PROPERTY_SET, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoInline.java b/src/org/apache/fop/fo/flow/FoInline.java
new file mode 100644 (file)
index 0000000..e8e94be
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoInline extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.TEXT_DECORATION);
+        propsets.set(PropNames.USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.WIDTH);
+        propsets.set(PropNames.WRAP_OPTION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoInline
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.INLINE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoInlineContainer.java b/src/org/apache/fop/fo/flow/FoInlineContainer.java
new file mode 100644 (file)
index 0000000..a6488df
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoInlineContainer extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.CLIP);
+        propsets.set(PropNames.DISPLAY_ALIGN);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.OVERFLOW);
+        propsets.set(PropNames.REFERENCE_ORIENTATION);
+        propsets.set(PropNames.WIDTH);
+        propsets.set(PropNames.WRITING_MODE);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoInlineContainer
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.INLINE_CONTAINER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoInstreamForeignObject.java b/src/org/apache/fop/fo/flow/FoInstreamForeignObject.java
new file mode 100644 (file)
index 0000000..a486327
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoInstreamForeignObject extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.CLIP);
+        propsets.set(PropNames.CONTENT_HEIGHT);
+        propsets.set(PropNames.CONTENT_TYPE);
+        propsets.set(PropNames.CONTENT_WIDTH);
+        propsets.set(PropNames.DISPLAY_ALIGN);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.OVERFLOW);
+        propsets.set(PropNames.SCALING);
+        propsets.set(PropNames.SCALING_METHOD);
+        propsets.set(PropNames.TEXT_ALIGN);
+        propsets.set(PropNames.WIDTH);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoInstreamForeignObject
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.INSTREAM_FOREIGN_OBJECT, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoLeader.java b/src/org/apache/fop/fo/flow/FoLeader.java
new file mode 100644 (file)
index 0000000..090284a
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoLeader extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.COLOR);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.TEXT_DEPTH);
+        propsets.set(PropNames.TEXT_ALTITUDE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LEADER_ALIGNMENT);
+        propsets.set(PropNames.LEADER_LENGTH);
+        propsets.set(PropNames.LEADER_PATTERN);
+        propsets.set(PropNames.LEADER_PATTERN_WIDTH);
+        propsets.set(PropNames.RULE_STYLE);
+        propsets.set(PropNames.RULE_THICKNESS);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.TEXT_SHADOW);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.WORD_SPACING);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoLeader
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.LEADER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoListBlock.java b/src/org/apache/fop/fo/flow/FoListBlock.java
new file mode 100644 (file)
index 0000000..8ed169f
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoListBlock extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.PROVISIONAL_DISTANCE_BETWEEN_STARTS);
+        propsets.set(PropNames.PROVISIONAL_LABEL_SEPARATION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoListBlock
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.LIST_BLOCK, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoListItem.java b/src/org/apache/fop/fo/flow/FoListItem.java
new file mode 100644 (file)
index 0000000..76b7844
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoListItem extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.RELATIVE_ALIGN);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoListItem
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.LIST_ITEM, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoListItemBody.java b/src/org/apache/fop/fo/flow/FoListItemBody.java
new file mode 100644 (file)
index 0000000..f7f0cdd
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoListItemBody extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_TOGETHER);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoListItemBody
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.LIST_ITEM_BODY, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoListItemLabel.java b/src/org/apache/fop/fo/flow/FoListItemLabel.java
new file mode 100644 (file)
index 0000000..d98b3f5
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoListItemLabel extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_TOGETHER);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoListItemLabel
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.LIST_ITEM_LABEL, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMarker.java b/src/org/apache/fop/fo/flow/FoMarker.java
new file mode 100644 (file)
index 0000000..6034dbd
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMarker extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap(1);
+        numProps = 1;
+        sparseIndices = new int[] { PropNames.MARKER_CLASS_NAME };
+        sparsePropsMap.put
+            (Ints.consts.get(PropNames.MARKER_CLASS_NAME), Ints.consts.get(0));
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMarker
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MARKER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMultiCase.java b/src/org/apache/fop/fo/flow/FoMultiCase.java
new file mode 100644 (file)
index 0000000..f063444
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMultiCase extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.CASE_NAME);
+        propsets.set(PropNames.CASE_TITLE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.STARTING_STATE);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMultiCase
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MULTI_CASE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMultiProperties.java b/src/org/apache/fop/fo/flow/FoMultiProperties.java
new file mode 100644 (file)
index 0000000..ec83d38
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMultiProperties extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.ID);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMultiProperties
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MULTI_PROPERTIES, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMultiPropertySet.java b/src/org/apache/fop/fo/flow/FoMultiPropertySet.java
new file mode 100644 (file)
index 0000000..349c67e
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMultiPropertySet extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.set(PropNames.ACTIVE_STATE);
+        propsets.set(PropNames.ID);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMultiPropertySet
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MULTI_PROPERTY_SET, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMultiSwitch.java b/src/org/apache/fop/fo/flow/FoMultiSwitch.java
new file mode 100644 (file)
index 0000000..a7badcf
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMultiSwitch extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.AUTO_RESTORE);
+        propsets.set(PropNames.ID);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMultiSwitch
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MULTI_SWITCH, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoMultiToggle.java b/src/org/apache/fop/fo/flow/FoMultiToggle.java
new file mode 100644 (file)
index 0000000..e0e71dd
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoMultiToggle extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.SWITCH_TO);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoMultiToggle
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.MULTI_TOGGLE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoNoFo.java b/src/org/apache/fop/fo/flow/FoNoFo.java
new file mode 100644 (file)
index 0000000..73711ca
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoNoFo extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap(1);
+        numProps = 1;
+        sparseIndices = new int[] { PropNames.NO_PROPERTY };
+        sparsePropsMap.put
+            (Ints.consts.get(PropNames.NO_PROPERTY), Ints.consts.get(0));
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoNoFo
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.NO_FO, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoPageNumber.java b/src/org/apache/fop/fo/flow/FoPageNumber.java
new file mode 100644 (file)
index 0000000..421c977
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoPageNumber extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.SCORE_SPACES);
+        propsets.set(PropNames.TEXT_ALTITUDE);
+        propsets.set(PropNames.TEXT_DECORATION);
+        propsets.set(PropNames.TEXT_DEPTH);
+        propsets.set(PropNames.TEXT_SHADOW);
+        propsets.set(PropNames.TEXT_TRANSFORM);
+        propsets.set(PropNames.USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.WORD_SPACING);
+        propsets.set(PropNames.WRAP_OPTION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoPageNumber
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.PAGE_NUMBER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoPageNumberCitation.java b/src/org/apache/fop/fo/flow/FoPageNumberCitation.java
new file mode 100644 (file)
index 0000000..8d3ba16
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoPageNumberCitation extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.fontSet);
+        propsets.or(PropertySets.marginInlineSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.ALIGNMENT_ADJUST);
+        propsets.set(PropNames.ALIGNMENT_BASELINE);
+        propsets.set(PropNames.BASELINE_SHIFT);
+        propsets.set(PropNames.DOMINANT_BASELINE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.LETTER_SPACING);
+        propsets.set(PropNames.LINE_HEIGHT);
+        propsets.set(PropNames.REF_ID);
+        propsets.set(PropNames.SCORE_SPACES);
+        propsets.set(PropNames.TEXT_ALTITUDE);
+        propsets.set(PropNames.TEXT_DECORATION);
+        propsets.set(PropNames.TEXT_DEPTH);
+        propsets.set(PropNames.TEXT_SHADOW);
+        propsets.set(PropNames.TEXT_TRANSFORM);
+        propsets.set(PropNames.USAGE_CONTEXT_OF_SUPPRESS_AT_LINE_BREAK);
+        propsets.set(PropNames.VISIBILITY);
+        propsets.set(PropNames.WORD_SPACING);
+        propsets.set(PropNames.WRAP_OPTION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoPageNumberCitation
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.PAGE_NUMBER_CITATION, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoRetrieveMarker.java b/src/org/apache/fop/fo/flow/FoRetrieveMarker.java
new file mode 100644 (file)
index 0000000..272c7a7
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoRetrieveMarker extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.set(PropNames.RETRIEVE_BOUNDARY);
+        propsets.set(PropNames.RETRIEVE_CLASS_NAME);
+        propsets.set(PropNames.RETRIEVE_POSITION);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoRetrieveMarker
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.RETRIEVE_MARKER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTable.java b/src/org/apache/fop/fo/flow/FoTable.java
new file mode 100644 (file)
index 0000000..470fc65
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTable extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_COLLAPSE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_SEPARATION);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.TABLE_LAYOUT);
+        propsets.set(PropNames.TABLE_OMIT_FOOTER_AT_BREAK);
+        propsets.set(PropNames.TABLE_OMIT_HEADER_AT_BREAK);
+        propsets.set(PropNames.WIDTH);
+        propsets.set(PropNames.WRITING_MODE);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTable
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableAndCaption.java b/src/org/apache/fop/fo/flow/FoTableAndCaption.java
new file mode 100644 (file)
index 0000000..4c84af3
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableAndCaption extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.marginBlockSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.CAPTION_SIDE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.TEXT_ALIGN);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableAndCaption
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_AND_CAPTION, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableBody.java b/src/org/apache/fop/fo/flow/FoTableBody.java
new file mode 100644 (file)
index 0000000..5edbada
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableBody extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.VISIBILITY);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableBody
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_BODY, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableCaption.java b/src/org/apache/fop/fo/flow/FoTableCaption.java
new file mode 100644 (file)
index 0000000..954f248
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableCaption extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.INTRUSION_DISPLACE);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.WIDTH);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableCaption
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_CAPTION, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableCell.java b/src/org/apache/fop/fo/flow/FoTableCell.java
new file mode 100644 (file)
index 0000000..fe8141c
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableCell extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.paddingSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.COLUMN_NUMBER);
+        propsets.set(PropNames.DISPLAY_ALIGN);
+        propsets.set(PropNames.RELATIVE_ALIGN);
+        propsets.set(PropNames.EMPTY_CELLS);
+        propsets.set(PropNames.ENDS_ROW);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.INLINE_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.NUMBER_COLUMNS_SPANNED);
+        propsets.set(PropNames.NUMBER_ROWS_SPANNED);
+        propsets.set(PropNames.STARTS_ROW);
+        propsets.set(PropNames.WIDTH);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableCell
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_CELL, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableColumn.java b/src/org/apache/fop/fo/flow/FoTableColumn.java
new file mode 100644 (file)
index 0000000..9a49e4b
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableColumn extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.COLUMN_NUMBER);
+        propsets.set(PropNames.COLUMN_WIDTH);
+        propsets.set(PropNames.NUMBER_COLUMNS_REPEATED);
+        propsets.set(PropNames.NUMBER_COLUMNS_SPANNED);
+        propsets.set(PropNames.VISIBILITY);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableColumn
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_COLUMN, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableFooter.java b/src/org/apache/fop/fo/flow/FoTableFooter.java
new file mode 100644 (file)
index 0000000..d81cf94
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableFooter extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.VISIBILITY);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableFooter
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_FOOTER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableHeader.java b/src/org/apache/fop/fo/flow/FoTableHeader.java
new file mode 100644 (file)
index 0000000..be5ddf2
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableHeader extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.VISIBILITY);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableHeader
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_HEADER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoTableRow.java b/src/org/apache/fop/fo/flow/FoTableRow.java
new file mode 100644 (file)
index 0000000..bcaeb84
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoTableRow extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+        propsets.or(PropertySets.accessibilitySet);
+        propsets.or(PropertySets.auralSet);
+        propsets.or(PropertySets.backgroundSet);
+        propsets.or(PropertySets.borderSet);
+        propsets.or(PropertySets.relativePositionSet);
+        propsets.set(PropNames.BLOCK_PROGRESSION_DIMENSION);
+        propsets.set(PropNames.BORDER_AFTER_PRECEDENCE);
+        propsets.set(PropNames.BORDER_BEFORE_PRECEDENCE);
+        propsets.set(PropNames.BORDER_END_PRECEDENCE);
+        propsets.set(PropNames.BORDER_START_PRECEDENCE);
+        propsets.set(PropNames.BREAK_AFTER);
+        propsets.set(PropNames.BREAK_BEFORE);
+        propsets.set(PropNames.ID);
+        propsets.set(PropNames.HEIGHT);
+        propsets.set(PropNames.KEEP_TOGETHER);
+        propsets.set(PropNames.KEEP_WITH_NEXT);
+        propsets.set(PropNames.KEEP_WITH_PREVIOUS);
+        propsets.set(PropNames.VISIBILITY);
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap();
+        numProps = propsets.cardinality();
+        sparseIndices = new int[numProps];
+        int propx = 0;
+        for (int next = propsets.nextSetBit(0);
+                next >= 0;
+                next = propsets.nextSetBit(next + 1)) {
+            sparseIndices[propx] = next;
+            sparsePropsMap.put
+                        (Ints.consts.get(next), Ints.consts.get(propx++));
+        }
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoTableRow
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.TABLE_ROW, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}
diff --git a/src/org/apache/fop/fo/flow/FoWrapper.java b/src/org/apache/fop/fo/flow/FoWrapper.java
new file mode 100644 (file)
index 0000000..fbcccca
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * $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.
+ *
+ * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
+ */
+
+package org.apache.fop.fo.flow;
+
+// FOP
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.FOPropertySets;
+import org.apache.fop.fo.PropertySets;
+import org.apache.fop.fo.FObjectNames;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FOTree;
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.xml.FoXMLEvent;
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.datastructs.TreeException;
+import org.apache.fop.datatypes.PropertyValue;
+import org.apache.fop.datatypes.Ints;
+
+import java.util.HashMap;
+import java.util.BitSet;
+
+/**
+ * Implements the fo:simple-page-master flow object
+ */
+public class FoWrapper extends FONode {
+
+    private static final String tag = "$Name$";
+    private static final String revision = "$Revision$";
+
+    /** Map of <tt>Integer</tt> indices of <i>sparsePropsSet</i> array.
+        It is indexed by the FO index of the FO associated with a given
+        position in the <i>sparsePropsSet</i> array. See
+        {@link org.apache.fop.fo.FONode#sparsePropsSet FONode.sparsePropsSet}.
+     */
+    private static final HashMap sparsePropsMap;
+
+    /** An <tt>int</tt> array of of the applicable property indices, in
+        property index order. */
+    private static final int[] sparseIndices;
+
+    /** The number of applicable properties.  This is the size of the
+        <i>sparsePropsSet</i> array. */
+    private static final int numProps;
+
+    static {
+        // Collect the sets of properties that apply
+        BitSet propsets = new BitSet();
+
+        // Map these properties into sparsePropsSet
+        // sparsePropsSet is a HashMap containing the indicies of the
+        // sparsePropsSet array, indexed by the FO index of the FO slot
+        // in sparsePropsSet.
+        sparsePropsMap = new HashMap(1);
+        numProps = 1;
+        sparseIndices = new int[] { PropNames.ID };
+        sparsePropsMap.put
+            (Ints.consts.get(PropNames.ID), Ints.consts.get(0));
+    }
+
+    /**
+     * @param foTree the FO tree being built
+     * @param parent the parent FONode of this node
+     * @param event the <tt>FoXMLEvent</tt> that triggered the creation of
+     * this node
+     */
+    public FoWrapper
+                (FOTree foTree, FONode parent, FoXMLEvent event, int attrSet)
+        throws TreeException, FOPException
+    {
+        super(foTree, FObjectNames.WRAPPER, parent, event,
+                          attrSet, sparsePropsMap, sparseIndices, numProps);
+        FoXMLEvent ev;
+        String nowProcessing;
+
+        makeSparsePropsSet();
+    }
+
+}