Interface XSIdentityConstraint

All Superinterfaces:
XSComponent
All Known Implementing Classes:
IdentityConstraintImpl

public interface XSIdentityConstraint extends XSComponent
Identity constraint.
Author:
Kohsuke Kawaguchi
  • Field Details

  • Method Details

    • getParent

      XSElementDecl getParent()
      Gets the XSElementDecl that owns this identity constraint.
      Returns:
      never null.
    • getName

      String getName()
      Name of the identity constraint. A name uniquely identifies this within the namespace.
      Returns:
      never null.
    • getTargetNamespace

      String getTargetNamespace()
      Target namespace of the identity constraint. Just short for getParent().getTargetNamespace().
    • getCategory

      short getCategory()
      Returns the type of the identity constraint.
      Returns:
      either KEY,KEYREF, or UNIQUE.
    • getSelector

      XSXPath getSelector()
      Returns the selector XPath expression as string.
      Returns:
      never null.
    • getFields

      List<XSXPath> getFields()
      Returns the list of field XPaths.
      Returns:
      a non-empty read-only list of Strings, each representing the XPath.
    • getReferencedKey

      XSIdentityConstraint getReferencedKey()
      If this is KEYREF, returns the key being referenced.
      Returns:
      always non-null (when getCategory()==KEYREF).
      Throws:
      IllegalStateException - if getCategory()!=KEYREF