org.apache.xmlgraphics.xmp.merge

## Class MergeRuleSet

- java.lang.Object
- - org.apache.xmlgraphics.xmp.merge.MergeRuleSet

-     public class MergeRuleSet
      extends java.lang.Object

  Represents a set of rules used to merge to XMP properties. By default, all properties are merged by replacing any existing values with the value from the source XMP.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MergeRuleSet()` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRule(QName propName, PropertyMerger merger)` Adds a merge rule to this set.
    `PropertyMerger` | `getPropertyMergerFor(XMPProperty prop)` Returns the PropertyMerger that shall be used when merging the given property.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MergeRuleSet

          public MergeRuleSet()

      Main constructor.

  - ### Method Detail

    - #### getPropertyMergerFor

          public PropertyMerger getPropertyMergerFor(XMPProperty prop)

      Returns the PropertyMerger that shall be used when merging the given property.
      Parameters:
        `prop` - the property to be merged
      Returns:
        the PropertyMerger to be used for merging the property

    - #### addRule

          public void addRule(QName propName,
                              PropertyMerger merger)

      Adds a merge rule to this set.
      Parameters:
        `propName` - the name of the property
        `merger` - the property merger to be used for this property

Copyright 1999-2025 The Apache Software Foundation. All Rights Reserved.