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 String
name of owning elementprotected int
Field count.protected Field[]
Fields.protected final String
Identity constraint name.protected final String
target namespaceprotected int
protected Selector
Selector.protected short
typeFields inherited from interface org.apache.xerces.xs.XSIDCDefinition
IC_KEY, IC_KEYREF, IC_UNIQUE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
IdentityConstraint
(String namespace, String identityConstraintName, String elemName) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(XSAnnotationImpl annotation) void
Adds a field.boolean
org.apache.xerces.xs.XSObjectList
Optional.short
{identity-constraint category} One of key, keyref or unique.getFieldAt
(int index) Returns the field at the specified index.int
Returns the field count.org.apache.xerces.xs.StringList
{fields} A non-empty list of restricted XPath ([XPath]) expressions.Returns the identity constraint name.getName()
Thename
of thisXSObject
depending on theXSObject
type.The namespace URI of this node, ornull
if it is unspecified.org.apache.xerces.xs.XSNamespaceItem
A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornull
otherwise.org.apache.xerces.xs.XSIDCDefinition
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.Returns the selector.{selector} A restricted XPath ([XPath]) expressionshort
getType()
Get the type of the object, i.e ELEMENT_DECLARATION.void
setSelector
(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:
getType
in interfaceorg.apache.xerces.xs.XSObject
-
getName
Thename
of thisXSObject
depending on theXSObject
type.- Specified by:
getName
in interfaceorg.apache.xerces.xs.XSObject
-
getNamespace
The namespace URI of this node, ornull
if it is unspecified. defines how a namespace URI is attached to schema components.- Specified by:
getNamespace
in interfaceorg.apache.xerces.xs.XSObject
-
getCategory
public short getCategory(){identity-constraint category} One of key, keyref or unique.- Specified by:
getCategory
in interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getSelectorStr
{selector} A restricted XPath ([XPath]) expression- Specified by:
getSelectorStr
in 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:
getFieldStrs
in 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:
getRefKey
in interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getAnnotations
public org.apache.xerces.xs.XSObjectList getAnnotations()Optional. Annotation.- Specified by:
getAnnotations
in interfaceorg.apache.xerces.xs.XSIDCDefinition
-
getNamespaceItem
public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()Description copied from interface:org.apache.xerces.xs.XSObject
A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornull
otherwise.- Specified by:
getNamespaceItem
in interfaceorg.apache.xerces.xs.XSObject
- See Also:
-
addAnnotation
-