org.eclipse.uml2.uml.util
Class UMLUtil.PackageMerger

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>
              extended by org.eclipse.emf.ecore.util.EcoreUtil.Copier
                  extended by org.eclipse.uml2.uml.util.UMLUtil.PackageMerger
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EObject>
Direct Known Subclasses:
UMLUtil.TemplateExpander
Enclosing class:
UMLUtil

public static class UMLUtil.PackageMerger
extends org.eclipse.emf.ecore.util.EcoreUtil.Copier

A copier that merges the contents of packages involved in package merge relationships based on the rules defined in the UML specification.

See Also:
Serialized Form

Nested Class Summary
protected  class UMLUtil.PackageMerger.BodyMatcher
           
protected  class UMLUtil.PackageMerger.ImplicitAssociationNameMatcher
           
protected  class UMLUtil.PackageMerger.KeyMatcher
           
protected  class UMLUtil.PackageMerger.NameMatcher
           
protected  class UMLUtil.PackageMerger.ResultingQNameMatcher
           
protected  class UMLUtil.PackageMerger.SourceMatcher
           
protected  class UMLUtil.PackageMerger.StringValueMatcher
           
protected  class UMLUtil.PackageMerger.TypeMatcher
           
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static int ASSOCIATION_SPECIALIZATION
          The diagnostic code for cases where an association specialization is missing.
static int ATTRIBUTE_TRANSFORMATION
          The diagnostic code for cases where an attribute transformation should be performed.
static int CAPABILITY
          The diagnostic code for cases where capability information is missing.
protected  java.util.Map<java.lang.Object,java.lang.Object> context
           
protected  org.eclipse.emf.common.util.DiagnosticChain diagnostics
           
static int DIFFERENT_PROPERTY_STATICITY
          The diagnostic code for cases where the staticity of merged properties does not match.
static int DIFFERENT_PROPERTY_UNIQUENESS
          The diagnostic code for cases where the uniqueness of merged properties does not match.
static int EMPTY_QUALIFIED_NAME
          The diagnostic code for cases where the qualified named of a classifier in a receiving or merged package is empty.
static int EMPTY_UNION
          The diagnostic code for cases where an empty union is detected.
static int IMPLICIT_REDEFINITION
          The diagnostic code for cases where an implicit redefinition is detected.
static int INDISTINGUISHABLE_CLASSIFIER
          The diagnostic code for cases where a classifier in a receiving or merged package is indistinguishable.
static int INVALID_REDEFINITION
          The diagnostic code for cases where an invalid redefinition is detected.
static int INVALID_SUBSET
          The diagnostic code for cases where an invalid subset is detected.
protected  java.util.Collection<? extends TemplateableElement> mergedElements
           
protected  java.util.Collection<Package> mergedPackages
          Deprecated. Use the mergedElements, instead
static java.lang.String OPTION__ASSOCIATION_SPECIALIZATIONS
          The option for handling cases where an association specialization is missing.
static java.lang.String OPTION__ATTRIBUTE_TRANSFORMATIONS
          The option for handling cases where an attribute transformation should be performed.
static java.lang.String OPTION__CAPABILITIES
          The option for handling cases where capability information is missing.
static java.lang.String OPTION__DIFFERENT_PROPERTY_STATICITY
          The option for handling cases where the staticity of merged properties does not match.
static java.lang.String OPTION__DIFFERENT_PROPERTY_UNIQUENESS
          The option for handling cases where the uniqueness of merged properties does not match.
static java.lang.String OPTION__EMPTY_QUALIFIED_NAMES
          The option for handling cases where a classifier with an empty qualified name is detected.
static java.lang.String OPTION__EMPTY_UNIONS
          The option for handling cases where an empty union is detected.
static java.lang.String OPTION__IMPLICIT_REDEFINITIONS
          The option for handling cases where an implicit redefinition is detected.
static java.lang.String OPTION__INDISTINGUISHABLE_CLASSIFIERS
          The option for handling cases where an indistinguishable classifier is detected.
static java.lang.String OPTION__INVALID_REDEFINITIONS
          The option for handling cases where an invalid redefinition is detected.
static java.lang.String OPTION__INVALID_SUBSETS
          The option for handling cases where an invalid subset is detected.
static java.lang.String OPTION__REDUNDANT_GENERALIZATIONS
          The option for handling cases where a redundant generalization is detected.
