|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.emf.mapping.impl.MappingImpl
org.eclipse.emf.mapping.impl.MappingRootImpl
public class MappingRootImpl
An implementation of the model object 'Root'.
The following features are implemented:
| Nested Class Summary | |
|---|---|
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. |
| Nested classes/interfaces inherited from class org.eclipse.emf.mapping.impl.MappingImpl |
|---|
MappingImpl.MappingTreeIterator |
| Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
BasicEObjectImpl.EPropertiesHolder, BasicEObjectImpl.EPropertiesHolderBaseImpl, BasicEObjectImpl.EPropertiesHolderImpl |
| Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
BasicNotifierImpl.EAdapterList<E extends java.lang.Object & Adapter> |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
InternalEObject.EStore |
| Field Summary | |
|---|---|
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 |
| Fields inherited from class org.eclipse.emf.mapping.impl.MappingImpl |
|---|
helper, inputs, nested, outputs, typeMapping |
| Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY |
| Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET |
| Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
EOPPOSITE_FEATURE_BASE |
| Constructor Summary | |
|---|---|
protected |
MappingRootImpl()
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class org.eclipse.emf.mapping.impl.MappingImpl |
|---|
basicGetTypeMapping, basicSetHelper, basicSetNestedIn, eBasicRemoveFromContainerFeature, eInverseAdd, eInverseRemove, getBottoms, getEffectiveHelper, getHelper, getInputs, getMappedObjects, getMappingRoot, getNested, getNestedIn, getOutputs, getReceivers, getSenders, getTops, getTypeMapping, isReverse, setHelper, setNestedIn, setTypeMapping, treeIterator, treeIterator |
| Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI |
| Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
eNotificationRequired, eNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.mapping.Mapping |
|---|
getBottoms, getEffectiveHelper, getHelper, getInputs, getMappedObjects, getMappingRoot, getNested, getNestedIn, getOutputs, getReceivers, getSenders, getTops, getTypeMapping, isReverse, setHelper, setNestedIn, setTypeMapping, treeIterator, treeIterator |
| Methods inherited from interface org.eclipse.emf.ecore.EObject |
|---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
| 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 |
|---|
protected 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.
| Constructor Detail |
|---|
protected MappingRootImpl()
| Method Detail |
|---|
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()
MappingRoot
getDomain in interface MappingRootpublic void setDomain(MappingDomain domain)
MappingRoot
setDomain in interface MappingRootpublic void refreshMappedObjectStates(Mapping subtree)
MappingRoot
refreshMappedObjectStates in interface MappingRootprotected void initializeMappedObjectStates()
public Mapping getParentMapping(java.util.Collection<?> collection)
MappingRoot
getParentMapping in interface MappingRootpublic boolean isDirty()
MappingRoot
isDirty in interface MappingRootpublic boolean isOutputDirty()
MappingRoot
isOutputDirty in interface MappingRootpublic void register(Mapping mapping)
MappingRoot
register in interface MappingRootpublic void deregister(Mapping mapping)
MappingRoot
deregister in interface MappingRoot
public boolean canCreateMapping(java.util.Collection<?> inputs,
java.util.Collection<?> outputs,
Mapping mapping)
MappingRoot
canCreateMapping in interface MappingRootpublic boolean canRemoveMapping(Mapping mapping)
MappingRoot
canRemoveMapping 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)
MappingRoot
createMapping in interface MappingRootprotected Mapping createMapping()
protected void initializeNewMapping(Mapping newMapping,
java.util.Collection<?> inputs,
java.util.Collection<?> outputs)
public void resetDirty()
MappingRoot
resetDirty in interface MappingRootpublic void setOutputDirty(boolean dirty)
MappingRoot
setOutputDirty in interface MappingRootpublic boolean isInputObject(java.lang.Object object)
MappingRoot
isInputObject in interface MappingRootpublic boolean isOutputObject(java.lang.Object object)
MappingRoot
isOutputObject in interface MappingRootpublic boolean isTopObject(java.lang.Object object)
MappingRoot
isTopObject in interface MappingRootpublic boolean isBottomObject(java.lang.Object object)
MappingRoot
isBottomObject in interface MappingRootpublic boolean isAttachedObject(java.lang.Object object)
MappingRoot
isAttachedObject in interface MappingRootpublic java.util.Collection<? extends Mapping> getMappings(java.lang.Object object)
MappingRoot
getMappings 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()
MappingRoot
getTypeMappingRoot in interface MappingRootprotected AdapterFactory createMappedObjectStateAdapterFactory()
createAdapter
to createMappedObjectStateAdapter.
protected Adapter createMappedObjectStateAdapter(Notifier target)
MappingRootImpl.MappedObjectStateAdapter.
public void dispose()
MappingRoot
dispose in interface MappingRootprotected void printAdapters()
protected void walk(EObject object)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||