org.eclipse.emf.mapping.command
Class MatchMappingCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.common.command.CompoundCommand
          extended by org.eclipse.emf.mapping.command.MatchMappingCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
NameMatchMappingCommand, TypeMatchMappingCommand

public abstract class MatchMappingCommand
extends CompoundCommand


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Field Summary
protected static java.lang.String DESCRIPTION
          This cachaes the description.
protected  MappingDomain domain
          This keeps track of the mapping domain in which the command operates.
protected static java.lang.String LABEL
          This caches the label.
protected  java.util.Collection<?> mappedInputs
          This is the collection of inputs that have been matched by this command
protected  Mapping mapping
          This is the mapping that is being recursively matched.
 
Fields inherited from class org.eclipse.emf.common.command.CompoundCommand
commandList, LAST_COMMAND_ALL, MERGE_COMMAND_ALL, resultIndex
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
MatchMappingCommand(MappingDomain domain, Mapping mapping)
           
 
Method Summary
protected abstract  boolean match(java.lang.Object inputObject, java.lang.Object outputObject, java.util.Collection<java.lang.Object> mappedObjects)
           
protected  void matchChildren(java.util.Collection<?> inputChildren, java.util.Collection<?> outputChildren)
           
protected  boolean prepare()
          Returns whether all the commands can execute so that AbstractCommand.isExecutable can be cached.
 java.lang.String toString()
          This gives an abbreviated name using this object's own class' name, without package qualification, followed by a space separated list of field:value pairs.
 
Methods inherited from class org.eclipse.emf.common.command.CompoundCommand
append, appendAndExecute, appendIfCanExecute, canUndo, dispose, execute, getAffectedObjects, getCommandList, getDescription, getLabel, getMergedAffectedObjectsCollection, getMergedResultCollection, getResult, getResultIndex, isEmpty, redo, undo, unwrap
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
canExecute, chain, setDescription, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

domain

protected MappingDomain domain
This keeps track of the mapping domain in which the command operates.


mapping

protected Mapping mapping
This is the mapping that is being recursively matched.


mappedInputs

protected java.util.Collection<?> mappedInputs
This is the collection of inputs that have been matched by this command


LABEL

protected static final java.lang.String LABEL
This caches the label.


DESCRIPTION

protected static final java.lang.String DESCRIPTION
This cachaes the description.

Constructor Detail

MatchMappingCommand

public MatchMappingCommand(MappingDomain domain,
                           Mapping mapping)
Method Detail

prepare

protected boolean prepare()
Description copied from class: CompoundCommand
Returns whether all the commands can execute so that AbstractCommand.isExecutable can be cached. An empty command list causes false to be returned.

Overrides:
prepare in class CompoundCommand
Returns:
whether all the commands can execute.

matchChildren

protected void matchChildren(java.util.Collection<?> inputChildren,
                             java.util.Collection<?> outputChildren)

match

protected abstract boolean match(java.lang.Object inputObject,
                                 java.lang.Object outputObject,
                                 java.util.Collection<java.lang.Object> mappedObjects)

toString

public java.lang.String toString()
This gives an abbreviated name using this object's own class' name, without package qualification, followed by a space separated list of field:value pairs.

Overrides:
toString in class CompoundCommand
Returns:
string representation.

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