org.eclipse.emf.mapping.impl
Class MappingImpl

java.lang.Object
  |
  +--org.eclipse.emf.common.notify.impl.NotifierImpl
        |
        +--org.eclipse.emf.ecore.impl.EObjectImpl
              |
              +--org.eclipse.emf.mapping.impl.MappingImpl
All Implemented Interfaces:
EObject, InternalEObject, Mapping, Notifier
Direct Known Subclasses:
MappingRootImpl

public class MappingImpl
extends EObjectImpl
implements Mapping

An implementation of the model object 'Mapping'.

The following features are implemented:


Inner Class Summary
static class MappingImpl.MappingTreeIterator
          This implements a tree iterator that will iterate over a mapping, all it's nested mappings, all their nested mappings, and so on.
 
Inner classes inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
EObjectImpl.EPropertiesHolder, EObjectImpl.EPropertiesHolderImpl
 
Field Summary
protected  MappingHelper helper
          The cached value of the 'Helper' containment reference.
protected  EList inputs
          The cached value of the 'Inputs' reference list.
protected  EList nested
          The cached value of the 'Nested' containment reference list.
protected  EList outputs
          The cached value of the 'Outputs' reference list.
protected  Mapping typeMapping
          The cached value of the 'Type Mapping' reference.
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eContainer, eContainerFeatureID, ELAST_EOBJECT_FLAG, eProperties
 
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
protected MappingImpl()
          
 
Method Summary
 Mapping basicGetTypeMapping()
          
 NotificationChain basicSetHelper(MappingHelper newHelper, NotificationChain msgs)
          
 NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
          
 java.lang.Object eGet(EStructuralFeature eFeature, boolean resolve)
          
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
          
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, java.lang.Class baseClass, NotificationChain msgs)
          
 boolean eIsSet(EStructuralFeature eFeature)
          
 void eSet(EStructuralFeature eFeature, java.lang.Object newValue)
          
protected  EClass eStaticClass()
          
 void eUnset(EStructuralFeature eFeature)
          
 EList getBottoms()
          This returns the same as either getInputs() or getOutputs() depending on the mapping root's isTopToBottom.
 MappingHelper getEffectiveHelper()
          This returns the mapping helper for this mapping, if it has one.
 MappingHelper getHelper()
          
 EList getInputs()
          
 java.util.Collection getMappedObjects()
          This returns a set containing the results of getInputs() and getOutputs().
 MappingRoot getMappingRoot()
          This returns either the containing mapping root or the object itself, if it is a mapping root.
 EList getNested()
          
 Mapping getNestedIn()
          
 EList getOutputs()
          
 EList getReceivers()
          This returns the same as getOutputs() if isReverse() returns false.
 EList getSenders()
          This returns the same as getInputs() if isReverse() returns false.
 EList getTops()
          This returns the same as either getInputs() or getOutputs() depending on the mapping root's isTopToBottom.
 Mapping getTypeMapping()
          
 boolean isReverse()
          This method is delegated to the containing mapping if one exists, or returns false otherwise.
 void setHelper(MappingHelper newHelper)
          
 void setNestedIn(Mapping newNestedIn)
          
 void setTypeMapping(Mapping newTypeMapping)
          
 java.lang.String toString()
           
 TreeIterator treeIterator()
          This returns a tree iterator that iterates over this mapping, all it's nested mappings, and their nested mappings, and so on.
 TreeIterator treeIterator(boolean includeRoot)
          This returns a tree iterator that iterates over this mapping (but only if includeRoot is true), all it's nested mappings, and their nested mappings, and so on.
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicSetContainer, eClass, eContainer, eContainerFeatureID, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicFeatureID, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicSet, eDynamicUnset, eGet, eHasSettings, eInternalResource, eIsProxy, eObjectForURIFragmentSegment, eProperties, eProxyURI, eResource, eSetClass, eSetProxyURI, eSetResource, eSetting, eSettingDelegate, eSettings, eStaticFeatureCount, eURIFragmentSegment
 
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, eDeliver, eNotificationRequired, eNotify, eSetDeliver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainmentFeature, eContents, eCrossReferences, eGet, eIsProxy, eResource
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Field Detail

