Class IdentityConstraint
java.lang.Object
org.apache.xerces.impl.xs.identity.IdentityConstraint
- All Implemented Interfaces:
org.apache.xerces.xs.XSIDCDefinition,org.apache.xerces.xs.XSObject
- Direct Known Subclasses:
KeyRef,UniqueOrKey
public abstract class IdentityConstraint
extends Object
implements org.apache.xerces.xs.XSIDCDefinition
Base class of Schema identity constraint.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: IdentityConstraint.java 699892 2008-09-28 21:08:27Z mrglavas $
- Author:
- Andy Clark, IBM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XSAnnotationImpl[]protected final Stringname of owning elementprotected intField count.protected Field[]Fields.protected final StringIdentity constraint name.protected final Stringtarget namespaceprotected intprotected SelectorSelector.protected shorttypeFields inherited from interface org.apache.xerces.xs.XSIDCDefinition
IC_KEY, IC_KEYREF, IC_UNIQUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIdentityConstraint(String namespace, String identityConstraintName, String elemName) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(XSAnnotationImpl annotation) voidAdds a field.booleanorg.apache.xerces.xs.XSObjectListOptional.short{identity-constraint category} One of key, keyref or unique.getFieldAt(int index) Returns the field at the specified index.intReturns the field count.org.apache.xerces.xs.StringList{fields} A non-empty list of restricted XPath ([XPath]) expressions.Returns the identity constraint name.getName()Thenameof thisXSObjectdepending on theXSObjecttype.The namespace URI of this node, ornullif it is unspecified.org.apache.xerces.xs.XSNamespaceItemA namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornullotherwise.org.apache.xerces.xs.XSIDCDefinition{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.Returns the selector.{selector} A restricted XPath ([XPath]) expressionshortgetType()Get the type of the object, i.e ELEMENT_DECLARATION.voidsetSelector(Selector selector) Sets the selector.toString()Returns a string representation of this object.
-
Field Details
-
type
protected short typetype -
fNamespace
target namespace -
fIdentityConstraintName
Identity constraint name. -
fElementName
name of owning element -
fSelector
Selector. -
fFieldCount
protected int fFieldCountField count. -
fFields
Fields. -
fAnnotations
-
fNumAnnotations
protected int fNumAnnotations
-
-
Constructor Details
-
IdentityConstraint
Default constructor.
-
-
Method Details
-
getIdentityConstraintName
Returns the identity constraint name. -
setSelector
Sets the selector. -
getSelector
Returns the selector. -
addField
Adds a field. -
getFieldCount
public int getFieldCount()Returns the field count. -
getFieldAt
Returns the field at the specified index. -
getElementName
-
toString
Returns a string representation of this object. -
equals
-
getType
public short getType()Get the type of the object, i.e ELEMENT_DECLARATION.- Specified by:
getTypein interfaceorg.apache.xerces.xs.XSObject
-
getName
Thenameof thisXSObjectdepending on theXSObjecttype.- Specified by:
getNamein interfaceorg.apache.xerces.xs.XSObject
-
getNamespace
The namespace URI of this node, ornullif it is unspecified. defines how a namespace URI is attached to schema components.- Specified by:
getNamespacein interfaceorg.apache.xerces.xs.XSObject
-
getCategory
public short getCategory(){identity-constraint category} One of key, keyref or unique.- Specified by:
getCategoryin interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getSelectorStr
{selector} A restricted XPath ([XPath]) expression- Specified by:
getSelectorStrin interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getFieldStrs
public org.apache.xerces.xs.StringList getFieldStrs(){fields} A non-empty list of restricted XPath ([XPath]) expressions.- Specified by:
getFieldStrsin interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getRefKey
public org.apache.xerces.xs.XSIDCDefinition getRefKey(){referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise. An identity-constraint definition with {identity-constraint category} equal to key or unique.- Specified by:
getRefKeyin interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getAnnotations
public org.apache.xerces.xs.XSObjectList getAnnotations()Optional. Annotation.- Specified by:
getAnnotationsin interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getNamespaceItem
public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()Description copied from interface:org.apache.xerces.xs.XSObjectA namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornullotherwise.- Specified by:
getNamespaceItemin interfaceorg.apache.xerces.xs.XSObject- See Also:
-
addAnnotation
-