xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sstei...@apache.org
Subject svn commit: r1619414 - /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java
Date Thu, 21 Aug 2014 14:42:06 GMT
Author: ssteiner
Date: Thu Aug 21 14:42:05 2014
New Revision: 1619414

URL: http://svn.apache.org/r1619414
Log:
FOP-2353: PDF-A preflight warnings

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java?rev=1619414&r1=1619413&r2=1619414&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/Metadata.java Thu Aug 21
14:42:05 2014
@@ -20,6 +20,7 @@
 package org.apache.xmlgraphics.xmp;
 
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -81,15 +82,17 @@ public class Metadata implements XMLizab
      * by each schema is used for the merge.
      * @param target the target metadata to merge the local metadata into
      */
-    public void mergeInto(Metadata target) {
+    public void mergeInto(Metadata target, List<Class> exclude) {
         XMPSchemaRegistry registry = XMPSchemaRegistry.getInstance();
         Iterator iter = properties.values().iterator();
         while (iter.hasNext()) {
             XMPProperty prop = (XMPProperty)iter.next();
             XMPSchema schema = registry.getSchema(prop.getNamespace());
-            MergeRuleSet rules = schema.getDefaultMergeRuleSet();
-            PropertyMerger merger = rules.getPropertyMergerFor(prop);
-            merger.merge(prop, target);
+            if (!exclude.contains(schema.getClass())) {
+                MergeRuleSet rules = schema.getDefaultMergeRuleSet();
+                PropertyMerger merger = rules.getPropertyMergerFor(prop);
+                merger.merge(prop, target);
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message