Methods Summary |
---|
public void | addIDConstraint(org.apache.xerces.impl.xs.identity.IdentityConstraint idc)
if (fIDCPos == fIDConstraints.length) {
fIDConstraints = resize(fIDConstraints, fIDCPos*2);
}
fIDConstraints[fIDCPos++] = idc;
|
public boolean | equals(java.lang.Object o)whether two decls are the same
return o == this;
|
public boolean | getAbstract(){abstract} A boolean.
return ((fMiscFlags & ABSTRACT) != 0);
|
public java.lang.Object | getActualVC()
return getConstraintType() == XSConstants.VC_NONE ?
null :
fDefault.actualValue;
|
public short | getActualVCType()
return getConstraintType() == XSConstants.VC_NONE ?
XSConstants.UNAVAILABLE_DT :
fDefault.actualValueType;
|
public org.apache.xerces.xs.XSAnnotation | getAnnotation()Optional. Annotation.
return (fAnnotations != null) ? (XSAnnotation) fAnnotations.item(0) : null;
|
public org.apache.xerces.xs.XSObjectList | getAnnotations()Optional. Annotations.
return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;
|
public short | getConstraintType()A value constraint: one of default, fixed.
return (short)(fMiscFlags & CONSTRAINT_MASK);
|
public java.lang.String | getConstraintValue()A value constraint: The actual value (with respect to the {type
definition})
// REVISIT: SCAPI: what's the proper representation
return getConstraintType() == XSConstants.VC_NONE ?
null :
fDefault.stringValue();
|
public short | getDisallowedSubstitutions()The supplied values for {disallowed substitutions}
return fBlock;
|
public org.apache.xerces.xs.XSComplexTypeDefinition | getEnclosingCTDefinition()Locally scoped declarations are available for use only within the
complex type definition identified by the scope
property.
return fEnclosingCT;
|
public org.apache.xerces.impl.xs.identity.IdentityConstraint[] | getIDConstraints()
if (fIDCPos == 0) {
return null;
}
if (fIDCPos < fIDConstraints.length) {
fIDConstraints = resize(fIDConstraints, fIDCPos);
}
return fIDConstraints;
|
public org.apache.xerces.xs.XSNamedMap | getIdentityConstraints(){identity-constraint definitions} A set of constraint definitions.
return new XSNamedMapImpl(fIDConstraints, fIDCPos);
|
public org.apache.xerces.xs.ShortList | getItemValueTypes()
return getConstraintType() == XSConstants.VC_NONE ?
null :
fDefault.itemValueTypes;
|
public java.lang.String | getName()The name of this XSObject depending on the
XSObject type.
return fName;
|
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 fTargetNamespace;
|
public org.apache.xerces.xs.XSNamespaceItem | getNamespaceItem()
// REVISIT: implement
return null;
|
public boolean | getNillable()If {nillable} is true, then an element may also be valid if it carries
the namespace qualified attribute with [local name] nil from
namespace http://www.w3.org/2001/XMLSchema-instance and value true
(see xsi:nil (2.6.2)) even if it has no text or element content
despite a {content type} which would otherwise require content.
return ((fMiscFlags & NILLABLE) != 0);
|
public short | getScope()Optional. Either global or a complex type definition (
ctDefinition ). This property is absent in the case of
declarations within named model groups: their scope will be
determined when they are used in the construction of complex type
definitions.
return fScope;
|
public org.apache.xerces.xs.XSElementDeclaration | getSubstitutionGroupAffiliation(){substitution group affiliation} Optional. A top-level element
definition.
return fSubGroup;
|
public short | getSubstitutionGroupExclusions()Specifies if this declaration can be nominated as
the {substitution group affiliation} of other
element declarations having the same {type definition}
or types derived therefrom.
return fFinal;
|
public short | getType()Get the type of the object, i.e ELEMENT_DECLARATION.
return XSConstants.ELEMENT_DECLARATION;
|
public org.apache.xerces.xs.XSTypeDefinition | getTypeDefinition()Either a simple type definition or a complex type definition.
return fType;
|
public int | hashCode()get the hash code
int code = fName.hashCode();
if (fTargetNamespace != null)
code = (code<<16)+fTargetNamespace.hashCode();
return code;
|
public boolean | isDisallowedSubstitution(short disallowed)Convenience method. Check if disallowed is a disallowed
substitution for this element declaration.
return (fBlock & disallowed) != 0;
|
public boolean | isSubstitutionGroupExclusion(short exclusion)Convenience method. Check if exclusion is a substitution
group exclusion for this element declaration.
return (fFinal & exclusion) != 0;
|
public void | reset()Reset current element declaration
fName = null;
fTargetNamespace = null;
fType = null;
fMiscFlags = 0;
fBlock = XSConstants.DERIVATION_NONE;
fFinal = XSConstants.DERIVATION_NONE;
fDefault = null;
fAnnotations = null;
fSubGroup = null;
// reset identity constraints
for (int i=0;i<fIDCPos;i++) {
fIDConstraints[i] = null;
}
fIDCPos = 0;
|
static final org.apache.xerces.impl.xs.identity.IdentityConstraint[] | resize(org.apache.xerces.impl.xs.identity.IdentityConstraint[] oldArray, int newSize)
IdentityConstraint[] newArray = new IdentityConstraint[newSize];
System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
return newArray;
|
public void | setConstraintType(short constraintType)
// methods to get/set misc flag
// first clear the bits
fMiscFlags ^= (fMiscFlags & CONSTRAINT_MASK);
// then set the proper one
fMiscFlags |= (constraintType & CONSTRAINT_MASK);
|
public void | setIsAbstract()
fMiscFlags |= ABSTRACT;
|
public void | setIsGlobal()
fScope = SCOPE_GLOBAL;
|
public void | setIsLocal(XSComplexTypeDecl enclosingCT)
fScope = SCOPE_LOCAL;
fEnclosingCT = enclosingCT;
|
public void | setIsNillable()
fMiscFlags |= NILLABLE;
|
public java.lang.String | toString()
if (fDescription == null) {
if (fTargetNamespace != null) {
StringBuffer buffer = new StringBuffer(
fTargetNamespace.length() +
((fName != null) ? fName.length() : 4) + 3);
buffer.append('"");
buffer.append(fTargetNamespace);
buffer.append('"");
buffer.append(':");
buffer.append(fName);
fDescription = buffer.toString();
}
else {
fDescription = fName;
}
}
return fDescription;
|