org.jbind.xml.core.constraint
Interface IConstraint

All Superinterfaces:
IHasLocation
All Known Subinterfaces:
IBuiltInConstraint, IElementIdentityConstraint, IElementInstanceConstraint, IElementKeyConstraint, IElementKeyRefConstraint, IElementUniqueConstraint, IEnumerationConstraint, IIdentityConstraint, IIdentityConstraintComponent, IIdRefOrIdRefsConstraint, IInstanceConstraint, ILengthConstraint, ILngthConstraint, IMaxExclusiveConstraint, IMaxInclusiveConstraint, IMaxLengthConstraint, IMinExclusiveConstraint, IMinInclusiveConstraint, IMinLengthConstraint, IPatternConstraint, IReferenceConstraint, ISimpleConstraint, IThresholdConstraint, ITypeIdentityConstraint, ITypeInstanceConstraint, ITypeKeyConstraint, ITypeKeyRefConstraint, ITypeUniqueConstraint, IXPathConstraint
All Known Implementing Classes:
AttributesConstraint, BuiltInConstraint, Constraint, ConstraintType.Enumeration.EnumerationConstraint, ConstraintType.Pattern.PatternConstraint, org.jbind.xml.core.constraint.ConstraintType.SimpleConstraint, ElementIdentityConstraint, ElementKeyConstraint, ElementKeyRefConstraint, ElementUniqueConstraint, IdentityConstraint, IdentityConstraintComponent, IdRefOrIdRefsConstraint, TypeInstanceConstraint, TypeKeyConstraint, TypeKeyRefConstraint, TypeUniqueConstraint, XPathConstraint

public interface IConstraint
extends IHasLocation


Method Summary
 ConstraintType getConstraintType()
           
 void globalCheck(IDataContext aContext, IAnyTypeData aData, IAnyTypeData anEnclosingData, IConstraintViolations aViolations)
          Checks if the specified data satisfies the constraint globally.
 boolean isFinal()
          Indicates if the constraint must not be further restricted.
 boolean isRestriction(IConstraint aConstraint)
          Checks if this constraint is a restriction of the specified constraint.
 void localCheck(ICheckContext aCheckContext, IAnyTypeData aData, IConstraintViolations aViolations)
          Checks if the specified data satisfies the constraint locally.
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 

Method Detail

localCheck

public void localCheck(ICheckContext aCheckContext,
                       IAnyTypeData aData,
                       IConstraintViolations aViolations)
Checks if the specified data satisfies the constraint locally.

Parameters:
aData - (required).
aViolations - (required).

globalCheck

public void globalCheck(IDataContext aContext,
                        IAnyTypeData aData,
                        IAnyTypeData anEnclosingData,
                        IConstraintViolations aViolations)
Checks if the specified data satisfies the constraint globally.

Parameters:
aContext - (required).
aData - (required).
aViolations - (required).

isRestriction

public boolean isRestriction(IConstraint aConstraint)
Checks if this constraint is a restriction of the specified constraint.

Parameters:
aConstraint - (required).
Returns:
Returns true iff this constraint is a restriction of the specified constraint.

isFinal

public boolean isFinal()
Indicates if the constraint must not be further restricted.

Returns:
Returns true iff the constraint can not be restricted.

getConstraintType

public ConstraintType getConstraintType()