Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instancevalidator
Class InstanceValidator

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instancevalidator.InstanceValidator

public class InstanceValidator
extends Object

Validator for instances using constraints.

Author:
Kai Schwierczek

Constructor Summary
InstanceValidator()
           
 
Method Summary
protected static boolean skipValidation(TypeDefinition typeDef, Object value)
          Determines if validation should be skipped for a certain property type and value.
static InstanceValidationReporter validate(Instance instance)
          Validates the given Instance.
static InstanceValidationReporter validate(Object object, ChildDefinition<?> childDef)
          Validates the given object.
static InstanceValidationReport validateInstances(InstanceCollection instances, org.eclipse.core.runtime.IProgressMonitor monitor)
          Validates the given instances using all constraints that are validatable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceValidator

public InstanceValidator()
Method Detail

validateInstances

public static InstanceValidationReport validateInstances(InstanceCollection instances,
                                                         org.eclipse.core.runtime.IProgressMonitor monitor)
Validates the given instances using all constraints that are validatable.

Parameters:
instances - the instances to validate
monitor - the progress monitor
Returns:
a report of the validation

validate

public static InstanceValidationReporter validate(Object object,
                                                  ChildDefinition<?> childDef)
Validates the given object. The created reports messages do not have an InstanceReference set.

Parameters:
object - the object to validate (i. e. an instance, group or basic value)
childDef - the child definition of the given object
Returns:
a report of the validation

validate

public static InstanceValidationReporter validate(Instance instance)
Validates the given Instance. The created reports messages do not have an InstanceReference set.

Parameters:
instance - the instance to validate
Returns:
a report of the validation

skipValidation

protected static boolean skipValidation(TypeDefinition typeDef,
                                        Object value)
Determines if validation should be skipped for a certain property type and value.

Parameters:
typeDef - the property type
value - the property value
Returns:
if validation should be skipped for the property and its children

Humboldt Alignment Editor 2.5.0

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