org.jbind.xml.schema.constraint
Class XPathConstraint

java.lang.Object
  extended byorg.jbind.xml.schema.constraint.XPathConstraint
All Implemented Interfaces:
IConstraint, IHasLocation, IXPathConstraint

public class XPathConstraint
extends java.lang.Object
implements IXPathConstraint


Constructor Summary
XPathConstraint(IXPath aTest, IXPath aSelect, IHasLocation aHasLocation)
           
 
Method Summary
 ConstraintType getConstraintType()
           
 ILocation getLocation()
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathConstraint

public XPathConstraint(IXPath aTest,
                       IXPath aSelect,
                       IHasLocation aHasLocation)
Method Detail

getConstraintType

public ConstraintType getConstraintType()
Specified by:
getConstraintType in interface IConstraint

getLocation

public ILocation getLocation()
Specified by:
getLocation in interface IHasLocation

globalCheck

public void globalCheck(IDataContext aContext,
                        IAnyTypeData aData,
                        IAnyTypeData anEnclosingData,
                        IConstraintViolations aViolations)
Description copied from interface: IConstraint
Checks if the specified data satisfies the constraint globally.

Specified by:
globalCheck in interface IConstraint
Parameters:
aContext - (required).
aData - (required).
aViolations - (required).

isFinal

public boolean isFinal()
Description copied from interface: IConstraint
Indicates if the constraint must not be further restricted.

Specified by:
isFinal in interface IConstraint
Returns:
Returns true iff the constraint can not be restricted.

isRestriction

public boolean isRestriction(IConstraint aConstraint)
Description copied from interface: IConstraint
Checks if this constraint is a restriction of the specified constraint.

Specified by:
isRestriction in interface IConstraint
Parameters:
aConstraint - (required).
Returns:
Returns true iff this constraint is a restriction of the specified constraint.

localCheck

public void localCheck(ICheckContext aCheckContext,
                       IAnyTypeData aData,
                       IConstraintViolations aViolations)
Description copied from interface: IConstraint
Checks if the specified data satisfies the constraint locally.

Specified by:
localCheck in interface IConstraint
Parameters:
aData - (required).
aViolations - (required).