Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.schema.model.impl.internal
Class ConstraintOverrideProperty

java.lang.Object
  extended by eu.esdihumboldt.hale.common.schema.model.impl.AbstractPropertyDecorator
      extended by eu.esdihumboldt.hale.common.schema.model.impl.internal.ConstraintOverrideProperty
All Implemented Interfaces:
Locatable, ChildDefinition<PropertyConstraint>, Definition<PropertyConstraint>, PropertyDefinition, Comparable<Definition<?>>

@Immutable
public class ConstraintOverrideProperty
extends AbstractPropertyDecorator

Decorator for PropertyDefinitions that overrides given constraints.

Author:
Simon Templer

Field Summary
 
Fields inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractPropertyDecorator
property
 
Constructor Summary
ConstraintOverrideProperty(PropertyDefinition property, PropertyConstraint... constraints)
          Create a decorator for the given property where the given constraints override the constraints of the property.
 
Method Summary
<T extends PropertyConstraint>
T
getConstraint(Class<T> constraintType)
          Get the constraint with the given constraint type.
Should usually not be called while creating the model, exceptions can be getting mutable constraints where this is intended.
 
Methods inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractPropertyDecorator
asGroup, asProperty, compareTo, getDeclaringGroup, getDescription, getDisplayName, getIdentifier, getLocation, getName, getParentType, getPropertyType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintOverrideProperty

public ConstraintOverrideProperty(PropertyDefinition property,
                                  PropertyConstraint... constraints)
Create a decorator for the given property where the given constraints override the constraints of the property.

Parameters:
property - the property to decorate
constraints - the overriding constraints
Method Detail

getConstraint

public <T extends PropertyConstraint> T getConstraint(Class<T> constraintType)
Description copied from interface: Definition
Get the constraint with the given constraint type.
Should usually not be called while creating the model, exceptions can be getting mutable constraints where this is intended.

Specified by:
getConstraint in interface Definition<PropertyConstraint>
Overrides:
getConstraint in class AbstractPropertyDecorator
Type Parameters:
T - the constraint type
Parameters:
constraintType - the constraint type, see Constraint
Returns:
the constraint with the given type
See Also:
AbstractPropertyDecorator.getConstraint(Class)

Humboldt Alignment Editor 2.5.0

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