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

org.eclipse.cosmos.rm.validation.internal.common
Class AbstractValidationOutput

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput
All Implemented Interfaces:
IValidationOutput
Direct Known Subclasses:
MarkerOutput, TextOutput

public abstract class AbstractValidationOutput
extends java.lang.Object
implements IValidationOutput

A validation output is used to write messages while performing the validation process.


Nested Class Summary
static class AbstractValidationOutput.ValidationMessage
          Represents a verification message, which is simply described as a set of unstructured attributes.
static class AbstractValidationOutput.ValidationMessageFactory
          The validation factory class is used to generate validation messages.
 
Constructor Summary
AbstractValidationOutput()
           
 
Method Summary
 void close()
          Closes any stream and performs any clean up necessary
 ResourceWrapper getAssociatedResource()
           
 int getErrorCount()
           
 void initialize(java.util.Map attributes)
          Used to initialize this validation output
 void reportMessage(IValidationMessage validationMessage)
          A message is reported with a set of attributes that determine how the message should be logged.
 void setAssociatedResource(ResourceWrapper resource)
           
abstract  void writeMessageToSource(IValidationMessage validationMessage)
          The final method invoked to write the validation message to the output source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValidationOutput

public AbstractValidationOutput()
Method Detail

initialize

public void initialize(java.util.Map attributes)
Description copied from interface: IValidationOutput
Used to initialize this validation output

Specified by:
initialize in interface IValidationOutput
Parameters:
attributes - Attributes describing the setting
See Also:
IValidationOutput.initialize(java.util.Map)

reportMessage

public void reportMessage(IValidationMessage validationMessage)
Description copied from interface: IValidationOutput
A message is reported with a set of attributes that determine how the message should be logged. VerificationMessage.ATTRIBUTE_* constants are valid attribute keys.

Specified by:
reportMessage in interface IValidationOutput
See Also:
org.eclipse.cosmos.rm.validation.internal.common.IValidationOutput#reportMessage(org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput.ValidationMessage)

writeMessageToSource

public abstract void writeMessageToSource(IValidationMessage validationMessage)
The final method invoked to write the validation message to the output source.

Parameters:
validationMessage - The validation message

close

public void close()
Description copied from interface: IValidationOutput
Closes any stream and performs any clean up necessary

Specified by:
close in interface IValidationOutput
See Also:
IValidationOutput.close()

getErrorCount

public int getErrorCount()

getAssociatedResource

public ResourceWrapper getAssociatedResource()

setAssociatedResource

public void setAssociatedResource(ResourceWrapper resource)

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