org.jbind.xml.schema.constraint
Class IdRefOrIdRefsConstraint

java.lang.Object
  extended byorg.jbind.xml.schema.constraint.Constraint
      extended byorg.jbind.xml.schema.constraint.IdentityConstraint
          extended byorg.jbind.xml.schema.constraint.IdRefOrIdRefsConstraint
All Implemented Interfaces:
IConstraint, IHasBindingAttributes, IHasLocation, IIdentityConstraint, IIdRefOrIdRefsConstraint, IReferenceConstraint, ISourceInfo
Direct Known Subclasses:
IdRefConstraint, IdRefsConstraint

public abstract class IdRefOrIdRefsConstraint
extends IdentityConstraint
implements IIdRefOrIdRefsConstraint


Constructor Summary
IdRefOrIdRefsConstraint(IAttrRefOrDecl aDecl, IHasLocation aHasLocation)
           
 
Method Summary
 IAnnotation getAnnotation()
           
 IAttribute getBindingAttribute(java.lang.String aName)
          Gets the specified binding attribute.
 java.lang.String getConstraintKey()
          Gets the key of the reference constraint.
 IAttribute getDefaultedLocalBindingAttribute(java.lang.String aName)
          Gets a local binding attribute.
 java.lang.String getDefaultedLocalStringBindingAttribute(java.lang.String aName)
          Gets a string valued defaulted local binding attribute.
 IAttribute getLocalBindingAttribute(java.lang.String aName)
          Gets a local binding attribute.
 java.lang.String getLocalStringBindingAttribute(java.lang.String aName)
          Gets a string valued local binding attribute.
 java.util.Map getPrefixToNamespaceMapping()
           
 java.lang.String getStringBindingAttribute(java.lang.String aName)
          Gets a string valued binding attribute.
 void globalCheck(IDataContext aContext, IAnyTypeData aData, IAnyTypeData anEnclosingData, IConstraintViolations aViolations)
          Adds data references to the data context.
 boolean isTopLevelComponent()
           
protected abstract  java.util.Iterator iterKeys(IAnyTypeData aData)
          Iterates the keys of the data objects that are referenced by the constraint.
 
Methods inherited from class org.jbind.xml.schema.constraint.IdentityConstraint
getAddressedData, getAttributeRef, getAttrRefOrDecl, getDataType, isRestriction, localCheck, setDataType
 
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.IIdRefOrIdRefsConstraint
getAttrRefOrDecl
 
Methods inherited from interface org.jbind.xml.core.constraint.IReferenceConstraint
isSingleNotMultipleReference
 
Methods inherited from interface org.jbind.xml.core.constraint.IIdentityConstraint
getDataType, setDataType
 
Methods inherited from interface org.jbind.xml.core.constraint.IConstraint
getConstraintType, isFinal, isRestriction, localCheck
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 

Constructor Detail

IdRefOrIdRefsConstraint

public IdRefOrIdRefsConstraint(IAttrRefOrDecl aDecl,
                               IHasLocation aHasLocation)
Method Detail

globalCheck

public void globalCheck(IDataContext aContext,
                        IAnyTypeData aData,
                        IAnyTypeData anEnclosingData,
                        IConstraintViolations aViolations)
Adds data references to the data context.

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

getConstraintKey

public java.lang.String getConstraintKey()
Description copied from interface: IReferenceConstraint
Gets the key of the reference constraint. The key must be unique within the type the reference constraint belongs to. The key is used by the methods that are generated for reference constraints to access their referenced data.

Specified by:
getConstraintKey in interface IReferenceConstraint
Returns:
(required).

iterKeys

protected abstract java.util.Iterator iterKeys(IAnyTypeData aData)
Iterates the keys of the data objects that are referenced by the constraint.

Returns:
(required). An iterator of IKey.

getLocalBindingAttribute

public IAttribute getLocalBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets a local binding attribute.

Specified by:
getLocalBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required)
Returns:
(optional).

getDefaultedLocalBindingAttribute

public IAttribute getDefaultedLocalBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets a local binding attribute. If the binding attribute is not specified locally then a default value is looked for. Default values can be specified on schema elements. If a schema is included by another schema then the default values of the parent schema are considered too.

Specified by:
getDefaultedLocalBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required)
Returns:
(optional).

getBindingAttribute

public IAttribute getBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets the specified binding attribute. The attribute may be searched in different contexts (for example a schema component may asked its ancestor component and its schema for the specified attribute. The the first occurence is returned.

Specified by:
getBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required)
Returns:
(optional).

getLocalStringBindingAttribute

public java.lang.String getLocalStringBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets a string valued local binding attribute.

Specified by:
getLocalStringBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required).
Returns:
(optional).

getDefaultedLocalStringBindingAttribute

public java.lang.String getDefaultedLocalStringBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets a string valued defaulted local binding attribute.

Specified by:
getDefaultedLocalStringBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required).
Returns:
(optional).

getStringBindingAttribute

public java.lang.String getStringBindingAttribute(java.lang.String aName)
Description copied from interface: IHasBindingAttributes
Gets a string valued binding attribute.

Specified by:
getStringBindingAttribute in interface IHasBindingAttributes
Parameters:
aName - (required).
Returns:
(optional).

isTopLevelComponent

public boolean isTopLevelComponent()
Specified by:
isTopLevelComponent in interface ISourceInfo

getAnnotation

public IAnnotation getAnnotation()
Specified by:
getAnnotation in interface ISourceInfo

getPrefixToNamespaceMapping

public java.util.Map getPrefixToNamespaceMapping()
Specified by:
getPrefixToNamespaceMapping in interface ISourceInfo