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 java.lang.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
Fields Modifier and Type Field Description protected XSAnnotationImpl[]
fAnnotations
protected java.lang.String
fElementName
name of owning elementprotected int
fFieldCount
Field count.protected Field[]
fFields
Fields.protected java.lang.String
fIdentityConstraintName
Identity constraint name.protected java.lang.String
fNamespace
target namespaceprotected int
fNumAnnotations
protected Selector
fSelector
Selector.protected short
type
type
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdentityConstraint(java.lang.String namespace, java.lang.String identityConstraintName, java.lang.String elemName)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(XSAnnotationImpl annotation)
void
addField(Field field)
Adds a field.boolean
equals(IdentityConstraint id)
org.apache.xerces.xs.XSObjectList
getAnnotations()
Optional.short
getCategory()
{identity-constraint category} One of key, keyref or unique.java.lang.String
getElementName()
Field
getFieldAt(int index)
Returns the field at the specified index.int
getFieldCount()
Returns the field count.org.apache.xerces.xs.StringList
getFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.java.lang.String
getIdentityConstraintName()
Returns the identity constraint name.java.lang.String
getName()
Thename
of thisXSObject
depending on theXSObject
type.java.lang.String
getNamespace()
The namespace URI of this node, ornull
if it is unspecified.org.apache.xerces.xs.XSNamespaceItem
getNamespaceItem()
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
getRefKey()
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.Selector
getSelector()
Returns the selector.java.lang.String
getSelectorStr()
{selector} A restricted XPath ([XPath]) expressionshort
getType()
Get the type of the object, i.e ELEMENT_DECLARATION.void
setSelector(Selector selector)
Sets the selector.java.lang.String
toString()
Returns a string representation of this object.
-
-
-
Field Detail
-
type
protected short type
type
-
fNamespace
protected final java.lang.String fNamespace
target namespace
-
fIdentityConstraintName
protected final java.lang.String fIdentityConstraintName
Identity constraint name.
-
fElementName
protected final java.lang.String fElementName
name of owning element
-
fSelector
protected Selector fSelector
Selector.
-
fFieldCount
protected int fFieldCount
Field count.
-
fFields
protected Field[] fFields
Fields.
-
fAnnotations
protected XSAnnotationImpl[] fAnnotations
-
fNumAnnotations
protected int fNumAnnotations
-
-
Method Detail
-
getIdentityConstraintName
public java.lang.String getIdentityConstraintName()
Returns the identity constraint name.
-
setSelector
public void setSelector(Selector selector)
Sets the selector.
-
getSelector
public Selector getSelector()
Returns the selector.
-
addField
public void addField(Field field)
Adds a field.
-
getFieldCount
public int getFieldCount()
Returns the field count.
-
getFieldAt
public Field getFieldAt(int index)
Returns the field at the specified index.
-
getElementName
public java.lang.String getElementName()
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(IdentityConstraint id)
-
getType
public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.- Specified by:
getType
in interfaceorg.apache.xerces.xs.XSObject
-
getName
public java.lang.String getName()
Thename
of thisXSObject
depending on theXSObject
type.- Specified by:
getName
in interfaceorg.apache.xerces.xs.XSObject
-
getNamespace
public java.lang.String 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
public java.lang.String 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:
XSObject.getNamespaceItem()
-
addAnnotation
public void addAnnotation(XSAnnotationImpl annotation)
-
-