org.apache.ws.jaxme.xs

Interface XSKeyRef

public interface XSKeyRef extends XSOpenAttrs

This reference represents a key used to look up other elements. It does not infer any extra constraints other than if the match criteria exists then the values matched must exist within the refered identity constraint. For more information please refer to the xs:keyref tag.

Author: Chris Kirk

See Also: XSElement

Method Summary
XSAnnotation[]getAnnotations()
Returns the array of annotations.
XSIdentityConstraintgetIdentityConstraint()
Returns the name of the unique or key identity constraint that this keyref references.
XSElementOrAttrRef[][]getMatchCriteria()
Returns an array of references to element and attributes.
StringgetName()
Returns the name of this constraint.

Method Detail

getAnnotations

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

getIdentityConstraint

public XSIdentityConstraint getIdentityConstraint()
Returns the name of the unique or key identity constraint that this keyref references. The constraint must either be declared on the same element as this keyref or a descendant.

getMatchCriteria

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

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.

getName

public String getName()
Returns the name of this constraint.