org.apache.xerces.impl.xs.identity

Class IdentityConstraint

Implemented Interfaces:
org.apache.xerces.xs.XSIDCDefinition
Known Direct Subclasses:
KeyRef, UniqueOrKey

public abstract class IdentityConstraint
extends java.lang.Object
implements org.apache.xerces.xs.XSIDCDefinition

Base class of Schema identity constraint.
Version:
$Id: IdentityConstraint.java,v 1.12 2005/06/23 19:16:20 mrglavas Exp $
Author:
Andy Clark, IBM

Field Summary

protected XSAnnotationImpl[]
fAnnotations
protected String
fElementName
name of owning element
protected int
fFieldCount
Field count.
protected Field[]
fFields
Fields.
protected String
fIdentityConstraintName
Identity constraint name.
protected String
fNamespace
target namespace
protected int
fNumAnnotations
protected Selector
fSelector
Selector.
protected short
type
type

Fields inherited from interface org.apache.xerces.xs.XSIDCDefinition

IC_KEY, IC_KEYREF, IC_UNIQUE

Constructor Summary

IdentityConstraint(String namespace, String identityConstraintName, String elemName)
Default constructor.

Method Summary

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.
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.
String
getIdentityConstraintName()
Returns the identity constraint name.
String
getName()
The name of this XSObject depending on the XSObject type.
String
getNamespace()
The namespace URI of this node, or null if it is unspecified.
org.apache.xerces.xs.XSNamespaceItem
getNamespaceItem()
org.apache.xerces.xs.XSIDCDefinition
getRefKey()
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.
Selector
getSelector()
Returns the selector.
String
getSelectorStr()
{selector} A restricted XPath ([XPath]) expression
short
getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
void
setSelector(Selector selector)
Sets the selector.
String
toString()
Returns a string representation of this object.

Field Details

fAnnotations

protected XSAnnotationImpl[] fAnnotations

fElementName

protected String fElementName
name of owning element

fFieldCount

protected int fFieldCount
Field count.

fFields

protected Field[] fFields
Fields.

fIdentityConstraintName

protected String fIdentityConstraintName
Identity constraint name.

fNamespace

protected String fNamespace
target namespace

fNumAnnotations

protected int fNumAnnotations

fSelector

protected Selector fSelector
Selector.

type

protected short type
type

Constructor Details

IdentityConstraint

protected IdentityConstraint(String namespace,
                             String identityConstraintName,
                             String elemName)
Default constructor.

Method Details

addAnnotation

public void addAnnotation(XSAnnotationImpl annotation)

addField

public void addField(Field field)
Adds a field.

equals

public boolean equals(IdentityConstraint id)

getAnnotations

public org.apache.xerces.xs.XSObjectList getAnnotations()
Optional. Annotation.
Specified by:
getAnnotations in interface org.apache.xerces.xs.XSIDCDefinition

getCategory

public short getCategory()
{identity-constraint category} One of key, keyref or unique.
Specified by:
getCategory in interface org.apache.xerces.xs.XSIDCDefinition

getElementName

public String getElementName()

getFieldAt

public Field getFieldAt(int index)
Returns the field at the specified index.

getFieldCount

public int getFieldCount()
Returns the field count.

getFieldStrs

public org.apache.xerces.xs.StringList getFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.
Specified by:
getFieldStrs in interface org.apache.xerces.xs.XSIDCDefinition

getIdentityConstraintName

public String getIdentityConstraintName()
Returns the identity constraint name.

getName

public String getName()
The name of this XSObject depending on the XSObject type.
Specified by:
getName in interface org.apache.xerces.xs.XSObject

getNamespace

public String getNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
Specified by:
getNamespace in interface org.apache.xerces.xs.XSObject

getNamespaceItem

public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()
Specified by:
getNamespaceItem in interface org.apache.xerces.xs.XSObject
See Also:
org.apache.xerces.xs.XSObject.getNamespaceItem()

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 interface org.apache.xerces.xs.XSIDCDefinition

getSelector

public Selector getSelector()
Returns the selector.

getSelectorStr

public String getSelectorStr()
{selector} A restricted XPath ([XPath]) expression
Specified by:
getSelectorStr in interface org.apache.xerces.xs.XSIDCDefinition

getType

public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
Specified by:
getType in interface org.apache.xerces.xs.XSObject

setSelector

public void setSelector(Selector selector)
Sets the selector.

toString

public String toString()
Returns a string representation of this object.

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.