org.eclipse.emf.mapping
Interface MappingRoot

All Superinterfaces:
EObject, Mapping, Notifier
All Known Subinterfaces:
Ecore2EcoreMappingRoot
All Known Implementing Classes:
Ecore2EcoreMappingRootImpl, MappingRootImpl

public interface MappingRoot
extends Mapping

A representation of the model object 'Root'.

The following features are supported:

See Also:
MappingPackage.getMappingRoot()

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.
 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.util.Collection<? extends Mapping> getAllMappings(java.util.Collection<?> collection)
          This returns the intersection of the result of getMappings(Object) for each object of the collection.
 java.lang.String getCommandStack()
          Returns the value of the 'Command Stack' attribute
 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 getAllMappings(java.util.Collection) such that have each mapping has exactly the collection as its mapped objects, i.e., as return by Mapping#getMappedObjects().
 MappedObjectState getMappedObjectState(java.lang.Object object)
          This returns the mapping state, if any, of the given object.
 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.
 MappingRoot getTypeMappingRoot()
          This returns the root of the type mapping model.
 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.
 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()
          Returns the value of the 'Output Read Only' attribute
 boolean isTopObject(java.lang.Object object)
          This returns whether the given object is a top domain object.
 boolean isTopToBottom()
          Returns the value of the 'Top To Bottom' attribute
 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 value)
          Sets the value of the 'Command Stack' attribute
 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 value)
          Sets the value of the 'Output Read Only' attribute
 void setTopToBottom(boolean value)
          Sets the value of the 'Top To Bottom' attribute
 
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, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

isOutputReadOnly

boolean isOutputReadOnly()
Returns the value of the 'Output Read Only' attribute.

Returns:
the value of the 'Output Read Only' attribute.
See Also:
setOutputReadOnly(boolean), MappingPackage.getMappingRoot_OutputReadOnly()

setOutputReadOnly

void setOutputReadOnly(boolean value)
Sets the value of the 'Output Read Only' attribute.

Parameters:
value - the new value of the 'Output Read Only' attribute.
See Also:
isOutputReadOnly()

isTopToBottom

boolean isTopToBottom()
Returns the value of the 'Top To Bottom' attribute.

Returns:
the value of the 'Top To Bottom' attribute.
See Also:
setTopToBottom(boolean), MappingPackage.getMappingRoot_TopToBottom()

setTopToBottom

void setTopToBottom(boolean value)
Sets the value of the 'Top To Bottom' attribute.

Parameters:
value - the new value of the 'Top To Bottom' attribute.
See Also:
isTopToBottom()

getCommandStack

java.lang.String getCommandStack()
Returns the value of the 'Command Stack' attribute.

Returns:
the value of the 'Command Stack' attribute.
See Also:
setCommandStack(String), MappingPackage.getMappingRoot_CommandStack()

setCommandStack

void setCommandStack(java.lang.String value)
Sets the value of the 'Command Stack' attribute.

Parameters:
value - the new value of the 'Command Stack' attribute.
See Also:
getCommandStack()

getDomain

MappingDomain getDomain()
This returns the associated mapping domain.


setDomain

void setDomain(MappingDomain domain)
This sets the domain of this mapping root.


refreshMappedObjectStates

void refreshMappedObjectStates(Mapping subtree)
This refreshes the mapped objects states of all mappings rooted at the specified mapping subtree.


getMappings

java.util.Collection<? extends Mapping> getMappings(java.lang.Object object)
This returns a collection of the mappings that refer to the given object.


getAllMappings

java.util.Collection<? extends Mapping> getAllMappings(java.util.Collection<?> collection)
This returns the intersection of the result of getMappings(Object) for each object of the collection.


getExactMappings

java.util.Collection<? extends Mapping> getExactMappings(java.util.Collection<?> collection)
This returns the subset of mappings returned by getAllMappings(java.util.Collection) such that have each mapping has exactly the collection as its mapped objects, i.e., as return by Mapping#getMappedObjects().


getParentMapping

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.


canCreateMapping

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. If mapping is not null, it checks if the specified mapping can be changed to the given inputs and outputs.


canRemoveMapping

boolean canRemoveMapping(Mapping mapping)
This checks if the given mapping can be removed.


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.


resetDirty

void resetDirty()
This method resets the mapping and output dirty flags.


isDirty

boolean isDirty()
This method returns true if the mapping tree needs to be saved.


isOutputDirty

boolean isOutputDirty()
This method returns true if the mapping output needs to be saved.


setOutputDirty

void setOutputDirty(boolean dirty)
This method sets the output dirty flag.


isInputObject

boolean isInputObject(java.lang.Object object)
This returns whether the given object is an input object in the domain.


isOutputObject

boolean isOutputObject(java.lang.Object object)
This returns whether the given object is an output object in the domain.


isTopObject

boolean isTopObject(java.lang.Object object)
This returns whether the given object is a top domain object.


isBottomObject

boolean isBottomObject(java.lang.Object object)
This returns whether the given object is a bottom domain object.


isAttachedObject

boolean isAttachedObject(java.lang.Object object)
This returns whether the given object descends from one of the root's input or output objects.


register

void register(Mapping mapping)
This adds cached information about this mapping.


deregister

void deregister(Mapping mapping)
This removes cached information about this mapping.


getMappedObjectState

MappedObjectState getMappedObjectState(java.lang.Object object)
This returns the mapping state, if any, of the given object.


getTypeMappingRoot

MappingRoot getTypeMappingRoot()
This returns the root of the type mapping model.


dispose

void dispose()
This disposes all the adapters used to record the mapped object state.


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