org.enhydra.apache.xerces.validators.schema.identity
Class IdentityConstraint

java.lang.Object
  |
  +--org.enhydra.apache.xerces.validators.schema.identity.IdentityConstraint
Direct Known Subclasses:
Key, KeyRef, Unique

public abstract class IdentityConstraint
extends Object

Base class of Schema identity constraint.

Version:
$Id: IdentityConstraint.java,v 1.1.1.1 2003/03/10 16:34:51 taweili Exp $
Author:
Andy Clark, IBM

Field Summary
protected  String fElementName
          Element name.
protected  int fFieldCount
          Field count.
protected  Field[] fFields
          Fields.
protected  String fIdentityConstraintName
          Identity constraint name.
protected  Selector fSelector
          Selector.
static short KEY
          Type: key.
static short KEYREF
          Type: key reference.
static short UNIQUE
          Type: unique.
 
Constructor Summary
protected IdentityConstraint(String identityConstraintName, String elementName)
          Default constructor.
 
Method Summary
 void addField(Field field)
          Adds a field.
 boolean equals(IdentityConstraint id)
           
 String getElementName()
          Returns the element name.
 Field getFieldAt(int index)
          Returns the field at the specified index.
 int getFieldCount()
          Returns the field count.
 String getIdentityConstraintName()
          Returns the identity constraint name.
 Selector getSelector()
          Returns the selector.
abstract  short getType()
          Returns the identity constraint type.
 void setSelector(Selector selector)
          Sets the selector.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIQUE

public static final short UNIQUE
Type: unique.

KEY

public static final short KEY
Type: key.

KEYREF

public static final short KEYREF
Type: key reference.

fIdentityConstraintName

protected String fIdentityConstraintName
Identity constraint name.

fElementName

protected String fElementName
Element name.

fSelector

protected Selector fSelector
Selector.

fFieldCount

protected int fFieldCount
Field count.

fFields

protected Field[] fFields
Fields.
Constructor Detail

IdentityConstraint

protected IdentityConstraint(String identityConstraintName,
                             String elementName)
Default constructor.
Method Detail

getType

public abstract short getType()
Returns the identity constraint type.

getIdentityConstraintName

public String getIdentityConstraintName()
Returns the identity constraint name.

getElementName

public String getElementName()
Returns the element 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.

toString

public String toString()
Returns a string representation of this object.
Overrides:
toString in class Object

equals

public boolean equals(IdentityConstraint id)


Copyright © 1999 The Apache Software Foundation. All Rights reserved.