COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.core
Class SMLMainValidator

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.core.SMLMainValidator
All Implemented Interfaces:
IValidationListener

public class SMLMainValidator
extends java.lang.Object
implements IValidationListener

This is the starting point for a validation process. Clients are encouraged to re-use the same instance with the this#initialize(Map) and/or this#setAttribute(String, String) methods to configure an instance based on a specific setting.


Constructor Summary
SMLMainValidator()
          The constructor
 
Method Summary
protected  AbstractValidationOutput createValidationOutput()
          Create a validation output based on the environment that the validation is being performed in.
 java.util.Map getAttributes()
          Returns the attributes
 void initialize(java.util.Map attributes)
          The initialize method is used to pass in multiple attributes at the same time
static void main(java.lang.String[] args)
          The main method - Used to set the appropriate attributes based on the program arguments.
 void setAttribute(java.lang.String key, java.lang.String value)
          Set an attribute of this type.
protected  void setDefaultAttributes()
          Sets default values for attributes
 boolean start()
          Start the validation process
 void validationErrorOccurred(ValidationEvent event)
          A validation error occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMLMainValidator

public SMLMainValidator()
The constructor

Method Detail

setDefaultAttributes

protected void setDefaultAttributes()
Sets default values for attributes


initialize

public void initialize(java.util.Map attributes)
The initialize method is used to pass in multiple attributes at the same time

Parameters:
attributes - The attributes. The key and value pairs are expected to be of type String

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Set an attribute of this type. The key must be one of the ATTRIBUTE_* constants defined by this class.

Parameters:
key - The attribute key (see the ATTRIBUTE_* constants of this class)
value - The value of the attribute

start

public boolean start()
Start the validation process


createValidationOutput

protected AbstractValidationOutput createValidationOutput()
Create a validation output based on the environment that the validation is being performed in.

Returns:
An output stream

getAttributes

public java.util.Map getAttributes()
Returns the attributes

Returns:
attributes

main

public static void main(java.lang.String[] args)
The main method - Used to set the appropriate attributes based on the program arguments. Expected format: org.eclipse.cosmos.rm.validation.internal.core.MainValidator ([option][option argument(s)])* , where available option and arguments are:

Parameters:
args - The program arguments

validationErrorOccurred

public void validationErrorOccurred(ValidationEvent event)
Description copied from interface: IValidationListener
A validation error occurred. Listeners can set the doit flag in the ValidationEvent to indicate whether validation should continue.

Specified by:
validationErrorOccurred in interface IValidationListener

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification