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

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

public class OCLStateValidator
extends Object
implements StateValidator

OCL state validator.


Field Summary
static String VALIDATOR_ID
          ID of this validator.
 
Constructor Summary
OCLStateValidator()
          Default constructor.
 
Method Summary
 String getName()
          Get the name of this validator.
static void register()
          Register this validator in the global validator registry in the state space plug-in.
 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(State state, org.eclipse.core.runtime.IProgressMonitor monitor)
          Perform the validation for the given state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

public static final String VALIDATOR_ID
ID of this validator.

See Also:
Constant Field Values
Constructor Detail

OCLStateValidator

public OCLStateValidator()
Default constructor.

Method Detail

register

public static void register()
Register this validator in the global validator registry in the state space plug-in.


validate

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

Specified by:
validate in interface StateValidator
Parameters:
state - State to be validated.
monitor - Progress monitor.
Returns:
Validation result.
Throws:
Exception - If an error occurs during the validation.

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.

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.

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.