|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EditingDomain
An editing domain manages a self-contained set of interrelated EMF models and the Command
s that modify them.
The models are maintained in the form of a ResourceSet
.
Commands that modify the model are typically created through the domain and are executed using the CommandStack
.
An optional feature of an editing domain, which is used to implement mapping domains,
is the ability to override primitive commands, see OverrideableCommand
.
The domain imposes a hierarchical structure upon the models
via the results of the getChildren
and getParent
methods.
This is useful for implementing commands such as
RemoveCommand
, which often needs to deduce the parent from which to remove a particular object,
and CopyCommand
, which often needs to deduce all the children to copy recursively.
This also meshes well with user interfaces, which often present a model hierarchically, i.e., as a tree.
Method Summary | |
---|---|
Command |
createCommand(java.lang.Class<? extends Command> commandClass,
CommandParameter commandParameter)
This creates a command of the type of the specified by the command class and acting upon the information specified in the given command parameter. |
Command |
createOverrideCommand(OverrideableCommand command)
This creates an override for the given command. |
Resource |
createResource(java.lang.String fileNameURI)
This creates the specified resource in this editing domain's resource set. |
java.util.Collection<?> |
getChildren(java.lang.Object object)
This returns the children of the object. |
java.util.Collection<java.lang.Object> |
getClipboard()
This returns the clipboard of the editing domain. |
CommandStack |
getCommandStack()
This returns a command queue for executing commands. |
java.util.Collection<?> |
getNewChildDescriptors(java.lang.Object object,
java.lang.Object sibling)
This returns a collection of objects describing the different children that can be added under the specified object. |
boolean |
getOptimizeCopy()
This returns whether or not copy command optimizations are safe in this domain. |
java.lang.Object |
getParent(java.lang.Object object)
This returns the parent of the object. |
ResourceSet |
getResourceSet()
This returns the resource set within which all the created and loaded resources reside. |
java.lang.Object |
getRoot(java.lang.Object object)
This returns the root of the object, i.e., . |
java.util.List<?> |
getTreePath(java.lang.Object object)
This returns a path from the root object to the given object in the tree. |
boolean |
isControllable(java.lang.Object object)
This returns whether or not the domain allows the given object to be moved to a different resource from its container. |
boolean |
isReadOnly(Resource resource)
This returns whether the resource is read only in editing domain. |
Resource |
loadResource(java.lang.String fileNameURI)
This loads the specified resource into this editing domain's resource set. |
void |
setClipboard(java.util.Collection<java.lang.Object> clipboard)
This sets the clipboard of the editing domain. |
TreeIterator<?> |
treeIterator(java.lang.Object object)
This returns a tree iterator that will yield the object, the children of the object, their children, and so on. |
Method Detail |
---|
Resource createResource(java.lang.String fileNameURI)
Resource loadResource(java.lang.String fileNameURI)
ResourceSet getResourceSet()
Command createCommand(java.lang.Class<? extends Command> commandClass, CommandParameter commandParameter)
Command createOverrideCommand(OverrideableCommand command)
CommandStack getCommandStack()
java.util.Collection<?> getChildren(java.lang.Object object)
java.lang.Object getParent(java.lang.Object object)
java.lang.Object getRoot(java.lang.Object object)
java.util.Collection<?> getNewChildDescriptors(java.lang.Object object, java.lang.Object sibling)
TreeIterator<?> treeIterator(java.lang.Object object)
java.util.List<?> getTreePath(java.lang.Object object)
java.util.Collection<java.lang.Object> getClipboard()
void setClipboard(java.util.Collection<java.lang.Object> clipboard)
boolean getOptimizeCopy()
boolean isReadOnly(Resource resource)
boolean isControllable(java.lang.Object 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 |