org.jbind.xml.schema.constraint
Class TypeKeyConstraint

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.constraint.IdentityConstraintComponent
          extended byorg.jbind.xml.schema.constraint.TypeIdentityConstraint
              extended byorg.jbind.xml.schema.constraint.TypeInstanceConstraint
                  extended byorg.jbind.xml.schema.constraint.TypeKeyConstraint
All Implemented Interfaces:
IComponent, IConstraint, IHasBindingAttributes, IHasLocation, IIdentityConstraint, IIdentityConstraintComponent, IInstanceConstraint, ISourceInfo, ITypeIdentityConstraint, ITypeInstanceConstraint, ITypeKeyConstraint

public class TypeKeyConstraint
extends TypeInstanceConstraint
implements ITypeKeyConstraint


Nested Class Summary
 
Nested classes inherited from class org.jbind.xml.core.constraint.ITypeInstanceConstraint
ITypeInstanceConstraint.IScope
 
Field Summary
 
Fields inherited from interface org.jbind.xml.core.constraint.ITypeInstanceConstraint
GLOBAL, LOCAL
 
Constructor Summary
TypeKeyConstraint(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, ITypeInstanceConstraint.IScope aScope)
           
 
Method Summary
 void collectLocalTypeInstances(IAnyTypeData aData, java.util.Map aMap, IConstraintViolations aViolations)
           
 ConstraintType getConstraintType()
           
 void globalCheck(IDataContext aContext, IAnyTypeData aData, IAnyTypeData anEnclosingData, IConstraintViolations aViolations)
          Checks if the specified data satisfies the constraint globally.
 
Methods inherited from class org.jbind.xml.schema.constraint.TypeInstanceConstraint
getScope
 
Methods inherited from class org.jbind.xml.schema.constraint.IdentityConstraintComponent
accept, createKey, getDataType, getNbFields, getSelector, getSymbolspace, isFinal, isReference, isRestriction, localCheck, select, select, setDataType, setFields, setSelector, validate
 
Methods inherited from class org.jbind.xml.schema.cmp.Component
addSubComponent, getAnnotation, getBindingAttribute, getBindings, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getGlobalRef, getLocalBindingAttribute, getLocalStringBindingAttribute, getLocation, getName, getNamespace, getParentComponent, getPrefixToNamespaceMapping, getStringBindingAttribute, isAnonymous, isTopLevelComponent, setBindings, setParentComponent, visitSubComponents
 
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.ITypeInstanceConstraint
getScope
 
Methods inherited from interface org.jbind.xml.core.constraint.IIdentityConstraintComponent
getNbFields, getSelector, setFields, setSelector
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
accept, addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, getSymbolspace, isAnonymous, isReference, isTopLevelComponent, setBindings, setParentComponent, validate
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 
Methods inherited from interface org.jbind.xml.core.constraint.IIdentityConstraint
getDataType, setDataType
 
Methods inherited from interface org.jbind.xml.core.constraint.IConstraint
isFinal, isRestriction, localCheck
 

Constructor Detail

TypeKeyConstraint

public TypeKeyConstraint(ISourceInfo aSourceInfo,
                         java.lang.String aNamespace,
                         java.lang.String aName,
                         ITypeInstanceConstraint.IScope aScope)
Method Detail

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

collectLocalTypeInstances

public void collectLocalTypeInstances(IAnyTypeData aData,
                                      java.util.Map aMap,
                                      IConstraintViolations aViolations)
Specified by:
collectLocalTypeInstances in interface ITypeInstanceConstraint

getConstraintType

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