Methods Summary |
---|
public void | addAnnotation(org.apache.xerces.impl.xs.XSAnnotationImpl annotation)
if(annotation == null)
return;
if(fAnnotations == null) {
fAnnotations = new XSAnnotationImpl[2];
} else if(fNumAnnotations == fAnnotations.length) {
XSAnnotationImpl[] newArray = new XSAnnotationImpl[fNumAnnotations << 1];
System.arraycopy(fAnnotations, 0, newArray, 0, fNumAnnotations);
fAnnotations = newArray;
}
fAnnotations[fNumAnnotations++] = annotation;
|
public void | addField(Field field)Adds a field.
if (fFields == null)
fFields = new Field[4];
else if (fFieldCount == fFields.length)
fFields = resize(fFields, fFieldCount*2);
fFields[fFieldCount++] = field;
|
public boolean | equals(org.apache.xerces.impl.xs.identity.IdentityConstraint id)
boolean areEqual = fIdentityConstraintName.equals(id.fIdentityConstraintName);
if(!areEqual) return false;
areEqual = fSelector.toString().equals(id.fSelector.toString());
if(!areEqual) return false;
areEqual = (fFieldCount == id.fFieldCount);
if(!areEqual) return false;
for(int i=0; i<fFieldCount; i++)
if(!fFields[i].toString().equals(id.fFields[i].toString())) return false;
return true;
|
public org.apache.xerces.xs.XSObjectList | getAnnotations()Optional. Annotation.
return new XSObjectListImpl(fAnnotations, fNumAnnotations);
|
public short | getCategory(){identity-constraint category} One of key, keyref or unique.
return type;
|
public java.lang.String | getElementName()
return fElementName;
|
public Field | getFieldAt(int index)Returns the field at the specified index.
return fFields[index];
|
public int | getFieldCount()Returns the field count.
return fFieldCount;
|
public org.apache.xerces.xs.StringList | getFieldStrs(){fields} A non-empty list of restricted XPath ([XPath]) expressions.
String[] strs = new String[fFieldCount];
for (int i = 0; i < fFieldCount; i++)
strs[i] = fFields[i].toString();
return new StringListImpl(strs, fFieldCount);
|
public java.lang.String | getIdentityConstraintName()Returns the identity constraint name.
return fIdentityConstraintName;
|
public java.lang.String | getName()The name of this XSObject depending on the
XSObject type.
return fIdentityConstraintName;
|
public java.lang.String | getNamespace()The namespace URI of this node, or null if it is
unspecified. defines how a namespace URI is attached to schema
components.
return fNamespace;
|
public org.apache.xerces.xs.XSNamespaceItem | getNamespaceItem()
// REVISIT: implement
return null;
|
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.
return null;
|
public Selector | getSelector()Returns the selector.
return fSelector;
|
public java.lang.String | getSelectorStr(){selector} A restricted XPath ([XPath]) expression
return (fSelector != null) ? fSelector.toString() : null;
|
public short | getType()Get the type of the object, i.e ELEMENT_DECLARATION.
return XSConstants.IDENTITY_CONSTRAINT;
|
static final Field[] | resize(Field[] oldArray, int newSize)
Field[] newArray = new Field[newSize];
System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
return newArray;
|
public void | setSelector(Selector selector)Sets the selector.
fSelector = selector;
|
public java.lang.String | toString()Returns a string representation of this object.
String s = super.toString();
int index1 = s.lastIndexOf('$");
if (index1 != -1) {
return s.substring(index1 + 1);
}
int index2 = s.lastIndexOf('.");
if (index2 != -1) {
return s.substring(index2 + 1);
}
return s;
|