com.sun.xml.xsom
Interface XSIdentityConstraint

All Superinterfaces:
XSComponent
All Known Implementing Classes:
IdentityConstraintImpl

public interface XSIdentityConstraint
extends XSComponent

Identity constraint.

Author:
Kohsuke Kawaguchi

Field Summary
static short KEY
           
static short KEYREF
           
static short UNIQUE
           
 
Method Summary
 short getCategory()
          Returns the type of the identity constraint.
 List<XSXPath> getFields()
          Returns the list of field XPaths.
 String getName()
          Name of the identity constraint.
 XSElementDecl getParent()
          Gets the XSElementDecl that owns this identity constraint.
 XSIdentityConstraint getReferencedKey()
          If this is KEYREF, returns the key XSIdentityConstraint being referenced.
 XSXPath getSelector()
          Returns the selector XPath expression as string.
 String getTargetNamespace()
          Target namespace of the identity constraint.
 
Methods inherited from interface com.sun.xml.xsom.XSComponent
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit
 

Field Detail

KEY

static final short KEY
See Also:
Constant Field Values

KEYREF

static final short KEYREF
See Also:
Constant Field Values

UNIQUE

static final short UNIQUE
See Also:
Constant Field Values
Method Detail

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 XSIdentityConstraint 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 XSIdentityConstraint being referenced.

Returns:
always non-null (when getCategory()==KEYREF).
Throws:
IllegalStateException - if getCategory()!=KEYREF


Copyright © 2012 Oracle. All Rights Reserved.