aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-05-28 12:53:15 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-05-28 12:53:15 +0000
commitaea517e9d3c81ad85e0e7563d6aa57b333a36228 (patch)
treea92bf4b621ae99d98642f424b280a6aa20fb5108 /src/java/org
parentfaee0f13f0e61bd537dd18a221e8fa7650b05a5d (diff)
downloadxmlgraphics-fop-aea517e9d3c81ad85e0e7563d6aa57b333a36228.tar.gz
xmlgraphics-fop-aea517e9d3c81ad85e0e7563d6aa57b333a36228.zip
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
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/area/AreaTreeObject.java21
1 files changed, 20 insertions, 1 deletions
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/*<ExtensionAttachment>*/ 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;
+ }
+ }
}