protected  java.util.Map<java.lang.String,java.lang.String> options
           
protected  TemplateableElement receivingElement
           
protected  Package receivingPackage
          Deprecated. Use the receivingElement, instead.
static int REDUNDANT_GENERALIZATION
          The diagnostic code for cases where a redundant generalization is detected.
protected  java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> resultingToMergedEObjectMap
           
 
Fields inherited from class org.eclipse.emf.ecore.util.EcoreUtil.Copier
resolveProxies, useOriginalReferences
 
Constructor Summary
UMLUtil.PackageMerger()
           
 
Method Summary
protected  void cleanupMergeRelationships()
          Cleans up (removing or otherwise trimming as necessary) the relationships on the receivingElement that define the merges that were performed.
 org.eclipse.emf.ecore.EObject copy(org.eclipse.emf.ecore.EObject eObject)
           
<T> java.util.Collection<T>
copyAll(java.util.Collection<? extends T> eObjects)
           
protected  void copyAttribute(org.eclipse.emf.ecore.EAttribute eAttribute, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyEObject)
           
protected  void copyContainment(org.eclipse.emf.ecore.EReference eReference, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyEObject)
           
protected  void copyReference(org.eclipse.emf.ecore.EReference eReference, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyEObject)
           
protected  org.eclipse.emf.ecore.EObject createCopy(org.eclipse.emf.ecore.EObject eObject)
           
protected  java.util.Collection<Package> getAllMergedPackages(Package package_)
           
protected  UML2Util.EObjectMatcher getAssociationMatcher(Association association)
           
protected  NamedElement getCapability(org.eclipse.emf.ecore.EObject mergedEObject)
          Obtains the element representing the capability that contributes a merged object.
protected
<EO extends org.eclipse.emf.ecore.EObject>
java.util.List<EO>
getMatchCandidates(EO eObject)
           
protected
<EO extends org.eclipse.emf.ecore.EObject>
java.util.List<EO>
getMergedEObjects(EO resultingEObject)
           
protected
<EO extends org.eclipse.emf.ecore.EObject>
EO
getPreviouslyMergedEObject(EO resultingEObject)
           
protected  NamedElement getReceivingElement(org.eclipse.emf.ecore.EObject resultingEObject)
          Obtains the element receiving a capability from a package merge.
protected  java.lang.String getResultingQName(org.eclipse.emf.ecore.EObject eObject)
           
