public class Adder
extends org.eclipse.emf.ecore.util.EcoreUtil.Copier
Adder is a specialized Copier that only adds
objects that don't exist in the target resource.
Changes to overridden methods are delimited by // DIFF comments| Modifier and Type | Field and Description |
|---|---|
protected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher |
matcher |
protected org.eclipse.emf.ecore.resource.Resource |
sourceResource |
protected org.eclipse.emf.ecore.resource.Resource |
targetResource |
| Constructor and Description |
|---|
Adder(com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher matcher,
org.eclipse.emf.ecore.resource.Resource targetResource,
org.eclipse.emf.ecore.resource.Resource sourceResource) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection |
copyAll(java.util.Collection eObjects) |
protected java.util.Collection |
copyAll(java.util.Collection eObjects,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference eReference) |
protected void |
copyContainment(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject copyEObject)
Called to handle the copying of a containment feature;
this adds a list of copies or sets a single copy as appropriate for the multiplicity.
|
protected void |
copyReference(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject copyEObject)
Called to handle the copying of a cross reference;
this adds values or sets a single value as appropriate for the multiplicity
while omitting any bidirectional reference that isn't in the copy map.
|
protected boolean |
shouldCopy(org.eclipse.emf.ecore.EObject eObject)
Returns whether or not this should copy the specified object.
|
protected boolean |
shouldCopy(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference eReference) |
copy, copyAttribute, copyAttributeValue, copyFeatureMap, copyProxyURI, copyReferences, createCopy, getTarget, getTarget, getTarget, getTargetclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeprotected com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher matcher
protected org.eclipse.emf.ecore.resource.Resource sourceResource
protected org.eclipse.emf.ecore.resource.Resource targetResource
public Adder(com.ibm.xtools.comparemerge.emf.delta.deltagenerator.matcher.Matcher matcher,
org.eclipse.emf.ecore.resource.Resource targetResource,
org.eclipse.emf.ecore.resource.Resource sourceResource)
matcher - the matcher used to match EObjectstargetResource - The target resource of the copysourceResource - The source resource of the copyprotected boolean shouldCopy(org.eclipse.emf.ecore.EObject eObject)
eObject - protected boolean shouldCopy(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference eReference)
public java.util.Collection copyAll(java.util.Collection eObjects)
copyAll in class org.eclipse.emf.ecore.util.EcoreUtil.Copierprotected java.util.Collection copyAll(java.util.Collection eObjects,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference eReference)
protected void copyContainment(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject copyEObject)
copyContainment in class org.eclipse.emf.ecore.util.EcoreUtil.CopiereReference - the feature to copy.eObject - the object from which to copy.copyEObject - the object to copy to.protected void copyReference(org.eclipse.emf.ecore.EReference eReference,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EObject copyEObject)
copyReference in class org.eclipse.emf.ecore.util.EcoreUtil.CopiereReference - the reference to copy.eObject - the object from which to copy.copyEObject - the object to copy to.