helper

protected MappingHelper helper
The cached value of the 'Helper' containment reference.
See Also:
getHelper()

nested

protected EList nested
The cached value of the 'Nested' containment reference list.
See Also:
getNested()

inputs

protected EList inputs
The cached value of the 'Inputs' reference list.
See Also:
getInputs()

outputs

protected EList outputs
The cached value of the 'Outputs' reference list.
See Also:
getOutputs()

typeMapping

protected Mapping typeMapping
The cached value of the 'Type Mapping' reference.
See Also:
getTypeMapping()
Constructor Detail

MappingImpl

protected MappingImpl()
Method Detail

eStaticClass

protected EClass eStaticClass()
Overrides:
eStaticClass in class EObjectImpl

getHelper

public MappingHelper getHelper()
Specified by:
getHelper in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Helper' containment reference.
See Also:
Mapping.setHelper(MappingHelper), MappingPackage.getMapping_Helper(), MappingHelper.getMapper()

basicSetHelper

public NotificationChain basicSetHelper(MappingHelper newHelper,
                                        NotificationChain msgs)

setHelper

public void setHelper(MappingHelper newHelper)
Specified by:
setHelper in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Parameters:
value - the new value of the 'Helper' containment reference.
See Also:
Mapping.getHelper()

getNested

public EList getNested()
Specified by:
getNested in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Nested' containment reference list.
See Also:
MappingPackage.getMapping_Nested(), Mapping.getNestedIn()

getNestedIn

public Mapping getNestedIn()
Specified by:
getNestedIn in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Nested In' container reference.
See Also:
Mapping.setNestedIn(Mapping), MappingPackage.getMapping_NestedIn(), Mapping.getNested()

setNestedIn

public void setNestedIn(Mapping newNestedIn)
Specified by:
setNestedIn in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Parameters:
value - the new value of the 'Nested In' container reference.
See Also:
Mapping.getNestedIn()

getInputs

public EList getInputs()
Specified by:
getInputs in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Inputs' reference list.
See Also:
MappingPackage.getMapping_Inputs()

getOutputs

public EList getOutputs()
Specified by:
getOutputs in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Outputs' reference list.
See Also:
MappingPackage.getMapping_Outputs()

getTypeMapping

public Mapping getTypeMapping()
Specified by:
getTypeMapping in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Returns:
the value of the 'Type Mapping' reference.
See Also:
Mapping.setTypeMapping(Mapping), MappingPackage.getMapping_TypeMapping()

basicGetTypeMapping

public Mapping basicGetTypeMapping()

setTypeMapping

public void setTypeMapping(Mapping newTypeMapping)
Specified by:
setTypeMapping in interface Mapping
Following copied from interface: org.eclipse.emf.mapping.Mapping
Parameters:
value - the new value of the 'Type Mapping' reference.
See Also:
Mapping.getTypeMapping()

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     java.lang.Class baseClass,
                                     NotificationChain msgs)
Overrides:
eInverseAdd in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        java.lang.Class baseClass,
                                        NotificationChain msgs)
Overrides:
eInverseRemove in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

eBasicRemoveFromContainer

public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
Overrides:
eBasicRemoveFromContainer in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.InternalEObject
Returns:
accumulated notifications.

eGet

public java.lang.Object eGet(EStructuralFeature eFeature,
                             boolean resolve)
Specified by:
eGet in interface EObject
Overrides:
eGet in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature of the value to fetch.
resolve - whether to resolve.
Returns:
the value of the given feature of the object.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features.
See Also:
InternalEList.basicIterator(), InternalEList.basicList(), EcoreUtil.resolve(EObject, ResourceSet), EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature)

eSet

public void eSet(EStructuralFeature eFeature,
                 java.lang.Object newValue)
