/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Base class of Schema identity constraint.
*
* @xerces.internal
*
* @author Andy Clark, IBM
*/
//
// Data
//
/** type */
protected short type;
/** target namespace */
/** Identity constraint name. */
/** name of owning element */
/** Selector. */
/** Field count. */
protected int fFieldCount;
/** Fields. */
// optional annotations
// number of annotations in this identity constraint
protected int fNumAnnotations;
//
// Constructors
//
/** Default constructor. */
} // <init>(String,String)
//
// Public methods
//
/** Returns the identity constraint name. */
return fIdentityConstraintName;
} // getIdentityConstraintName():String
/** Sets the selector. */
} // setSelector(Selector)
/** Returns the selector. */
return fSelector;
} // getSelector():Selector
/** Adds a field. */
} // addField(Field)
/** Returns the field count. */
public int getFieldCount() {
return fFieldCount;
} // getFieldCount():int
/** Returns the field at the specified index. */
} // getFieldAt(int):Field
// get the name of the owning element
return fElementName;
} // getElementName(): String
//
// Object methods
//
/** Returns a string representation of this object. */
if (index1 != -1) {
}
if (index2 != -1) {
}
return s;
} // toString():String
// equals: returns true if and only if the String
// representations of all members of both objects (except for
// the elenemtName field) are equal.
if(!areEqual) return false;
if(!areEqual) return false;
if(!areEqual) return false;
for(int i=0; i<fFieldCount; i++)
return true;
} // equals
return newArray;
}
/**
* Get the type of the object, i.e ELEMENT_DECLARATION.
*/
public short getType() {
return XSConstants.IDENTITY_CONSTRAINT;
}
/**
* The <code>name</code> of this <code>XSObject</code> depending on the
* <code>XSObject</code> type.
*/
return fIdentityConstraintName;
}
/**
* The namespace URI of this node, or <code>null</code> if it is
* unspecified. defines how a namespace URI is attached to schema
* components.
*/
return fNamespace;
}
/**
* {identity-constraint category} One of key, keyref or unique.
*/
public short getCategory() {
return type;
}
/**
* {selector} A restricted XPath ([XPath]) expression
*/
}
/**
* {fields} A non-empty list of restricted XPath ([XPath]) expressions.
*/
for (int i = 0; i < fFieldCount; i++)
}
/**
* {referenced key} Required if {identity-constraint category} is keyref,
* forbidden otherwise. An identity-constraint definition with
* {identity-constraint category} equal to key or unique.
*/
return null;
}
/**
* Optional. Annotation.
*/
}
/**
* @see com.sun.org.apache.xerces.internal.xs.XSObject#getNamespaceItem()
*/
// REVISIT: implement
return null;
}
if(annotation == null)
return;
if(fAnnotations == null) {
}
}
} // class IdentityConstraint