org.apache.ws.jaxme.xs.impl
Class XSIdentityConstraintImpl

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.XSObjectImpl
      extended by org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
          extended by org.apache.ws.jaxme.xs.impl.XSIdentityConstraintImpl
All Implemented Interfaces:
XSIdentityConstraint, XSObject, XSOpenAttrs

public class XSIdentityConstraintImpl
extends XSOpenAttrsImpl
implements XSIdentityConstraint

Default implementation of the XSIdentityConstraint.

Author:
Chris Kirk

Constructor Summary
protected XSIdentityConstraintImpl(XSElement pParent, XsEKey key)
           
protected XSIdentityConstraintImpl(XSElement pParent, XsEUnique unique)
           
 
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.
 void validate()
          Validates the objects internal state.
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSOpenAttrsImpl
getOpenAttributes
 
Methods inherited from class org.apache.ws.jaxme.xs.impl.XSObjectImpl
getLocator, getParentObject, getXsObject, getXSSchema, isTopLevelObject, validateAllIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

XSIdentityConstraintImpl

protected XSIdentityConstraintImpl(XSElement pParent,
                                   XsEKey key)
                            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

XSIdentityConstraintImpl

protected XSIdentityConstraintImpl(XSElement pParent,
                                   XsEUnique unique)
                            throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
Method Detail

getAnnotations

public XSAnnotation[] getAnnotations()
Description copied from interface: XSIdentityConstraint
Returns the array of annotations.

Specified by:
getAnnotations in interface XSIdentityConstraint

getName

public java.lang.String getName()
Description copied from interface: XSIdentityConstraint
Returns the name of this constraint.

Specified by:
getName in interface XSIdentityConstraint
See Also:
getName()

isUnique

public boolean isUnique()
Description copied from interface: XSIdentityConstraint
Return true if every element of the key is required when matching a node.

Specified by:
isUnique in interface XSIdentityConstraint
See Also:
isUnique

getMatchCriteria

public XSElementOrAttrRef[][] getMatchCriteria()
Description copied from interface: XSIdentityConstraint
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.

Specified by:
getMatchCriteria in interface XSIdentityConstraint
See Also:
getMatchCriteria()

validate

public void validate()
              throws org.xml.sax.SAXException
Description copied from interface: XSObject

Validates the objects internal state.

Specified by:
validate in interface XSObject
Overrides:
validate in class XSObjectImpl
Throws:
org.xml.sax.SAXException