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

org.eclipse.cosmos.rm.validation.internal.core
Interface IValidator

All Known Subinterfaces:
ISchematronValidation, ISMLValidator, IXMLValidator
All Known Implementing Classes:
AbstractSMLValidator, AbstractValidator, AcyclicValidator, DatastructureBuilderImpl, IdentityConstraintValidator, SchematronValidator, SchematronValidatorImpl, SchemaValidator, TargetValidator

public interface IValidator

The generic interface that is shared between the different phase of the validation process.

See Also:
IXMLValidator, ISMLValidator, ISchematronValidation

Field Summary
static java.lang.String ATTRIBUTE_ENV
          This attribute indicates the environment that the validation process is being done in.
static java.lang.String ATTRIBUTE_FAST_FAIL_POLICY
          Indicates whether the validation should stop after encountering the first error.
static java.lang.String ATTRIBUTE_FILE_OUTPUT
          A path to a file which the message will be written to
static java.lang.String ATTRIBUTE_INPUT_TYPE
          Indicates the input type.
static java.lang.String ATTRIBUTE_INSTANCE
          If ATTRIBUTE_INPUT_TYPE is set to "value.sml.unit", then the expected value of this attribute is a set of comma separated SML unit documents; otherwise the input is expected to be the path of an SML-IF document.
static java.lang.String ATTRIBUTE_OUTPUT
          Indicates the validation output attribute
static java.lang.String ATTRIBUTE_SCHEMATRON_SCHEMA
          Indicates the location of the schematron schema.
static java.lang.String ATTRIBUTE_SML_IF_SCHEMA
          Indicates the location of the SML-IF schema.
static java.lang.String ATTRIBUTE_STRUCTURED_OUTPUT
          Indicates the structured schematron output attribute
static java.lang.String ATTRIBUTE_VALIDATION_SCHEMATRON
          Stores the class that will be used to perform the schematron validation
static java.lang.String ATTRIBUTE_VALIDATION_SML
          Stores the classes that will be used to perform the SML (schema extension) validations
static java.lang.String ATTRIBUTE_VALIDATION_XML
          Stores the class that will be used to perform the XML validation
static java.lang.String VALUE_ENV_ECLIPSE
          Indicates that the validation is being performed in Eclipse
static java.lang.String VALUE_ENV_STANDALONE
          Indicates that the validation is being performed in standalone mode
static java.lang.String VALUE_SML_IF
          Indicates that the input type is an SML-IF document that will need to be validated.
static java.lang.String VALUE_SML_UNIT
          Indicates that the input is a set of SML documents that will need to be validated.
 
Method Summary
 void addValidationListener(IValidationListener listener)
           
 void initialize(java.util.Map validationAttribute)
          Initialize this validation class based on the set of attributes passed in.
 boolean validate()
          Performs the validation and returns true if successful and false otherwise.
 

Field Detail

ATTRIBUTE_ENV

static final java.lang.String ATTRIBUTE_ENV
This attribute indicates the environment that the validation process is being done in. The value of this attribute can be one of the following constants:
VALUE_ENV_ECLIPSE
VALUE_ENV_STANDALONE
Default value is VALUE_ENV_STANDALONE

See Also:
Constant Field Values

ATTRIBUTE_INSTANCE

static final java.lang.String ATTRIBUTE_INSTANCE
If ATTRIBUTE_INPUT_TYPE is set to "value.sml.unit", then the expected value of this attribute is a set of comma separated SML unit documents; otherwise the input is expected to be the path of an SML-IF document.

See Also:
Constant Field Values

ATTRIBUTE_VALIDATION_XML

static final java.lang.String ATTRIBUTE_VALIDATION_XML
Stores the class that will be used to perform the XML validation

See Also:
Constant Field Values

ATTRIBUTE_VALIDATION_SML

static final java.lang.String ATTRIBUTE_VALIDATION_SML
Stores the classes that will be used to perform the SML (schema extension) validations

See Also:
Constant Field Values

ATTRIBUTE_VALIDATION_SCHEMATRON

static final java.lang.String ATTRIBUTE_VALIDATION_SCHEMATRON
Stores the class that will be used to perform the schematron validation

See Also:
Constant Field Values

ATTRIBUTE_FILE_OUTPUT

static final java.lang.String ATTRIBUTE_FILE_OUTPUT
A path to a file which the message will be written to

See Also:
Constant Field Values

VALUE_ENV_ECLIPSE

static final java.lang.String VALUE_ENV_ECLIPSE
Indicates that the validation is being performed in Eclipse

See Also:
Constant Field Values

VALUE_ENV_STANDALONE

static final java.lang.String VALUE_ENV_STANDALONE
Indicates that the validation is being performed in standalone mode

See Also:
Constant Field Values

ATTRIBUTE_SML_IF_SCHEMA

static final java.lang.String ATTRIBUTE_SML_IF_SCHEMA
Indicates the location of the SML-IF schema.

See Also:
Constant Field Values

ATTRIBUTE_SCHEMATRON_SCHEMA

static final java.lang.String ATTRIBUTE_SCHEMATRON_SCHEMA
Indicates the location of the schematron schema.

See Also:
Constant Field Values

ATTRIBUTE_INPUT_TYPE

static final java.lang.String ATTRIBUTE_INPUT_TYPE
Indicates the input type. Valid values are: The default value is VALUE_SML_IF

See Also:
Constant Field Values

ATTRIBUTE_OUTPUT

static final java.lang.String ATTRIBUTE_OUTPUT
Indicates the validation output attribute

See Also:
Constant Field Values

ATTRIBUTE_STRUCTURED_OUTPUT

static final java.lang.String ATTRIBUTE_STRUCTURED_OUTPUT
Indicates the structured schematron output attribute

See Also:
Constant Field Values

VALUE_SML_UNIT

static final java.lang.String VALUE_SML_UNIT
Indicates that the input is a set of SML documents that will need to be validated.

See Also:
Constant Field Values

VALUE_SML_IF

static final java.lang.String VALUE_SML_IF
Indicates that the input type is an SML-IF document that will need to be validated.

See Also:
Constant Field Values

ATTRIBUTE_FAST_FAIL_POLICY

static final java.lang.String ATTRIBUTE_FAST_FAIL_POLICY
Indicates whether the validation should stop after encountering the first error.

See Also:
Constant Field Values
Method Detail

initialize

void initialize(java.util.Map validationAttribute)
Initialize this validation class based on the set of attributes passed in. See the ATTRIBUTE_* available.

Parameters:
validationAttribute - The validation outputs

validate

boolean validate()
Performs the validation and returns true if successful and false otherwise.

Returns:
true if successful; false otherwise

addValidationListener

void addValidationListener(IValidationListener listener)

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