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

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

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

public abstract class TextOutput
extends AbstractValidationOutput

An abstract class used to format and output a verification message to an output stream defined by a subclass


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput
AbstractValidationOutput.ValidationMessage, AbstractValidationOutput.ValidationMessageFactory
 
Constructor Summary
TextOutput()
           
 
Method Summary
 java.lang.String formatMessage(org.eclipse.core.resources.IResource resource, int lineNumber, java.lang.String severity, java.lang.String validationMsg)
          Formats the attributes of a verification message into a message that can be logged to an output stream
protected abstract  void writeMessage(java.lang.String message)
          Concrete classes are expected to write the passed in message to an output stream.
 void writeMessageToSource(IValidationMessage validationMessage)
          The final method invoked to write the validation message to the output source.
 
Methods inherited from class org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput
close, getAssociatedResource, getErrorCount, initialize, reportMessage, setAssociatedResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextOutput

public TextOutput()
Method Detail

writeMessageToSource

public void writeMessageToSource(IValidationMessage validationMessage)
Description copied from class: AbstractValidationOutput
The final method invoked to write the validation message to the output source.

Specified by:
writeMessageToSource in class AbstractValidationOutput
Parameters:
validationMessage - The validation message
See Also:
org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput#reportMessage(org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput.ValidationMessage)

formatMessage

public java.lang.String formatMessage(org.eclipse.core.resources.IResource resource,
                                      int lineNumber,
                                      java.lang.String severity,
                                      java.lang.String validationMsg)
Formats the attributes of a verification message into a message that can be logged to an output stream

Parameters:
resource - The resource that is associated with the verification message; null if none is available
lineNumber - The line number associated with the message; -1 if none is available
severity - The string representation of the message's severity
validationMsg - The message
Returns:
A formatted message that can be logged to an output stream

writeMessage

protected abstract void writeMessage(java.lang.String message)
Concrete classes are expected to write the passed in message to an output stream.

Parameters:
message - The message to be written

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