org.apache.ws.jaxme.xs
Interface XSIdentityConstraint

All Superinterfaces:
XSObject, XSOpenAttrs
All Known Implementing Classes:
XSIdentityConstraintImpl

public interface XSIdentityConstraint
extends XSOpenAttrs

An identity constraint restricts the contents of an elements children. An XSElement may have one or more constraints associated with it that restrict the values that can be stored in an XML file that is described by this schema. For more information read into xs:key, xs:key-ref and xs:unique.

Author:
Chris Kirk
See Also:
XSElement

Method Summary
 XSAnnotation[] getAnnotations()
          Returns the array of annotations.
 XSElementOrAttrRef[][] getMatchCriteria()
          Returns an array of references to element and attributes.
 java.lang.String getName()
          Returns the name of this constraint.
 boolean isUnique()
          Return true if every element of the key is required when matching a node.
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSOpenAttrs
getOpenAttributes
 
Methods inherited from interface org.apache.ws.jaxme.xs.XSObject
getLocator, getParentObject, getXSSchema, isTopLevelObject, validate
 

Method Detail

getAnnotations

XSAnnotation[] getAnnotations()
Returns the array of annotations.


getName

java.lang.String getName()
Returns the name of this constraint.


isUnique

boolean isUnique()
Return true if every element of the key is required when matching a node.


getMatchCriteria

XSElementOrAttrRef[][] getMatchCriteria()
Returns an array of references to element and attributes. All references are relative to the element that owns this constraint.

The result is a two dimensional array, the first dimension corresponds to each xs:field used to declare the constraint. The second dimension is for each 'or' used within the fields xpath query.

Only tags and attributes that were matched by the xpath will be in the result, any xpath that fails to match anything will not be stored in this array.