public class MappingRootImpl extends MappingImpl implements MappingRoot
The following features are implemented:
| Modifier and Type | Class and Description |
|---|---|
protected class |
MappingRootImpl.MappedObjectStateAdapter
This is a simple implementation of the basic information that needs to be maintained for any mapped object.
|
protected class |
MappingRootImpl.MappedObjectStateAdapterFactory
This is the factory that creates adapters for the objects being mapped.
|
MappingImpl.MappingTreeIteratorBasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImplBasicNotifierImpl.EAdapterList<E extends java.lang.Object & Adapter>, BasicNotifierImpl.EObservableAdapterListInternalEObject.EStore| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
COMMAND_STACK_EDEFAULT
The default value of the '
Command Stack' attribute |
protected java.lang.String |
commandStack
The cached value of the '
Command Stack' attribute |
protected MappingDomain |
domain
This keeps track of the mapping domain that uses this mapping root.
|
protected AdapterImpl |
mappedObjectListener
This allows this listen for changes to inputs or outputs.
|
protected AdapterFactory |
mappedObjectStateAdapterFactory
This keeps track of the factory for creating the
MappedObjectState. |
protected static boolean |
OUTPUT_READ_ONLY_EDEFAULT
The default value of the '
Output Read Only' attribute |
protected boolean |
outputDirty
This keeps track of whether the output has been modified.
|
protected boolean |
outputReadOnly
The cached value of the '
Output Read Only' attribute |
protected static boolean |
TOP_TO_BOTTOM_EDEFAULT
The default value of the '
Top To Bottom' attribute |
protected boolean |
topToBottom
The cached value of the '
Top To Bottom' attribute |
helper, inputs, nested, outputs, typeMappingeAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXYEVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSETEOPPOSITE_FEATURE_BASE| Modifier | Constructor and Description |
|---|---|
protected |
MappingRootImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateMapping(java.util.Collection<?> inputs,
java.util.Collection<?> outputs,
Mapping mapping)
If mapping is null, this checks if a mapping can be created with the given inputs and outputs.
|
boolean |
canRemoveMapping(Mapping mapping)
This checks if the given mapping can be removed.
|
protected Adapter |
createMappedObjectStateAdapter(Notifier target)
By default, this creates a new instance of
MappingRootImpl.MappedObjectStateAdapter. |
protected AdapterFactory |
createMappedObjectStateAdapterFactory()
By default, this creates an adapter factory that delegates
createAdapter
to createMappedObjectStateAdapter. |
protected Mapping |
createMapping() |
Mapping |
createMapping(java.util.Collection<?> inputs,
java.util.Collection<?> outputs)
This creates a new, appropriately-parented, mapping object with the given collections of input and output objects.
|
void |
deregister(Mapping mapping)
This removes cached information about this mapping.
|
void |
dispose()
This disposes all the adapters used to record the mapped object state.
|
java.lang.Object |
eGet(int featureID,
boolean resolve,
boolean coreType) |
boolean |
eIsSet(int featureID) |
void |
eSet(int featureID,
java.lang.Object newValue) |
protected EClass |
eStaticClass() |
void |
eUnset(int featureID) |
java.util.Collection<? extends Mapping> |
getAllMappings(java.util.Collection<?> collection)
This returns the
getMappings(Object)
for each object of the collection. |
java.lang.String |
getCommandStack() |
MappingDomain |
getDomain()
This returns the associated mapping domain.
|
java.util.Collection<? extends Mapping> |
getExactMappings(java.util.Collection<?> collection)
This returns the subset of mappings returned by
MappingRoot.getAllMappings(java.util.Collection<?>)
such that have each mapping has Mapping#getMappedObjects(). |
MappedObjectState |
getMappedObjectState(java.lang.Object object)
This uses the
mappedObjectStateAdapterFactory to get an adapter that implements this interface. |
java.util.Collection<? extends Mapping> |
getMappings(java.lang.Object object)
This returns a collection of the mappings that refer to the given object.
|
Mapping |
getParentMapping(java.util.Collection<?> collection)
This returns the mapping in the tree that would be the parent of a mapping that has the given collection as its mapped objects.
|
protected java.util.Collection<java.lang.Object> |
getTypeClassifiers(java.util.Collection<?> collection) |
MappingRoot |
getTypeMappingRoot()
This returns the root of the type mapping model.
|
protected java.util.Collection<?> |
getTypeMappings(java.util.Collection<?> inputTypes,
java.util.Collection<?> outputTypes) |
protected boolean |
hasCompatibleMetaObjects(java.util.Collection<?> inputs,
java.util.Collection<?> outputs) |
protected boolean |
hasCompatibleTypes(java.util.Collection<?> inputs,
java.util.Collection<?> outputs) |
protected boolean |
hasMappedChildren(Mapping mapping) |
protected boolean |
hasMappedParents(java.util.Collection<?> inputs,
java.util.Collection<?> outputs) |
protected boolean |
hasTypeMappings(java.util.Collection<?> types) |
protected void |
initializeMappedObjectStates() |
protected void |
initializeNewMapping(Mapping newMapping,
java.util.Collection<?> inputs,
java.util.Collection<?> outputs) |
boolean |
isAttachedObject(java.lang.Object object)
This returns whether the given object descends from one of the root's input or output objects.
|
boolean |
isBottomObject(java.lang.Object object)
This returns whether the given object is a bottom domain object.
|
boolean |
isDirty()
This method returns true if the mapping tree needs to be saved.
|
boolean |
isInputObject(java.lang.Object object)
This returns whether the given object is an input object in the domain.
|
protected boolean |
isMapped(java.util.Collection<?> collection,
Mapping mapping) |
boolean |
isOutputDirty()
This method returns true if the mapping output needs to be saved.
|
boolean |
isOutputObject(java.lang.Object object)
This returns whether the given object is an output object in the domain.
|
boolean |
isOutputReadOnly() |
boolean |
isTopObject(java.lang.Object object)
This returns whether the given object is a top domain object.
|
boolean |
isTopToBottom() |
protected void |
printAdapters() |
void |
refreshMappedObjectStates(Mapping subtree)
This refreshes the mapped objects states of all mappings rooted at the specified mapping subtree.
|
void |
register(Mapping mapping)
This adds cached information about this mapping.
|
void |
resetDirty()
This method resets the mapping and output dirty flags.
|
void |
setCommandStack(java.lang.String newCommandStack) |
void |
setDomain(MappingDomain domain)
This sets the domain of this mapping root.
|
void |
setOutputDirty(boolean dirty)
This method sets the output dirty flag.
|
void |
setOutputReadOnly(boolean newOutputReadOnly) |
void |
setTopToBottom(boolean newTopToBottom) |
java.lang.String |
toString() |
protected void |
walk(EObject object) |
basicGetTypeMapping, basicSetHelper, basicSetNestedIn, eBasicRemoveFromContainerFeature, eInverseAdd, eInverseRemove, getBottoms, getEffectiveHelper, getHelper, getInputs, getMappedObjects, getMappingRoot, getNested, getNestedIn, getOutputs, getReceivers, getSenders, getTops, getTypeMapping, isReverse, setHelper, setNestedIn, setTypeMapping, treeIterator, treeIteratoreAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURIeAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValueseBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBottoms, getEffectiveHelper, getHelper, getInputs, getMappedObjects, getMappingRoot, getNested, getNestedIn, getOutputs, getReceivers, getSenders, getTops, getTypeMapping, isReverse, setHelper, setNestedIn, setTypeMapping, treeIterator, treeIteratoreAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnseteAdapters, eDeliver, eNotify, eSetDelivereNotificationRequiredprotected static final boolean OUTPUT_READ_ONLY_EDEFAULT
Output Read Only' attribute.
isOutputReadOnly(),
Constant Field Valuesprotected boolean outputReadOnly
Output Read Only' attribute.
isOutputReadOnly()protected static final boolean TOP_TO_BOTTOM_EDEFAULT
Top To Bottom' attribute.
isTopToBottom(),
Constant Field Valuesprotected boolean topToBottom
Top To Bottom' attribute.
isTopToBottom()protected static final java.lang.String COMMAND_STACK_EDEFAULT
Command Stack' attribute.
getCommandStack()protected java.lang.String commandStack
Command Stack' attribute.
getCommandStack()protected MappingDomain domain
protected boolean outputDirty
protected AdapterImpl mappedObjectListener
protected AdapterFactory mappedObjectStateAdapterFactory
MappedObjectState.protected EClass eStaticClass()
eStaticClass in class MappingImplpublic boolean isOutputReadOnly()
isOutputReadOnly in interface MappingRootMappingRoot.setOutputReadOnly(boolean),
MappingPackage.getMappingRoot_OutputReadOnly()public void setOutputReadOnly(boolean newOutputReadOnly)
setOutputReadOnly in interface MappingRootnewOutputReadOnly - the new value of the 'Output Read Only' attribute.MappingRoot.isOutputReadOnly()public boolean isTopToBottom()
isTopToBottom in interface MappingRootMappingRoot.setTopToBottom(boolean),
MappingPackage.getMappingRoot_TopToBottom()public void setTopToBottom(boolean newTopToBottom)
setTopToBottom in interface MappingRootnewTopToBottom - the new value of the 'Top To Bottom' attribute.MappingRoot.isTopToBottom()public java.lang.String getCommandStack()
getCommandStack in interface MappingRootMappingRoot.setCommandStack(String),
MappingPackage.getMappingRoot_CommandStack()public void setCommandStack(java.lang.String newCommandStack)
setCommandStack in interface MappingRootnewCommandStack - the new value of the 'Command Stack' attribute.MappingRoot.getCommandStack()public java.lang.Object eGet(int featureID,
boolean resolve,
boolean coreType)
eGet in interface InternalEObjecteGet in class MappingImplInternalEObject.eGet(EStructuralFeature, boolean, boolean)public void eSet(int featureID,
java.lang.Object newValue)
eSet in interface InternalEObjecteSet in class MappingImplEObject.eSet(EStructuralFeature, Object)public void eUnset(int featureID)
eUnset in interface InternalEObjecteUnset in class MappingImplEObject.eUnset(EStructuralFeature)public boolean eIsSet(int featureID)
eIsSet in interface InternalEObjecteIsSet in class MappingImplEObject.eIsSet(EStructuralFeature)public java.lang.String toString()
toString in class MappingImplpublic MappingDomain getDomain()
MappingRootgetDomain in interface MappingRootpublic void setDomain(MappingDomain domain)
MappingRootsetDomain in interface MappingRootpublic void refreshMappedObjectStates(Mapping subtree)
MappingRootrefreshMappedObjectStates in interface MappingRootprotected void initializeMappedObjectStates()
public Mapping getParentMapping(java.util.Collection<?> collection)
MappingRootgetParentMapping in interface MappingRootpublic boolean isDirty()
MappingRootisDirty in interface MappingRootpublic boolean isOutputDirty()
MappingRootisOutputDirty in interface MappingRootpublic void register(Mapping mapping)
MappingRootregister in interface MappingRootpublic void deregister(Mapping mapping)
MappingRootderegister in interface MappingRootpublic boolean canCreateMapping(java.util.Collection<?> inputs,
java.util.Collection<?> outputs,
Mapping mapping)
MappingRootcanCreateMapping in interface MappingRootpublic boolean canRemoveMapping(Mapping mapping)
MappingRootcanRemoveMapping in interface MappingRootprotected boolean hasMappedChildren(Mapping mapping)
protected boolean hasMappedParents(java.util.Collection<?> inputs,
java.util.Collection<?> outputs)
protected boolean isMapped(java.util.Collection<?> collection,
Mapping mapping)
protected boolean hasCompatibleMetaObjects(java.util.Collection<?> inputs,
java.util.Collection<?> outputs)
protected boolean hasCompatibleTypes(java.util.Collection<?> inputs,
java.util.Collection<?> outputs)
protected java.util.Collection<?> getTypeMappings(java.util.Collection<?> inputTypes,
java.util.Collection<?> outputTypes)
protected boolean hasTypeMappings(java.util.Collection<?> types)
protected java.util.Collection<java.lang.Object> getTypeClassifiers(java.util.Collection<?> collection)
public Mapping createMapping(java.util.Collection<?> inputs, java.util.Collection<?> outputs)
MappingRootcreateMapping in interface MappingRootprotected Mapping createMapping()
protected void initializeNewMapping(Mapping newMapping, java.util.Collection<?> inputs, java.util.Collection<?> outputs)
public void resetDirty()
MappingRootresetDirty in interface MappingRootpublic void setOutputDirty(boolean dirty)
MappingRootsetOutputDirty in interface MappingRootpublic boolean isInputObject(java.lang.Object object)
MappingRootisInputObject in interface MappingRootpublic boolean isOutputObject(java.lang.Object object)
MappingRootisOutputObject in interface MappingRootpublic boolean isTopObject(java.lang.Object object)
MappingRootisTopObject in interface MappingRootpublic boolean isBottomObject(java.lang.Object object)
MappingRootisBottomObject in interface MappingRootpublic boolean isAttachedObject(java.lang.Object object)
MappingRootisAttachedObject in interface MappingRootpublic java.util.Collection<? extends Mapping> getMappings(java.lang.Object object)
MappingRootgetMappings in interface MappingRootpublic java.util.Collection<? extends Mapping> getAllMappings(java.util.Collection<?> collection)
MappingRootgetMappings(Object)
for each object of the collection.getAllMappings in interface MappingRootpublic java.util.Collection<? extends Mapping> getExactMappings(java.util.Collection<?> collection)
MappingRootMappingRoot.getAllMappings(java.util.Collection<?>)
such that have each mapping has Mapping#getMappedObjects().getExactMappings in interface MappingRootpublic MappedObjectState getMappedObjectState(java.lang.Object object)
mappedObjectStateAdapterFactory to get an adapter that implements this interface.getMappedObjectState in interface MappingRootpublic MappingRoot getTypeMappingRoot()
MappingRootgetTypeMappingRoot in interface MappingRootprotected AdapterFactory createMappedObjectStateAdapterFactory()
createAdapter
to createMappedObjectStateAdapter.protected Adapter createMappedObjectStateAdapter(Notifier target)
MappingRootImpl.MappedObjectStateAdapter.public void dispose()
MappingRootdispose in interface MappingRootprotected void printAdapters()
protected void walk(EObject object)