protected  boolean isPackageMerge()
          Queries whether the current operation is a package merge, or some derivative.
 java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(Package package_, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Merges the contents of (all of) the packages merged by the specified package using the specified options, reporting problems to the specified diagnostics, within the specified context.
protected  java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(TemplateableElement receivingElement, java.util.Collection<? extends TemplateableElement> mergedElements, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Merges the contents of (all of) the elements merged by the specified package using the specified options, reporting problems to the specified diagnostics, within the specified context.
protected  void mergeAssociation_IsDerived(Association receivingAssociation, Association mergedAssociation)
           
protected  void mergeClassifier_IsAbstract(Classifier receivingClassifier, Classifier mergedClassifier)
           
protected  void mergeClassifier_IsFinalSpecialization(Classifier receivingClassifier, Classifier mergedClassifier)
           
protected  void mergeLiteralInteger_Value(LiteralInteger receivingLiteralInteger, LiteralInteger mergedLiteralInteger)
          Deprecated. 4.2 these values are only merged in the context of MultiplicityElement lower-bounds, which is done by the mergeMultiplicityElement_Lower(MultiplicityElement, MultiplicityElement) method
protected  void mergeLiteralUnlimitedNatural_Value(LiteralUnlimitedNatural receivingLiteralUnlimitedNatural, LiteralUnlimitedNatural mergedLiteralUnlimitedNatural)
          Deprecated. 4.2 these values are only merged in the context of MultiplicityElement upper-bounds, which is done by the mergeMultiplicityElement_Upper(MultiplicityElement, MultiplicityElement) method
protected  void mergeMultiplicityElement_IsOrdered(MultiplicityElement receivingMultiplicityElement, MultiplicityElement mergedMultiplicityElement)
           
protected  void mergeMultiplicityElement_IsUnique(MultiplicityElement receivingMultiplicityElement, MultiplicityElement mergedMultiplicityElement)
           
protected  void mergeMultiplicityElement_Lower(MultiplicityElement receivingMultiplicityElement, MultiplicityElement mergedMultiplicityElement)
           
protected  void mergeMultiplicityElement_Upper(MultiplicityElement receivingMultiplicityElement, MultiplicityElement mergedMultiplicityElement)
           
protected  void mergeNamedElement_Visibility(NamedElement receivingNamedElement, NamedElement mergedNamedElement)
           
protected  void mergeProperty_IsDerived(Property receivingProperty, Property mergedProperty)
           
protected  void mergeProperty_IsDerivedUnion(Property receivingProperty, Property mergedProperty)
           
protected  void mergeRedefinableElement_IsLeaf(RedefinableElement receivingRedefinableElement, RedefinableElement mergedRedefinableElement)
           
protected  void mergeStructuralFeature_IsReadOnly(StructuralFeature receivingStructuralFeature, StructuralFeature mergedStructuralFeature)
           
protected  void mergeTypedElement_Type(TypedElement receivingTypedElement, TypedElement mergedTypedElement)
           
protected  void processAssociationSpecializations(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processCapabilities(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processDifferentPropertyStaticity(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processDifferentPropertyUniqueness(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processEmptyQualifiedNames(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processEmptyUnions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processImplicitRedefinitions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processIndistinguishableClassifiers(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processInvalidRedefinitions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processInvalidSubsets(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processOptions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void processRedundantGeneralizations(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  void updateReferences()
          Updates the merge results to replace references to elements in merged packages by references to their counterparts in the merge result.
 
Methods inherited from class org.eclipse.emf.ecore.util.EcoreUtil.Copier
copyAttributeValue, copyFeatureMap, copyProxyURI, copyReferences, getTarget, getTarget, getTarget, getTarget
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

OPTION__DIFFERENT_PROPERTY_STATICITY

public static final java.lang.String OPTION__DIFFERENT_PROPERTY_STATICITY
The option for handling cases where the staticity of merged properties does not match. Supported choices are OPTION__IGNORE and OPTION__REPORT.

See Also:
Constant Field Values

OPTION__DIFFERENT_PROPERTY_UNIQUENESS

public static final java.lang.String OPTION__DIFFERENT_PROPERTY_UNIQUENESS
The option for handling cases where the uniqueness of merged properties does not match. Supported choices are OPTION__IGNORE and OPTION__REPORT.

See Also:
Constant Field Values

OPTION__REDUNDANT_GENERALIZATIONS

public static final java.lang.String OPTION__REDUNDANT_GENERALIZATIONS
The option for handling cases where a redundant generalization is detected. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__DISCARD.

See Also:
Constant Field Values

OPTION__IMPLICIT_REDEFINITIONS

public static final java.lang.String OPTION__IMPLICIT_REDEFINITIONS
The option for handling cases where an implicit redefinition is detected. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__INVALID_REDEFINITIONS

public static final java.lang.String OPTION__INVALID_REDEFINITIONS
The option for handling cases where an invalid redefinition is detected. Supported choices are OPTION__IGNORE, OPTION__REPORT, OPTION__DISCARD, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__INVALID_SUBSETS

public static final java.lang.String OPTION__INVALID_SUBSETS
The option for handling cases where an invalid subset is detected. Supported choices are OPTION__IGNORE, OPTION__REPORT, OPTION__DISCARD, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__EMPTY_UNIONS

public static final java.lang.String OPTION__EMPTY_UNIONS
The option for handling cases where an empty union is detected. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__ASSOCIATION_SPECIALIZATIONS

public static final java.lang.String OPTION__ASSOCIATION_SPECIALIZATIONS
The option for handling cases where an association specialization is missing. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__CAPABILITIES

public static final java.lang.String OPTION__CAPABILITIES
The option for handling cases where capability information is missing. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__EMPTY_QUALIFIED_NAMES

public static final java.lang.String OPTION__EMPTY_QUALIFIED_NAMES
The option for handling cases where a classifier with an empty qualified name is detected. Supported choices are OPTION__IGNORE and OPTION__REPORT.

See Also:
Constant Field Values

OPTION__INDISTINGUISHABLE_CLASSIFIERS

public static final java.lang.String OPTION__INDISTINGUISHABLE_CLASSIFIERS
The option for handling cases where an indistinguishable classifier is detected. Supported choices are OPTION__IGNORE and OPTION__REPORT.

See Also:
Constant Field Values

OPTION__ATTRIBUTE_TRANSFORMATIONS

public static final java.lang.String OPTION__ATTRIBUTE_TRANSFORMATIONS
The option for handling cases where an attribute transformation should be performed. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

DIFFERENT_PROPERTY_STATICITY

public static final int DIFFERENT_PROPERTY_STATICITY
The diagnostic code for cases where the staticity of merged properties does not match.

See Also:
Constant Field Values

DIFFERENT_PROPERTY_UNIQUENESS

public static final int DIFFERENT_PROPERTY_UNIQUENESS
The diagnostic code for cases where the uniqueness of merged properties does not match.

See Also:
Constant Field Values

REDUNDANT_GENERALIZATION

public static final int REDUNDANT_GENERALIZATION
The diagnostic code for cases where a redundant generalization is detected.

See Also:
Constant Field Values

IMPLICIT_REDEFINITION

public static final int IMPLICIT_REDEFINITION
The diagnostic code for cases where an implicit redefinition is detected.

See Also:
Constant Field Values

INVALID_REDEFINITION

public static final int INVALID_REDEFINITION
The diagnostic code for cases where an invalid redefinition is detected.

See Also:
Constant Field Values

INVALID_SUBSET

public static final int INVALID_SUBSET
The diagnostic code for cases where an invalid subset is detected.

See Also:
Constant Field Values

EMPTY_UNION

public static final int EMPTY_UNION
The diagnostic code for cases where an empty union is detected.

See Also:
Constant Field Values

ASSOCIATION_SPECIALIZATION

public static final int ASSOCIATION_SPECIALIZATION
The diagnostic code for cases where an association specialization is missing.

See Also:
Constant Field Values

CAPABILITY

public static final int CAPABILITY
The diagnostic code for cases where capability information is missing.

See Also:
Constant Field Values

EMPTY_QUALIFIED_NAME

public static final int EMPTY_QUALIFIED_NAME
The diagnostic code for cases where the qualified named of a classifier in a receiving or merged package is empty.

See Also:
Constant Field Values

INDISTINGUISHABLE_CLASSIFIER

public static final int INDISTINGUISHABLE_CLASSIFIER
The diagnostic code for cases where a classifier in a receiving or merged package is indistinguishable.

See Also:
Constant Field Values

ATTRIBUTE_TRANSFORMATION

public static final int ATTRIBUTE_TRANSFORMATION
The diagnostic code for cases where an attribute transformation should be performed.

See Also:
Constant Field Values

receivingElement

protected TemplateableElement receivingElement

mergedElements

protected java.util.Collection<? extends TemplateableElement> mergedElements

receivingPackage

@Deprecated
protected Package receivingPackage
Deprecated. Use the receivingElement, instead.

mergedPackages

@Deprecated
protected java.util.Collection<Package> mergedPackages
Deprecated. Use the mergedElements, instead

resultingToMergedEObjectMap

protected final java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> resultingToMergedEObjectMap

options

protected java.util.Map<java.lang.String,java.lang.String> options

diagnostics

protected org.eclipse.emf.common.util.DiagnosticChain diagnostics

context

protected java.util.Map<java.lang.Object,java.lang.Object> context
Constructor Detail

UMLUtil.PackageMerger

public UMLUtil.PackageMerger()
Method Detail

getMatchCandidates

protected <EO extends org.eclipse.emf.ecore.EObject> java.util.List<EO> getMatchCandidates(EO eObject)

getMergedEObjects

protected <EO extends org.eclipse.emf.ecore.EObject> java.util.List<EO> getMergedEObjects(EO resultingEObject)

getPreviouslyMergedEObject

protected <EO extends org.eclipse.emf.ecore.EObject> EO getPreviouslyMergedEObject(EO resultingEObject)

getResultingQName

protected java.lang.String getResultingQName(org.eclipse.emf.ecore.EObject eObject)

mergeAssociation_IsDerived

protected void mergeAssociation_IsDerived(Association receivingAssociation,
                                          Association mergedAssociation)

mergeClassifier_IsAbstract

protected void mergeClassifier_IsAbstract(Classifier receivingClassifier,
                                          Classifier mergedClassifier)

mergeClassifier_IsFinalSpecialization

protected void mergeClassifier_IsFinalSpecialization(Classifier receivingClassifier,
                                                     Classifier mergedClassifier)

mergeLiteralInteger_Value

@Deprecated
protected void mergeLiteralInteger_Value(LiteralInteger receivingLiteralInteger,
                                                    LiteralInteger mergedLiteralInteger)
Deprecated. 4.2 these values are only merged in the context of MultiplicityElement lower-bounds, which is done by the mergeMultiplicityElement_Lower(MultiplicityElement, MultiplicityElement) method


mergeLiteralUnlimitedNatural_Value

@Deprecated
protected void mergeLiteralUnlimitedNatural_Value(LiteralUnlimitedNatural receivingLiteralUnlimitedNatural,
                                                             LiteralUnlimitedNatural mergedLiteralUnlimitedNatural)
Deprecated. 4.2 these values are only merged in the context of MultiplicityElement upper-bounds, which is done by the mergeMultiplicityElement_Upper(MultiplicityElement, MultiplicityElement) method


mergeMultiplicityElement_IsOrdered

protected void mergeMultiplicityElement_IsOrdered(MultiplicityElement receivingMultiplicityElement,
                                                  MultiplicityElement mergedMultiplicityElement)

mergeMultiplicityElement_IsUnique

protected void mergeMultiplicityElement_IsUnique(MultiplicityElement receivingMultiplicityElement,
                                                 MultiplicityElement mergedMultiplicityElement)

mergeMultiplicityElement_Lower

protected void mergeMultiplicityElement_Lower(MultiplicityElement receivingMultiplicityElement,
                                              MultiplicityElement mergedMultiplicityElement)

mergeMultiplicityElement_Upper

protected void mergeMultiplicityElement_Upper(MultiplicityElement receivingMultiplicityElement,
                                              MultiplicityElement mergedMultiplicityElement)

mergeNamedElement_Visibility

protected void mergeNamedElement_Visibility(NamedElement receivingNamedElement,
                                            NamedElement mergedNamedElement)

mergeProperty_IsDerived

protected void mergeProperty_IsDerived(Property receivingProperty,
                                       Property mergedProperty)

mergeProperty_IsDerivedUnion

protected void mergeProperty_IsDerivedUnion(Property receivingProperty,
                                            Property mergedProperty)

mergeRedefinableElement_IsLeaf

protected void mergeRedefinableElement_IsLeaf(RedefinableElement receivingRedefinableElement,
                                              RedefinableElement mergedRedefinableElement)

mergeStructuralFeature_IsReadOnly

protected void mergeStructuralFeature_IsReadOnly(StructuralFeature receivingStructuralFeature,
                                                 StructuralFeature mergedStructuralFeature)

copyAttribute

protected void copyAttribute(org.eclipse.emf.ecore.EAttribute eAttribute,
                             org.eclipse.emf.ecore.EObject eObject,
                             org.eclipse.emf.ecore.EObject copyEObject)
Overrides:
copyAttribute in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

copyContainment

protected void copyContainment(org.eclipse.emf.ecore.EReference eReference,
                               org.eclipse.emf.ecore.EObject eObject,
                               org.eclipse.emf.ecore.EObject copyEObject)
Overrides:
copyContainment in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

mergeTypedElement_Type

protected void mergeTypedElement_Type(TypedElement receivingTypedElement,
                                      TypedElement mergedTypedElement)

copyReference

protected void copyReference(org.eclipse.emf.ecore.EReference eReference,
                             org.eclipse.emf.ecore.EObject eObject,
                             org.eclipse.emf.ecore.EObject copyEObject)
Overrides:
copyReference in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

getAssociationMatcher

protected UML2Util.EObjectMatcher getAssociationMatcher(Association association)

createCopy

protected org.eclipse.emf.ecore.EObject createCopy(org.eclipse.emf.ecore.EObject eObject)
Overrides:
createCopy in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

copy

public org.eclipse.emf.ecore.EObject copy(org.eclipse.emf.ecore.EObject eObject)
Overrides:
copy in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

copyAll

public <T> java.util.Collection<T> copyAll(java.util.Collection<? extends T> eObjects)
Overrides:
copyAll in class org.eclipse.emf.ecore.util.EcoreUtil.Copier

getAllMergedPackages

protected java.util.Collection<Package> getAllMergedPackages(Package package_)

updateReferences

protected void updateReferences()
Updates the merge results to replace references to elements in merged packages by references to their counterparts in the merge result. This accounts for any references that the receiving package had to elements in the merged packages before the merge.

Since:
5.0

processDifferentPropertyStaticity

protected void processDifferentPropertyStaticity(java.util.Map<java.lang.String,java.lang.String> options,
                                                 org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)

processDifferentPropertyUniqueness

protected void processDifferentPropertyUniqueness(java.util.Map<java.lang.String,java.lang.String> options,
                                                  org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                  java.util.Map<java.lang.Object,java.lang.Object> context)

processImplicitRedefinitions

protected void processImplicitRedefinitions(java.util.Map<java.lang.String,java.lang.String> options,
                                            org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                            java.util.Map<java.lang.Object,java.lang.Object> context)

processInvalidRedefinitions

protected void processInvalidRedefinitions(java.util.Map<java.lang.String,java.lang.String> options,
                                           org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                           java.util.Map<java.lang.Object,java.lang.Object> context)

processInvalidSubsets

protected void processInvalidSubsets(java.util.Map<java.lang.String,java.lang.String> options,
                                     org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)

processEmptyUnions

protected void processEmptyUnions(java.util.Map<java.lang.String,java.lang.String> options,
                                  org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                  java.util.Map<java.lang.Object,java.lang.Object> context)

processRedundantGeneralizations

protected void processRedundantGeneralizations(java.util.Map<java.lang.String,java.lang.String> options,
                                               org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                               java.util.Map<java.lang.Object,java.lang.Object> context)

processEmptyQualifiedNames

protected void processEmptyQualifiedNames(java.util.Map<java.lang.String,java.lang.String> options,
                                          org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)

processIndistinguishableClassifiers

protected void processIndistinguishableClassifiers(java.util.Map<java.lang.String,java.lang.String> options,
                                                   org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                   java.util.Map<java.lang.Object,java.lang.Object> context)

processAssociationSpecializations

protected void processAssociationSpecializations(java.util.Map<java.lang.String,java.lang.String> options,
                                                 org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)

processCapabilities

protected void processCapabilities(java.util.Map<java.lang.String,java.lang.String> options,
                                   org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)

getReceivingElement

protected NamedElement getReceivingElement(org.eclipse.emf.ecore.EObject resultingEObject)
Obtains the element receiving a capability from a package merge.

Parameters:
resultingEObject - an object resulting from the copy step of a package merge
Returns:
the receiving element, or null if there is no merge receiver distinguished for this element
Since:
5.0

getCapability

protected NamedElement getCapability(org.eclipse.emf.ecore.EObject mergedEObject)
Obtains the element representing the capability that contributes a merged object.

Parameters:
mergedEObject - an source object from the copy step of a package merge
Returns:
the capability element (never null)
Since:
5.0

processOptions

protected void processOptions(java.util.Map<java.lang.String,java.lang.String> options,
                              org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                              java.util.Map<java.lang.Object,java.lang.Object> context)

merge

public java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(Package package_,
                                                                                                        java.util.Map<java.lang.String,java.lang.String> options,
                                                                                                        org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                                                                        java.util.Map<java.lang.Object,java.lang.Object> context)
Merges the contents of (all of) the packages merged by the specified package using the specified options, reporting problems to the specified diagnostics, within the specified context.

Parameters:
package_ - The receiving package.
options - The options to use.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Returns:
A traceability map from resulting elements to merged elements.

isPackageMerge

protected boolean isPackageMerge()
Queries whether the current operation is a package merge, or some derivative.

Returns:
whether I am a package merge operation (true) or something else ()
Since:
5.0

cleanupMergeRelationships

protected void cleanupMergeRelationships()
Cleans up (removing or otherwise trimming as necessary) the relationships on the receivingElement that define the merges that were performed.

Since:
5.0

merge

protected java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(TemplateableElement receivingElement,
                                                                                                           java.util.Collection<? extends TemplateableElement> mergedElements,
                                                                                                           java.util.Map<java.lang.String,java.lang.String> options,
                                                                                                           org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                                                                           java.util.Map<java.lang.Object,java.lang.Object> context)
Merges the contents of (all of) the elements merged by the specified package using the specified options, reporting problems to the specified diagnostics, within the specified context.

Parameters:
package_ - The receiving package.
options - The options to use.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Returns:
A traceability map from resulting elements to merged elements.
Since:
5.0

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.