From 8a6f6d0013730c58b880c29a57bb2b830a7a2d0b Mon Sep 17 00:00:00 2001 From: Luca Furini Date: Tue, 17 May 2005 14:30:33 +0000 Subject: Footnote implementation: changes to existing files git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198637 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/flow/Footnote.java | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/java/org/apache/fop/fo/flow') diff --git a/src/java/org/apache/fop/fo/flow/Footnote.java b/src/java/org/apache/fop/fo/flow/Footnote.java index 2d161c2c8..7c7b1a8f8 100644 --- a/src/java/org/apache/fop/fo/flow/Footnote.java +++ b/src/java/org/apache/fop/fo/flow/Footnote.java @@ -38,7 +38,7 @@ public class Footnote extends FObj { private CommonAccessibility commonAccessibility; // End of property values - private Inline inlineFO = null; + private Inline footnoteCitation = null; private FootnoteBody footnoteBody; /** @@ -69,7 +69,7 @@ public class Footnote extends FObj { */ protected void endOfNode() throws FOPException { super.endOfNode(); - if (inlineFO == null || footnoteBody == null) { + if (footnoteCitation == null || footnoteBody == null) { missingChildElementError("(inline,footnote-body)"); } getFOEventHandler().endFootnote(this); @@ -87,11 +87,11 @@ public class Footnote extends FObj { protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { if (nsURI == FO_URI && localName.equals("inline")) { - if (inlineFO != null) { + if (footnoteCitation != null) { tooManyNodesError(loc, "fo:inline"); } } else if (nsURI == FO_URI && localName.equals("footnote-body")) { - if (inlineFO == null) { + if (footnoteCitation == null) { nodesOutOfOrderError(loc, "fo:inline", "fo:footnote-body"); } else if (footnoteBody != null) { tooManyNodesError(loc, "fo:footnote-body"); @@ -106,7 +106,7 @@ public class Footnote extends FObj { */ public void addChildNode(FONode child) { if (((FObj)child).getNameId() == FO_INLINE) { - inlineFO = (Inline) child; + footnoteCitation = (Inline) child; } else if (((FObj)child).getNameId() == FO_FOOTNOTE_BODY) { footnoteBody = (FootnoteBody) child; } @@ -114,10 +114,18 @@ public class Footnote extends FObj { /** * Public accessor for inline FO - * @return the Inline object stored as inline FO + * @return the Inline child */ - public Inline getInlineFO() { - return inlineFO; + public Inline getFootnoteCitation() { + return footnoteCitation; + } + + /** + * Public accessor for footnote-body FO + * @return the FootnoteBody child + */ + public FootnoteBody getFootnoteBody() { + return footnoteBody; } /** -- cgit v1.2.3