public class EMFModelObjectMerger
extends java.lang.Object
| Constructor and Description |
|---|
EMFModelObjectMerger() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activate method called by OSG DS on activation of a component
|
void |
addModelDiffVisitor(ModelDiffVisitor visitor)
Adds a
ModelDiffVisitor instance to the registry list |
ModelCompareResultType |
compare(Resource resourceNew,
Resource resourceOld)
Compares the two resources and returns the changes
|
ModelCompareResultType |
compare(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
Compares the two resources and returns the changes
|
ModelCompareResultType |
compareAndMerge(Resource resourceNew,
Resource resourceOld)
Compares the two resources and merges them into the right, the old object
|
ModelCompareResultType |
compareAndMerge(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
Compares the two resources and merges them into the right, the old object
|
Comparison |
compareRaw(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
Compares the two resources and returns the changes
|
void |
fireVisitorChanges(Resource resource)
Fires finished visiting call to all visitors.
|
boolean |
merge(java.util.List<Diff> differences)
Merges differences
|
void |
removeModelDiffVisitor(ModelDiffVisitor visitor)
Removed a visitor from the registry list
|
public ModelCompareResultType compareAndMerge(Resource resourceNew,
Resource resourceOld)
resourceNew - the resource with the new object versionresourceOld - the resource with the old, current object versiontrue, on success otherwise falsepublic ModelCompareResultType compareAndMerge(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
resourceNew - the resource with the new object versionresourceOld - the resource with the old, current object versionignoreFeatures - a list of EStructuralFeature to be ignored during comparetrue, on success otherwise falsepublic ModelCompareResultType compare(Resource resourceNew,
Resource resourceOld)
resourceNew - the resource with the new object versionresourceOld - the resource with the old, current object versionpublic ModelCompareResultType compare(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
resourceNew - the resource with the new object versionresourceOld - the resource with the old, current object versionignoreFeatures - a list of EStructuralFeature to be ignored during comparepublic Comparison compareRaw(Resource resourceNew,
Resource resourceOld,
java.util.List<EStructuralFeature> ignoreFeatures)
resourceNew - the resource with the new object versionresourceOld - the resource with the old, current object versionignoreFeatures - a list of EStructuralFeature to be ignored during comparepublic boolean merge(java.util.List<Diff> differences)
differences - the compare differences to mergetrue, if merge was successful, otherwise falsepublic void fireVisitorChanges(Resource resource)
resource - the changed, merged resourcepublic void activate()
public void addModelDiffVisitor(ModelDiffVisitor visitor)
ModelDiffVisitor instance to the registry listvisitor - the visitor to addpublic void removeModelDiffVisitor(ModelDiffVisitor visitor)
visitor - the visitor to be removedData In Motion Consulting