org.eclipse.emf.henshin.statespace.impl
Class ShortestPathStateSpaceValidator

java.lang.Object
  extended by org.eclipse.emf.henshin.statespace.impl.ShortestPathStateSpaceValidator
All Implemented Interfaces:
StateSpaceValidator, Validator

public class ShortestPathStateSpaceValidator
extends Object
implements StateSpaceValidator

StateSpaceValidator that computes the shortest path to some target states. The target states are defined by means of a StateValidator.


Constructor Summary
ShortestPathStateSpaceValidator(StateValidator validator)
          Default and only constructor.
 
Method Summary
 String getName()
          Get the name of this validator.
 void setProperty(String property)
          Set the property to be validated.
 void setStateSpaceIndex(StateSpaceIndex index)
          Set the state space index to be used.
 boolean usesProperty()
          Determines whether this validator uses a property or not.
 ValidationResult validate(StateSpace stateSpace, org.eclipse.core.runtime.IProgressMonitor monitor)
          Perform the validation for the given state space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortestPathStateSpaceValidator

public ShortestPathStateSpaceValidator(StateValidator validator)
Default and only constructor.

Method Detail

validate

public ValidationResult validate(StateSpace stateSpace,
                                 org.eclipse.core.runtime.IProgressMonitor monitor)
                          throws Exception
Description copied from interface: StateSpaceValidator
Perform the validation for the given state space.

Specified by:
validate in interface StateSpaceValidator
monitor - Progress monitor.
Returns:
Validation result.
Throws:
Exception - If an error occurs during the validation.

getName

public String getName()
Description copied from interface: Validator
Get the name of this validator.

Specified by:
getName in interface Validator
Returns:
Name of this validator.

setProperty

public void setProperty(String property)
                 throws ParseException
Description copied from interface: Validator
Set the property to be validated. It can be assumed that the state space has been set already before this method is called.

Specified by:
setProperty in interface Validator
Parameters:
property - Property.
Throws:
ParseException - If the property cannot be parsed.

setStateSpaceIndex

public void setStateSpaceIndex(StateSpaceIndex index)
Description copied from interface: Validator
Set the state space index to be used.

Specified by:
setStateSpaceIndex in interface Validator
Parameters:
index - State space index.

usesProperty

public boolean usesProperty()
Description copied from interface: Validator
Determines whether this validator uses a property or not. The property is set using Validator.setProperty(String).

Specified by:
usesProperty in interface Validator
Returns:
true if it can use a property.