biz.c24.io.api
Class ParserError

java.lang.Object
  extended by biz.c24.io.api.ParserError

public class ParserError
extends Object

Signals that some event has occured during the parsing of a data model.
This event allows the fieldName which was being parsed to be passed out of the parsing process. As well as the result type and a descriptive message of the cause of this event.


Constructor Summary
ParserError(ValidationResultEnum result, ComplexDataObject context, DataComponent component, EventMessage eventMessage, StringBuffer fieldNameBuffer, int offset, int lineNumber, int columnNumber)
           
ParserError(ValidationResultEnum result, ComplexDataObject context, DataComponent component, Exception exception, StringBuffer fieldNameBuffer, int offset, int lineNumber, int columnNumber)
           
ParserError(ValidationResultEnum result, ComplexDataObject context, DataComponent component, String message, String fieldName, int offset, int lineNumber, int columnNumber)
          Constructs a new instance with the specified message, fieldName and result.
 
Method Summary
 int getColumnNumber()
          Returns the column number of the error.
 DataComponent getComponent()
          Returns the component withing the object which defined the invalid field.
 ComplexDataObject getContext()
          Returns the object containing the invalid field.
 String getFieldName()
          Returns the path to the value which caused the error from the root of the parse.
 int getLineNumber()
          Returns the line number of the error.
 String getMessage()
          Returns the message describing the error.
 int getOffset()
          Returns the offset of the error into the data stream.
 ValidationResultEnum getResult()
          Returns the parse result.
 String toString()
          Return the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParserError

public ParserError(ValidationResultEnum result,
                   ComplexDataObject context,
                   DataComponent component,
                   String message,
                   String fieldName,
                   int offset,
                   int lineNumber,
                   int columnNumber)
Constructs a new instance with the specified message, fieldName and result.

Parameters:
result - The result of the parsing process.
context - The source of the event.
component - The component within the source.
message - The message describing the error.
fieldName - The fieldName of the source.
offset - The location at which the condition occurred.
lineNumber - The line number of the error.
columnNumber - The columnNumber of the error.

ParserError

public ParserError(ValidationResultEnum result,
                   ComplexDataObject context,
                   DataComponent component,
                   EventMessage eventMessage,
                   StringBuffer fieldNameBuffer,
                   int offset,
                   int lineNumber,
                   int columnNumber)

ParserError

public ParserError(ValidationResultEnum result,
                   ComplexDataObject context,
                   DataComponent component,
                   Exception exception,
                   StringBuffer fieldNameBuffer,
                   int offset,
                   int lineNumber,
                   int columnNumber)
Method Detail

getResult

public ValidationResultEnum getResult()
Returns the parse result.

Returns:
The result.

getContext

public ComplexDataObject getContext()
Returns the object containing the invalid field.

Returns:
The context object.

getComponent

public DataComponent getComponent()
Returns the component withing the object which defined the invalid field.

Returns:
The component.

getMessage

public String getMessage()
Returns the message describing the error.

Returns:
The message.

getFieldName

public String getFieldName()
Returns the path to the value which caused the error from the root of the parse.

Returns:
The name of the field, or null if the context object was at fault.

getOffset

public int getOffset()
Returns the offset of the error into the data stream.

Returns:
The offset.

getLineNumber

public int getLineNumber()
Returns the line number of the error.

Returns:
The line number.

getColumnNumber

public int getColumnNumber()
Returns the column number of the error.

Returns:
The column number.

toString

public String toString()
Return the message.

Overrides:
toString in class Object
Returns:
The message.


C24 Technologies © 2002-2012: All Rights Reserved.