|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 MappingImpl
public boolean isOutputReadOnly()
isOutputReadOnly
in interface MappingRoot
MappingRoot.setOutputReadOnly(boolean)
,
MappingPackage.getMappingRoot_OutputReadOnly()
public void setOutputReadOnly(boolean newOutputReadOnly)
setOutputReadOnly
in interface MappingRoot
newOutputReadOnly
- the new value of the 'Output Read Only' attribute.MappingRoot.isOutputReadOnly()
public boolean isTopToBottom()
isTopToBottom
in interface MappingRoot
MappingRoot.setTopToBottom(boolean)
,
MappingPackage.getMappingRoot_TopToBottom()
public void setTopToBottom(boolean newTopToBottom)
setTopToBottom
in interface MappingRoot
newTopToBottom
- the new value of the 'Top To Bottom' attribute.MappingRoot.isTopToBottom()
public java.lang.String getCommandStack()
getCommandStack
in interface MappingRoot
MappingRoot.setCommandStack(String)
,
MappingPackage.getMappingRoot_CommandStack()
public void setCommandStack(java.lang.String newCommandStack)
setCommandStack
in interface MappingRoot
newCommandStack
- the new value of the 'Command Stack' attribute.MappingRoot.getCommandStack()
public java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
eGet
in interface InternalEObject
eGet
in class MappingImpl
InternalEObject.eGet(EStructuralFeature, boolean, boolean)
public void eSet(int featureID, java.lang.Object newValue)
eSet
in interface InternalEObject
eSet
in class MappingImpl
EObject.eSet(EStructuralFeature, Object)
public void eUnset(int featureID)
eUnset
in interface InternalEObject
eUnset
in class MappingImpl
EObject.eUnset(EStructuralFeature)
public boolean eIsSet(int featureID)
eIsSet
in interface InternalEObject
eIsSet
in class MappingImpl
EObject.eIsSet(EStructuralFeature)
public java.lang.String toString()
toString
in class MappingImpl
public MappingDomain getDomain()
MappingRoot
getDomain
in interface MappingRoot
public void setDomain(MappingDomain domain)
MappingRoot
setDomain
in interface MappingRoot
public void refreshMappedObjectStates(Mapping subtree)
MappingRoot
refreshMappedObjectStates
in interface MappingRoot
protected void initializeMappedObjectStates()
public Mapping getParentMapping(java.util.Collection<?> collection)
MappingRoot
getParentMapping
in interface MappingRoot
public boolean isDirty()
MappingRoot
isDirty
in interface MappingRoot
public boolean isOutputDirty()
MappingRoot
isOutputDirty
in interface MappingRoot
public void register(Mapping mapping)
MappingRoot
register
in interface MappingRoot
public 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 MappingRoot
public boolean canRemoveMapping(Mapping mapping)
MappingRoot
canRemoveMapping
in interface MappingRoot
protected 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 MappingRoot
protected Mapping createMapping()
protected void initializeNewMapping(Mapping newMapping, java.util.Collection<?> inputs, java.util.Collection<?> outputs)
public void resetDirty()
MappingRoot
resetDirty
in interface MappingRoot
public void setOutputDirty(boolean dirty)
MappingRoot
setOutputDirty
in interface MappingRoot
public boolean isInputObject(java.lang.Object object)
MappingRoot
isInputObject
in interface MappingRoot
public boolean isOutputObject(java.lang.Object object)
MappingRoot
isOutputObject
in interface MappingRoot
public boolean isTopObject(java.lang.Object object)
MappingRoot
isTopObject
in interface MappingRoot
public boolean isBottomObject(java.lang.Object object)
MappingRoot
isBottomObject
in interface MappingRoot
public boolean isAttachedObject(java.lang.Object object)
MappingRoot
isAttachedObject
in interface MappingRoot
public java.util.Collection<? extends Mapping> getMappings(java.lang.Object object)
MappingRoot
getMappings
in interface MappingRoot
public java.util.Collection<? extends Mapping> getAllMappings(java.util.Collection<?> collection)
MappingRoot
getMappings(Object)
for each object of the collection.
getAllMappings
in interface MappingRoot
public java.util.Collection<? extends Mapping> getExactMappings(java.util.Collection<?> collection)
MappingRoot
MappingRoot.getAllMappings(java.util.Collection>)
such that have each mapping has Mapping#getMappedObjects()
.
getExactMappings
in interface MappingRoot
public MappedObjectState getMappedObjectState(java.lang.Object object)
mappedObjectStateAdapterFactory
to get an adapter that implements this interface.
getMappedObjectState
in interface MappingRoot
public MappingRoot getTypeMappingRoot()
MappingRoot
getTypeMappingRoot
in interface MappingRoot
protected AdapterFactory createMappedObjectStateAdapterFactory()
createAdapter
to createMappedObjectStateAdapter
.
protected Adapter createMappedObjectStateAdapter(Notifier target)
MappingRootImpl.MappedObjectStateAdapter
.
public void dispose()
MappingRoot
dispose
in interface MappingRoot
protected 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 |