de.hpi.fgis.dude.util.merger
Class AbstractMerger
java.lang.Object
de.hpi.fgis.dude.util.merger.AbstractMerger
- All Implemented Interfaces:
- Merger
- Direct Known Subclasses:
- DefaultMerger
public abstract class AbstractMerger
- extends Object
- implements Merger
AbstractMerger
splits the merge functionality into the merging of data,
which should be implemented in subclasses and the merging of identifiers, which is done in this class.
- Author:
- Johannes Dyck
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMerger
public AbstractMerger()
merge
public DuDeObject merge(DuDeObject leftElement,
DuDeObject rightElement)
- Merges two
DuDeObject
s into one new DuDeObject
.
Identifiers will be merged into an array containing all DuDeObjectId
s
that are part of the new object. Each identifier will only appear once in this array.
The merging of the data is delegated to a subclass implementing the corresponding method.
- Specified by:
merge
in interface Merger
- Parameters:
leftElement
- One of the DuDeObjects
that shall be merged.rightElement
- The other DuDeObject
that shall be merged.
- Returns:
- A new
DuDeObject
created by merging the input DuDeObjects
.
mergeData
protected abstract JsonRecord mergeData(DuDeObject leftElement,
DuDeObject rightElement)
- Creates a new data set containing the merged data from the passed
DuDeObject
s.
- Parameters:
leftElement
- One of the DuDeObjects
that shall be merged.rightElement
- The other DuDeObject
that shall be merged.
- Returns:
- The new data set built from the passed
DuDeObject
s.
Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.