Top Description Methods
com.sun.xml.xsom

public Interface XSElementDecl

extends XSDeclaration, XSTerm
Known Direct Implementers
com.sun.xml.xsom.impl.ElementDecl
Imports
java.util.List, .Set

Element declaration.
Author
Kohsuke Kawaguchi ([email protected])

Method Summary

Modifier and TypeMethod and Description
public boolean
canBeSubstitutedBy(XSElementDecl e)

Returns true if this element declaration can be validly substituted by the given declaration.

public XmlString
public XmlString
public Boolean

Returns:

null if form attribute not present, true if form attribute present and set to qualified, false if form attribute present and set to unqualified.
getForm
()

Used for javadoc schema generation

public List<XSIdentityConstraint>

Returns:

never null, but can be empty.
getIdentityConstraints
()

Returns all the XSIdentityConstraints in this element decl.

public XSElementDecl
getSubstAffiliation()

Gets the substitution head of this element, if any.

public Set<? extends XSElementDecl>

Returns:

nun-null unmodifiable list. The returned list always contains this element decl itself.
getSubstitutables
()

Returns the element declarations that can substitute this element.

public XSType

Returns:

always non-null.
getType
()

Gets the type of this element declaration.

public boolean
public boolean
public boolean
isSubstitutionDisallowed(int
Possible values are XSType#EXTENSION, XSType.RESTRICTION, or XSType.SUBSTITUTION
method
)

Checks the diallowed substitution property of the schema component.

public boolean
isSubstitutionExcluded(int
Possible values are XSType#EXTENSION or XSType.RESTRICTION.
method
)

Checks the substitution excluded property of the schema component.

public XSElementDecl[]

Returns:

nun-null valid array. The return value always contains this element decl itself.
listSubstitutables
()
Deprecated this method allocates a new array every time, so it could be inefficient when working with a large schema.

Returns the element declarations that can substitute this element.

Inherited from com.sun.xml.xsom.XSDeclaration:
getNamegetTargetNamespaceisAnonymousisGlobalisLocal
Inherited from com.sun.xml.xsom.XSTerm:
applyapplyasElementDeclasModelGroupasModelGroupDeclasWildcardisElementDeclisModelGroupisModelGroupDeclisWildcardvisit

Method Detail

canBeSubstitutedByback to summary
public boolean canBeSubstitutedBy(XSElementDecl e)

Returns true if this element declaration can be validly substituted by the given declaration.

Just a short cut of getSubstitutables().contain(e);

getDefaultValueback to summary
public XmlString getDefaultValue()
getFixedValueback to summary
public XmlString getFixedValue()
getFormback to summary
public Boolean getForm()

Used for javadoc schema generation

Returns:Boolean

null if form attribute not present, true if form attribute present and set to qualified, false if form attribute present and set to unqualified.

getIdentityConstraintsback to summary
public List<XSIdentityConstraint> getIdentityConstraints()

Returns all the XSIdentityConstraints in this element decl.

Returns:List<XSIdentityConstraint>

never null, but can be empty.

getSubstAffiliationback to summary
public XSElementDecl getSubstAffiliation()

Gets the substitution head of this element, if any. Otherwise null.

getSubstitutablesback to summary
public Set<? extends XSElementDecl> getSubstitutables()

Returns the element declarations that can substitute this element.

IOW, this set returns all the element decls that satisfies the "Substitution Group OK" constraint.

Note that the above clause does NOT check for abstract elements. So abstract elements may still show up in the returned set.

Returns:Set<? extends XSElementDecl>

nun-null unmodifiable list. The returned list always contains this element decl itself.

getTypeback to summary
public XSType getType()

Gets the type of this element declaration.

Returns:XSType

always non-null.

isAbstractback to summary
public boolean isAbstract()
isNillableback to summary
public boolean isNillable()
isSubstitutionDisallowedback to summary
public boolean isSubstitutionDisallowed(int method)

Checks the diallowed substitution property of the schema component. IOW, this checks the value of the block attribute (plus blockDefault).

Parameters
method:int

Possible values are XSType#EXTENSION, XSType.RESTRICTION, or XSType.SUBSTITUTION

isSubstitutionExcludedback to summary
public boolean isSubstitutionExcluded(int method)

Checks the substitution excluded property of the schema component. IOW, this checks the value of the final attribute (plus finalDefault).

Parameters
method:int

Possible values are XSType#EXTENSION or XSType.RESTRICTION.

listSubstitutablesback to summary
public XSElementDecl[] listSubstitutables()

Deprecated

this method allocates a new array every time, so it could be inefficient when working with a large schema. Use getSubstitutables() instead.

Returns the element declarations that can substitute this element.

IOW, this set returns all the element decls that satisfies the "Substitution Group OK" constraint.

Returns:XSElementDecl[]

nun-null valid array. The return value always contains this element decl itself.

Annotations
@Deprecated