org.inria.ns.reflex.processor.asl
Class ValidationError

java.lang.Object
  extended by org.inria.ns.reflex.processor.asl.ValidationError
All Implemented Interfaces:
XOperable

public class ValidationError
extends Object
implements XOperable

Errors reported when validating an XML document with a schema.

Author:
Philippe Poulard

Field Summary
static XOperator VALIDATION_ERROR_XOP
          The singleton XOperator for this class.
 
Constructor Summary
ValidationError(Node node, Node candidate, QName level, QName reason, Schema schema, Node schemaRule)
          Create a new validation error.
ValidationError(Node node, QName level, QName reason, Schema schema, Node schemaRule)
          Create a new validation error.
 
Method Summary
 Map getAttributes()
          Return the fields of a validation error as a map of attributes.
 XOperator getXOperator()
          Return the X-operator of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATION_ERROR_XOP

public static final XOperator VALIDATION_ERROR_XOP
The singleton XOperator for this class.

Constructor Detail

ValidationError

public ValidationError(Node node,
                       Node candidate,
                       QName level,
                       QName reason,
                       Schema schema,
                       Node schemaRule)
Create a new validation error.

Parameters:
node - The node on which the error occurs.
candidate - The candidate that can't be validated, or null.
level - The level of error.
reason - The reason of the error.
schema - The schema that raise the error.
schemaRule - The schema rule in violation.

ValidationError

public ValidationError(Node node,
                       QName level,
                       QName reason,
                       Schema schema,
                       Node schemaRule)
Create a new validation error.

Parameters:
node - The node on which the error occurs.
level - The level of error.
reason - The reason of the error.
schema - The schema that raise the error.
schemaRule - The schema rule in violation.
Method Detail

getXOperator

public XOperator getXOperator()
Return the X-operator of this object.

Specified by:
getXOperator in interface XOperable
Returns:
The non null X-operator of this object.

getAttributes

public Map getAttributes()
Return the fields of a validation error as a map of attributes.

Returns:
The fields of a validation error as a map of attributes.