org.deri.wsmo4j.validator
Class ValidationErrorImpl

java.lang.Object
  extended by org.deri.wsmo4j.validator.ValidationMessageImpl
      extended by org.deri.wsmo4j.validator.ValidationErrorImpl
All Implemented Interfaces:
org.wsmo.validator.ValidationError, org.wsmo.validator.ValidationMessage
Direct Known Subclasses:
AttributeErrorImpl, LogicalExpressionErrorImpl

public class ValidationErrorImpl
extends ValidationMessageImpl
implements org.wsmo.validator.ValidationError

Gives Structure to a validation error.

  Created on Jul 28, 2005
  Committed by $Author: nathaliest $
  $Source$,
 

Version:
$Revision: 1813 $ $Date: 2006-08-22 19:22:26 +0300 (Tue, 22 Aug 2006) $
Author:
Holger Lausen, nathalie.steinmetz@deri.org
See Also:
ValidationError

Field Summary
 
Fields inherited from interface org.wsmo.validator.ValidationError
ANON_ID_ERR, ATTR_CARD_ERR, ATTR_CONS_ERR, ATTR_ERR, ATTR_FEAT_ERR, AX_ATOMIC_ERR, AX_BODY_ERR, AX_EQUIV_ERR, AX_FORMULA_ERR, AX_GRAPH_ERR, AX_HEAD_ERR, AX_IMP_ERR, AX_IMPL_BY_ERR, AX_LHS_ERR, AX_RHS_ERR, AX_SAFETY_COND, CONC_ERR, ID_ERR, IMPORT_ERR, META_MODEL_ERR, REL_ARITY_ERR, REL_CONS_ERR, REL_ERR, REL_INST_ERR
 
Constructor Summary
ValidationErrorImpl(org.wsmo.common.Entity entity, String reason, String variant)
           
ValidationErrorImpl(org.wsmo.common.Entity entity, String reason, String variant, String quickFix)
           
 
Method Summary
 boolean equals(Object obj)
           The equals method implements an equivalence relation on non-null object references.
 String getViolatesVariant()
           
 int hashCode()
           If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
 String toString()
          Formats the String representation of the ValidationError.
 
Methods inherited from class org.deri.wsmo4j.validator.ValidationMessageImpl
getEntity, getQuickFix, getReason
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wsmo.validator.ValidationMessage
getEntity, getQuickFix, getReason
 

Constructor Detail

ValidationErrorImpl

public ValidationErrorImpl(org.wsmo.common.Entity entity,
                           String reason,
                           String variant)

ValidationErrorImpl

public ValidationErrorImpl(org.wsmo.common.Entity entity,
                           String reason,
                           String variant,
                           String quickFix)
Method Detail

getViolatesVariant

public String getViolatesVariant()
Specified by:
getViolatesVariant in interface org.wsmo.validator.ValidationError
Returns:
String representation of URI representing the variant that the error violates
See Also:
ValidationError.getViolatesVariant()

toString

public String toString()
Formats the String representation of the ValidationError.

Overrides:
toString in class ValidationMessageImpl
See Also:
Object.toString()

equals

public boolean equals(Object obj)

The equals method implements an equivalence relation on non-null object references. ValidationWarnings are equal if their warning and quickFix messages are equal.

It is generally necessary to override the hashCode method whenever this method is overridden.

Overrides:
equals in class Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(java.lang.Object), Object.hashCode()

hashCode

public int hashCode()

If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. However, it is not required that if two objects are unequal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results.

This method should be overriden, when the equals(Object) method is overriden.

Overrides:
hashCode in class Object
Returns:
A hash code value for this Object.
See Also:
Object.hashCode(), Object.equals(Object)


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.