From aea517e9d3c81ad85e0e7563d6aa57b333a36228 Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Wed, 28 May 2008 12:53:15 +0000 Subject: Added the ability for an implementing AreaTreeObject to contain child extension attachments git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@660929 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/AreaTreeObject.java | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/java/org') diff --git a/src/java/org/apache/fop/area/AreaTreeObject.java b/src/java/org/apache/fop/area/AreaTreeObject.java index 1c2269a01..7fa30aee9 100644 --- a/src/java/org/apache/fop/area/AreaTreeObject.java +++ b/src/java/org/apache/fop/area/AreaTreeObject.java @@ -21,6 +21,7 @@ package org.apache.fop.area; import java.util.Collections; import java.util.Iterator; +import java.util.List; import java.util.Map; import org.apache.xmlgraphics.util.QName; @@ -33,6 +34,9 @@ public abstract class AreaTreeObject { /** Foreign attributes */ protected Map foreignAttributes = null; + /** Extension attachments */ + protected List/**/ extensionAttachments = null; + /** * Sets a foreign attribute. * @param name the qualified name of the attribute @@ -84,5 +88,20 @@ public abstract class AreaTreeObject { } } - + /** + * Set extension attachments from a List + * @param extensionAttachments a List with extension attachments + */ + public void setExtensionAttachments(List extensionAttachments) { + this.extensionAttachments = extensionAttachments; + } + + /** @return the extension attachments associated with this area */ + public List getExtensionAttachments() { + if (this.foreignAttributes != null) { + return Collections.unmodifiableList(this.extensionAttachments); + } else { + return Collections.EMPTY_LIST; + } + } } -- cgit v1.2.3