Specified by:
eSet in interface EObject
Overrides:
eSet in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature of the value to set.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features, or it isn't changeable.
java.lang.ClassCastException - if there is a type conflict.
ArrayStoreException - if there is a type conflect.
See Also:
EObject.eUnset(EStructuralFeature), EObject.eIsSet(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

eUnset

public void eUnset(EStructuralFeature eFeature)
Specified by:
eUnset in interface EObject
Overrides:
eUnset in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature in question.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features, or it isn't changeable.
See Also:
EObject.eIsSet(EStructuralFeature), EObject.eSet(EStructuralFeature, Object), EObject.eGet(EStructuralFeature, boolean)

eIsSet

public boolean eIsSet(EStructuralFeature eFeature)
Specified by:
eIsSet in interface EObject
Overrides:
eIsSet in class EObjectImpl
Following copied from interface: org.eclipse.emf.ecore.EObject
Parameters:
feature - the feature in question.
Returns:
whether the feature of the object is set.
Throws:
java.lang.IllegalArgumentException - if the feature is not one the meta class's features.
See Also:
EObject.eSet(EStructuralFeature, Object), EObject.eUnset(EStructuralFeature), EObject.eGet(EStructuralFeature, boolean)

getMappedObjects

public java.util.Collection getMappedObjects()
Description copied from interface: Mapping
This returns a set containing the results of Mapping.getInputs() and Mapping.getOutputs().
Specified by:
getMappedObjects in interface Mapping

getMappingRoot

public MappingRoot getMappingRoot()
Description copied from interface: Mapping
This returns either the containing mapping root or the object itself, if it is a mapping root.
Specified by:
getMappingRoot in interface Mapping

getEffectiveHelper

public MappingHelper getEffectiveHelper()
Description copied from interface: Mapping
This returns the mapping helper for this mapping, if it has one. Otherwise, if the mapping has an associated type mapping it returns the type mapping's helper.
Specified by:
getEffectiveHelper in interface Mapping

isReverse

public boolean isReverse()
Description copied from interface: Mapping
This method is delegated to the containing mapping if one exists, or returns false otherwise. Subclasses can override this method to return true when the logical direction of a mapping is reversed (i.e., from outputs to inputs).
Specified by:
isReverse in interface Mapping

getSenders

public EList getSenders()
Description copied from interface: Mapping
This returns the same as Mapping.getInputs() if Mapping.isReverse() returns false. Otherwise it returns the same as Mapping.getOutputs().
Specified by:
getSenders in interface Mapping

getReceivers

public EList getReceivers()
Description copied from interface: Mapping
This returns the same as Mapping.getOutputs() if Mapping.isReverse() returns false. Otherwise it returns the same as Mapping.getInputs().
Specified by:
getReceivers in interface Mapping

getTops

public EList getTops()
Description copied from interface: Mapping
This returns the same as either Mapping.getInputs() or Mapping.getOutputs() depending on the mapping root's isTopToBottom.
Specified by:
getTops in interface Mapping

getBottoms

public EList getBottoms()
Description copied from interface: Mapping
This returns the same as either Mapping.getInputs() or Mapping.getOutputs() depending on the mapping root's isTopToBottom.
Specified by:
getBottoms in interface Mapping

treeIterator

public TreeIterator treeIterator()
Description copied from interface: Mapping
This returns a tree iterator that iterates over this mapping, all it's nested mappings, and their nested mappings, and so on.
Specified by:
treeIterator in interface Mapping

treeIterator

public TreeIterator treeIterator(boolean includeRoot)
Description copied from interface: Mapping
This returns a tree iterator that iterates over this mapping (but only if includeRoot is true), all it's nested mappings, and their nested mappings, and so on.
Specified by:
treeIterator in interface Mapping

toString

public java.lang.String toString()
Overrides:
toString in class EObjectImpl

Copyright 2001-2003 IBM Corporation and others.
All Rights Reserved.