/*
* 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.
*/
/**
* The XML representation for an element declaration
* schema component is an <element> element information item
*
* @xerces.internal
*
* @author Elena Litani, IBM
* @author Sandy Gao, IBM
* @version $Id: XSElementDecl.java,v 1.7 2010-11-01 04:39:55 joehw Exp $
*/
// scopes
// name of the element
// target namespace of the element
// type of the element
// enclosing complex type, when the scope is local
// block set (disallowed substitutions) of the element
// final set (substitution group exclusions) of the element
// optional annotation
// value constraint value
// the substitution group affiliation of the element
// identity constraints
// The namespace schema information item corresponding to the target namespace
// of the element declaration, if it is globally declared; or null otherwise.
// first clear the bits
// then set the proper one
}
public void setIsNillable() {
fMiscFlags |= NILLABLE;
}
public void setIsAbstract() {
fMiscFlags |= ABSTRACT;
}
public void setIsGlobal() {
}
}
}
}
if (fIDCPos == 0) {
return null;
}
}
return fIDConstraints;
}
return newArray;
}
/**
* get the string description of this element
*/
if (fDescription == null) {
if (fTargetNamespace != null) {
}
else {
}
}
return fDescription;
}
/**
* get the hash code
*/
public int hashCode() {
if (fTargetNamespace != null)
return code;
}
/**
* whether two decls are the same
*/
return o == this;
}
/**
* Reset current element declaration
*/
public void reset(){
fMiscFlags = 0;
fAnnotations = null;
// reset identity constraints
for (int i=0;i<fIDCPos;i++) {
fIDConstraints[i] = null;
}
fIDCPos = 0;
}
/**
* Get the type of the object, i.e ELEMENT_DECLARATION.
*/
public short getType() {
return XSConstants.ELEMENT_DECLARATION;
}
/**
* The <code>name</code> of this <code>XSObject</code> depending on the
* <code>XSObject</code> type.
*/
return fName;
}
/**
* 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 fTargetNamespace;
}
/**
* Either a simple type definition or a complex type definition.
*/
return fType;
}
/**
* Optional. Either global or a complex type definition (
* <code>ctDefinition</code>). 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.
*/
public short getScope() {
return fScope;
}
/**
* Locally scoped declarations are available for use only within the
* complex type definition identified by the <code>scope</code>
* property.
*/
return fEnclosingCT;
}
/**
* A value constraint: one of default, fixed.
*/
public short getConstraintType() {
return (short)(fMiscFlags & CONSTRAINT_MASK);
}
/**
* A value constraint: The actual value (with respect to the {type
* definition})
*/
// REVISIT: SCAPI: what's the proper representation
null :
}
/**
* 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.
*/
public boolean getNillable() {
}
/**
* {identity-constraint definitions} A set of constraint definitions.
*/
}
/**
* {substitution group affiliation} Optional. A top-level element
* definition.
*/
return fSubGroup;
}
/**
* Convenience method. Check if <code>exclusion</code> is a substitution
* group exclusion for this element declaration.
* @param exclusion Extension, restriction or none. Represents final
* set for the element.
* @return True if <code>exclusion</code> is a part of the substitution
* group exclusion subset.
*/
}
/**
* 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 A bit flag representing {extension, restriction} or NONE.
*/
public short getSubstitutionGroupExclusions() {
return fFinal;
}
/**
* Convenience method. Check if <code>disallowed</code> is a disallowed
* substitution for this element declaration.
* @param disallowed Substitution, extension, restriction or none.
* Represents a block set for the element.
* @return True if <code>disallowed</code> is a part of the substitution
* group exclusion subset.
*/
}
/**
* The supplied values for {disallowed substitutions}
*
* @return A bit flag representing {substitution, extension, restriction} or NONE.
*/
public short getDisallowedSubstitutions() {
return fBlock;
}
/**
* {abstract} A boolean.
*/
public boolean getAbstract() {
}
/**
* Optional. Annotation.
*/
}
/**
* Optional. Annotations.
*/
}
/**
* @see org.apache.xerces.xs.XSObject#getNamespaceItem()
*/
return fNamespaceItem;
}
}
null :
}
public short getActualVCType() {
}
null :
}
} // class XSElementDecl