Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instancevalidator.validators
Class CardinalityValidator

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instancevalidator.validators.CardinalityValidator
All Implemented Interfaces:
ConstraintValidator, GroupPropertyConstraintValidator, PropertyConstraintValidator

public class CardinalityValidator
extends Object
implements GroupPropertyConstraintValidator, PropertyConstraintValidator

Validator for Cardinality.

Author:
Kai Schwierczek

Constructor Summary
CardinalityValidator()
           
 
Method Summary
 void validateGroupPropertyConstraint(Object[] values, GroupPropertyConstraint constraint, GroupPropertyDefinition property, InstanceValidationContext context)
          Validate values against constraint.
 void validatePropertyConstraint(Object[] values, PropertyConstraint constraint, PropertyDefinition property, InstanceValidationContext context)
          Validate values against constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardinalityValidator

public CardinalityValidator()
Method Detail

validatePropertyConstraint

public void validatePropertyConstraint(Object[] values,
                                       PropertyConstraint constraint,
                                       PropertyDefinition property,
                                       InstanceValidationContext context)
                                throws ValidationException
Description copied from interface: PropertyConstraintValidator
Validate values against constraint. The constraint and the values belong to property.

Specified by:
validatePropertyConstraint in interface PropertyConstraintValidator
Parameters:
values - the values to validate, may be null
constraint - the constraint to validate
property - the property the values and the constraint belong to
context - the validation context
Throws:
ValidationException - if the validation fails

validateGroupPropertyConstraint

public void validateGroupPropertyConstraint(Object[] values,
                                            GroupPropertyConstraint constraint,
                                            GroupPropertyDefinition property,
                                            InstanceValidationContext context)
                                     throws ValidationException
Description copied from interface: GroupPropertyConstraintValidator
Validate values against constraint. The constraint and the values belong to property.

Specified by:
validateGroupPropertyConstraint in interface GroupPropertyConstraintValidator
Parameters:
values - the values to validate, may be null
constraint - the constraint to validate
property - the property the values and the constraint belong to
context - the validation context
Throws:
ValidationException - if the validation fails

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d