Top Description Fields Methods
com.sun.xml.xsom

public Interface XSIdentityConstraint

extends XSComponent
Known Direct Implementers
com.sun.xml.xsom.impl.IdentityConstraintImpl
Imports
java.util.List

Identity constraint.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
public static final short
public static final short
public static final short

Method Summary

Modifier and TypeMethod and Description
public short

Returns:

either KEY,KEYREF, or UNIQUE.
getCategory
()

Returns the type of the identity constraint.

public List<XSXPath>

Returns:

a non-empty read-only list of Strings, each representing the XPath.
getFields
()

Returns the list of field XPaths.

public String

Returns:

never null.
getName
()

Name of the identity constraint.

public XSElementDecl

Returns:

never null.
getParent
()

Gets the XSElementDecl that owns this identity constraint.

public XSIdentityConstraint

Returns:

always non-null (when getCategory()==KEYREF).
getReferencedKey
()

If this is KEYREF, returns the key being referenced.

public XSXPath

Returns:

never null.
getSelector
()

Returns the selector XPath expression as string.

public String
getTargetNamespace()

Target namespace of the identity constraint.

Inherited from com.sun.xml.xsom.XSComponent:
applygetAnnotationgetAnnotationgetForeignAttributegetForeignAttributesgetLocatorgetOwnerSchemagetRootgetSourceDocumentselectselectSinglevisit

Field Detail

KEYback to summary
public static final short KEY
KEYREFback to summary
public static final short KEYREF
UNIQUEback to summary
public static final short UNIQUE

Method Detail

getCategoryback to summary
public short getCategory()

Returns the type of the identity constraint.

Returns:short

either KEY,KEYREF, or UNIQUE.

getFieldsback to summary
public List<XSXPath> getFields()

Returns the list of field XPaths.

Returns:List<XSXPath>

a non-empty read-only list of Strings, each representing the XPath.

getNameback to summary
public String getName()

Name of the identity constraint. A name uniquely identifies this within the namespace.

Returns:String

never null.

getParentback to summary
public XSElementDecl getParent()

Gets the XSElementDecl that owns this identity constraint.

Returns:XSElementDecl

never null.

getReferencedKeyback to summary
public XSIdentityConstraint getReferencedKey()

If this is KEYREF, returns the key being referenced.

Returns:XSIdentityConstraint

always non-null (when getCategory()==KEYREF).

Exceptions
IllegalStateException:
if getCategory()!=KEYREF
getSelectorback to summary
public XSXPath getSelector()

Returns the selector XPath expression as string.

Returns:XSXPath

never null.

getTargetNamespaceback to summary
public String getTargetNamespace()

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