org.apache.xmlbeans
Interface SchemaIdentityConstraint

All Superinterfaces:
SchemaComponent

public interface SchemaIdentityConstraint
extends SchemaComponent

Represents an identity constraint definition.


Nested Class Summary
static class SchemaIdentityConstraint.Ref
          Used to allow on-demand loading of identity constraints.
 
Field Summary
static int CC_KEY
          A xs:key constraint.
static int CC_KEYREF
          A xs:keyRef constraint.
static int CC_UNIQUE
          A xs:unique constraint.
 
Fields inherited from interface org.apache.xmlbeans.SchemaComponent
ATTRIBUTE, ATTRIBUTE_GROUP, ELEMENT, IDENTITY_CONSTRAINT, MODEL_GROUP, NOTATION, TYPE
 
Method Summary
 int getConstraintCategory()
          Return the constraint category.
 Object getFieldPath(int index)
          Return a compiled xpath object for the field.
 String[] getFields()
          Return (a copy of) the xpaths for all the fields.
 Map getNSMap()
          Return a read-only copy of the namespace map.
 SchemaIdentityConstraint getReferencedKey()
          Returns the key that a key ref refers to.
 String getSelector()
          Return the selector xpath as a string.
 Object getSelectorPath()
          Return a compiled xpath object for the selector.
 
Methods inherited from interface org.apache.xmlbeans.SchemaComponent
getComponentRef, getComponentType, getName, getTypeSystem
 

Field Detail

CC_KEY

public static final int CC_KEY
A xs:key constraint. See getConstraintCategory().

See Also:
Constant Field Values

CC_KEYREF

public static final int CC_KEYREF
A xs:keyRef constraint. See getConstraintCategory().

See Also:
Constant Field Values

CC_UNIQUE

public static final int CC_UNIQUE
A xs:unique constraint. See getConstraintCategory().

See Also:
Constant Field Values
Method Detail

getSelector

public String getSelector()
Return the selector xpath as a string.


getSelectorPath

public Object getSelectorPath()
Return a compiled xpath object for the selector.


getFields

public String[] getFields()
Return (a copy of) the xpaths for all the fields.


getFieldPath

public Object getFieldPath(int index)
Return a compiled xpath object for the field.


getNSMap

public Map getNSMap()
Return a read-only copy of the namespace map. This is the set of prefix to URI mappings that were in scope in the schema at the point at which this constraint was declared


getConstraintCategory

public int getConstraintCategory()
Return the constraint category. Either CC_KEY, CC_KEYREF, or CC_UNIQUE.


getReferencedKey

public SchemaIdentityConstraint getReferencedKey()
Returns the key that a key ref refers to. Only valid for keyrefs.