org.jbind.xml.schema.constraint
Class IdentityConstraint

java.lang.Object
  extended byorg.jbind.xml.schema.constraint.Constraint
      extended byorg.jbind.xml.schema.constraint.IdentityConstraint
All Implemented Interfaces:
IConstraint, IHasLocation, IIdentityConstraint
Direct Known Subclasses:
IdOrIdsConstraint, IdRefOrIdRefsConstraint

public abstract class IdentityConstraint
extends Constraint
implements IIdentityConstraint


Constructor Summary
IdentityConstraint(IAttrRefOrDecl aDecl, IHasLocation aHasLocation)
           
 
Method Summary
protected  IAnyTypeData getAddressedData(IAnyTypeData aData)
           
protected  IRef getAttributeRef()
           
 IAttrRefOrDecl getAttrRefOrDecl()
           
 IAnyType getDataType()
          Gets the type of the data that is constrained.
 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.
 void setDataType(IAnyType aType)
          Sets the type of the data that is constrained.
 
Methods inherited from class org.jbind.xml.schema.constraint.Constraint
getLocation, isFinal, setIsFinal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.constraint.IConstraint
getConstraintType, globalCheck, isFinal
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 

Constructor Detail

IdentityConstraint

public IdentityConstraint(IAttrRefOrDecl aDecl,
                          IHasLocation aHasLocation)
Method Detail

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).

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.

getDataType

public IAnyType getDataType()
Description copied from interface: IIdentityConstraint
Gets the type of the data that is constrained. For reference constraints it is the type of the referenced data. For instance constraints it is the type of the instances.

Specified by:
getDataType in interface IIdentityConstraint
Returns:
(required).

setDataType

public void setDataType(IAnyType aType)
Description copied from interface: IIdentityConstraint
Sets the type of the data that is constrained.

Specified by:
setDataType in interface IIdentityConstraint
Parameters:
aType - (optional).

getAddressedData

protected IAnyTypeData getAddressedData(IAnyTypeData aData)

getAttrRefOrDecl

public IAttrRefOrDecl getAttrRefOrDecl()

getAttributeRef

protected IRef getAttributeRef()