Package org.mycore.mods.merger
Class MCRExtentMerger
java.lang.Object
org.mycore.mods.merger.MCRMerger
org.mycore.mods.merger.MCRExtentMerger
Compares and merges mods:extent elements.
- Author:
- Frank Lützenkirchen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isProbablySameAs
(MCRMerger other) Returns true, if the element wrapped by this merger probably represents the same information as the other.void
Merges the contents of the element wrapped by the other merger into the contents of the element wrapped by this merger.void
setElement
(Element element) Sets the MODS element wrapped and compared by this mergerMethods inherited from class org.mycore.mods.merger.MCRMerger
equals, getNodes, mergeAttributes, mergeElements
-
Constructor Details
-
MCRExtentMerger
public MCRExtentMerger()
-
-
Method Details
-
setElement
Description copied from class:MCRMerger
Sets the MODS element wrapped and compared by this merger- Overrides:
setElement
in classMCRMerger
-
isProbablySameAs
Description copied from class:MCRMerger
Returns true, if the element wrapped by this merger probably represents the same information as the other. The default implementation returns false and may be overwritten by subclasses implementing logic for specific MODS elements.- Overrides:
isProbablySameAs
in classMCRMerger
-
mergeFrom
Description copied from class:MCRMerger
Merges the contents of the element wrapped by the other merger into the contents of the element wrapped by this merger. Should only be called if this.isProbablySameAs(other). The default implementation copies all attributes from the other into this if they do not exist in this element. Afterwards it recursively builds mergers for all child elements and compares and eventually merges them too.
-