org.apache.xerces.impl.xs

Class XSElementDecl

public class XSElementDecl extends Object implements XSElementDeclaration

The XML representation for an element declaration schema component is an element information item

Version: $Id: XSElementDecl.java,v 1.19 2004/12/07 18:11:27 sandygao Exp $

Author: Elena Litani, IBM Sandy Gao, IBM

UNKNOWN:

Field Summary
XSAnnotationImplfAnnotation
shortfBlock
ValidatedInfofDefault
shortfFinal
StringfName
shortfScope
XSElementDeclfSubGroup
StringfTargetNamespace
XSTypeDefinitionfType
static shortSCOPE_ABSENT
static shortSCOPE_GLOBAL
static shortSCOPE_LOCAL
Method Summary
voidaddIDConstraint(IdentityConstraint idc)
booleanequals(Object o)
whether two decls are the same
booleangetAbstract()
{abstract} A boolean.
ObjectgetActualVC()
shortgetActualVCType()
XSAnnotationgetAnnotation()
Optional.
shortgetConstraintType()
A value constraint: one of default, fixed.
StringgetConstraintValue()
A value constraint: The actual value (with respect to the {type definition})
shortgetDisallowedSubstitutions()
The supplied values for {disallowed substitutions}
XSComplexTypeDefinitiongetEnclosingCTDefinition()
Locally scoped declarations are available for use only within the complex type definition identified by the scope property.
XSNamedMapgetIdentityConstraints()
{identity-constraint definitions} A set of constraint definitions.
IdentityConstraint[]getIDConstraints()
ShortListgetItemValueTypes()
StringgetName()
The name of this XSObject depending on the XSObject type.
StringgetNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
XSNamespaceItemgetNamespaceItem()
booleangetNillable()
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.
shortgetScope()
Optional.
XSElementDeclarationgetSubstitutionGroupAffiliation()
{substitution group affiliation} Optional.
shortgetSubstitutionGroupExclusions()
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.
shortgetType()
Get the type of the object, i.e ELEMENT_DECLARATION.
XSTypeDefinitiongetTypeDefinition()
Either a simple type definition or a complex type definition.
inthashCode()
get the hash code
booleanisDisallowedSubstitution(short disallowed)
Convenience method.
booleanisSubstitutionGroupExclusion(short exclusion)
Convenience method.
voidreset()
Reset current element declaration
voidsetConstraintType(short constraintType)
voidsetIsAbstract()
voidsetIsGlobal()
voidsetIsLocal(XSComplexTypeDecl enclosingCT)
voidsetIsNillable()
StringtoString()

Field Detail

fAnnotation

public XSAnnotationImpl fAnnotation

fBlock

public short fBlock

fDefault

public ValidatedInfo fDefault

fFinal

public short fFinal

fName

public String fName

fScope

public short fScope

fSubGroup

public XSElementDecl fSubGroup

fTargetNamespace

public String fTargetNamespace

fType

public XSTypeDefinition fType

SCOPE_ABSENT

public static final short SCOPE_ABSENT

SCOPE_GLOBAL

public static final short SCOPE_GLOBAL

SCOPE_LOCAL

public static final short SCOPE_LOCAL

Method Detail

addIDConstraint

public void addIDConstraint(IdentityConstraint idc)

equals

public boolean equals(Object o)
whether two decls are the same

getAbstract

public boolean getAbstract()
{abstract} A boolean.

getActualVC

public Object getActualVC()

getActualVCType

public short getActualVCType()

getAnnotation

public XSAnnotation getAnnotation()
Optional. Annotation.

getConstraintType

public short getConstraintType()
A value constraint: one of default, fixed.

getConstraintValue

public String getConstraintValue()
A value constraint: The actual value (with respect to the {type definition})

getDisallowedSubstitutions

public short getDisallowedSubstitutions()
The supplied values for {disallowed substitutions}

Returns: A bit flag representing {substitution, extension, restriction} or NONE.

getEnclosingCTDefinition

public XSComplexTypeDefinition getEnclosingCTDefinition()
Locally scoped declarations are available for use only within the complex type definition identified by the scope property.

getIdentityConstraints

public XSNamedMap getIdentityConstraints()
{identity-constraint definitions} A set of constraint definitions.

getIDConstraints

public IdentityConstraint[] getIDConstraints()

getItemValueTypes

public ShortList getItemValueTypes()

getName

public String getName()
The name of this XSObject depending on the XSObject type.

getNamespace

public String getNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.

getNamespaceItem

public XSNamespaceItem getNamespaceItem()

See Also: org.apache.xerces.xs.XSObject#getNamespaceItem()

getNillable

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.

getScope

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.

getSubstitutionGroupAffiliation

public XSElementDeclaration getSubstitutionGroupAffiliation()
{substitution group affiliation} Optional. A top-level element definition.

getSubstitutionGroupExclusions

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.

Returns: A bit flag representing {extension, restriction} or NONE.

getType

public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.

getTypeDefinition

public XSTypeDefinition getTypeDefinition()
Either a simple type definition or a complex type definition.

hashCode

public int hashCode()
get the hash code

isDisallowedSubstitution

public boolean isDisallowedSubstitution(short disallowed)
Convenience method. Check if disallowed is a disallowed substitution for this element declaration.

Parameters: disallowed Substitution, extension, restriction or none. Represents a block set for the element.

Returns: True if disallowed is a part of the substitution group exclusion subset.

isSubstitutionGroupExclusion

public boolean isSubstitutionGroupExclusion(short exclusion)
Convenience method. Check if exclusion is a substitution group exclusion for this element declaration.

Parameters: exclusion Extension, restriction or none. Represents final set for the element.

Returns: True if exclusion is a part of the substitution group exclusion subset.

reset

public void reset()
Reset current element declaration

setConstraintType

public void setConstraintType(short constraintType)

setIsAbstract

public void setIsAbstract()

setIsGlobal

public void setIsGlobal()

setIsLocal

public void setIsLocal(XSComplexTypeDecl enclosingCT)

setIsNillable

public void setIsNillable()

toString

public String toString()
Copyright © 1999-2005 Apache XML Project. All Rights Reserved.