org.apache.xerces.impl.xs.identity

Class IdentityConstraint

public abstract class IdentityConstraint extends Object implements 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

UNKNOWN:

Field Summary
protected XSAnnotationImpl[]fAnnotations
protected StringfElementName
name of owning element
protected intfFieldCount
Field count.
protected Field[]fFields
Fields.
protected StringfIdentityConstraintName
Identity constraint name.
protected StringfNamespace
target namespace
protected intfNumAnnotations
protected SelectorfSelector
Selector.
protected shorttype
type
Constructor Summary
protected IdentityConstraint(String namespace, String identityConstraintName, String elemName)
Default constructor.
Method Summary
voidaddAnnotation(XSAnnotationImpl annotation)
voidaddField(Field field)
Adds a field.
booleanequals(IdentityConstraint id)
XSObjectListgetAnnotations()
Optional.
shortgetCategory()
{identity-constraint category} One of key, keyref or unique.
StringgetElementName()
FieldgetFieldAt(int index)
Returns the field at the specified index.
intgetFieldCount()
Returns the field count.
StringListgetFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.
StringgetIdentityConstraintName()
Returns the identity constraint name.
StringgetName()
The name of this XSObject depending on the XSObject type.
StringgetNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
XSNamespaceItemgetNamespaceItem()
XSIDCDefinitiongetRefKey()
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.
SelectorgetSelector()
Returns the selector.
StringgetSelectorStr()
{selector} A restricted XPath ([XPath]) expression
shortgetType()
Get the type of the object, i.e ELEMENT_DECLARATION.
voidsetSelector(Selector selector)
Sets the selector.
StringtoString()
Returns a string representation of this object.

Field Detail

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 Detail

IdentityConstraint

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

Method Detail

addAnnotation

public void addAnnotation(XSAnnotationImpl annotation)

addField

public void addField(Field field)
Adds a field.

equals

public boolean equals(IdentityConstraint id)

getAnnotations

public XSObjectList getAnnotations()
Optional. Annotation.

getCategory

public short getCategory()
{identity-constraint category} One of key, keyref or unique.

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 StringList getFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.

getIdentityConstraintName

public String getIdentityConstraintName()
Returns the identity constraint name.

getName

public String getName()
The name of this XSObject depending on the XSObject type.

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.

getNamespaceItem

public XSNamespaceItem getNamespaceItem()

See Also: org.apache.xerces.xs.XSObject#getNamespaceItem()

getRefKey

public 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.

getSelector

public Selector getSelector()
Returns the selector.

getSelectorStr

public String getSelectorStr()
{selector} A restricted XPath ([XPath]) expression

getType

public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.

setSelector

public void setSelector(Selector selector)
Sets the selector.

toString

public String toString()
Returns a string representation of this object.
Copyright © 1999-2005 Apache XML Project. All Rights Reserved.