-
- All Superinterfaces:
XSComponent
,XSDeclaration
,XSTerm
- All Known Implementing Classes:
ElementDecl
public interface XSElementDecl extends XSDeclaration, XSTerm
Element declaration.- Author:
- Kohsuke Kawaguchi ([email protected])
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
canBeSubstitutedBy(XSElementDecl e)
Returns true if this element declaration can be validly substituted by the given declaration.XmlString
getDefaultValue()
XmlString
getFixedValue()
Boolean
getForm()
Used for javadoc schema generationList<XSIdentityConstraint>
getIdentityConstraints()
Returns all theXSIdentityConstraint
s in this element decl.XSElementDecl
getSubstAffiliation()
Gets the substitution head of this element, if any.Set<? extends XSElementDecl>
getSubstitutables()
Returns the element declarations that can substitute this element.XSType
getType()
Gets the type of this element declaration.boolean
isAbstract()
boolean
isNillable()
boolean
isSubstitutionDisallowed(int method)
Checks the diallowed substitution property of the schema component.boolean
isSubstitutionExcluded(int method)
Checks the substitution excluded property of the schema component.XSElementDecl[]
listSubstitutables()
Deprecated.this method allocates a new array every time, so it could be inefficient when working with a large schema.-
Methods inherited from interface com.sun.xml.xsom.XSComponent
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit
-
Methods inherited from interface com.sun.xml.xsom.XSDeclaration
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
-
Methods inherited from interface com.sun.xml.xsom.XSTerm
apply, apply, asElementDecl, asModelGroup, asModelGroupDecl, asWildcard, isElementDecl, isModelGroup, isModelGroupDecl, isWildcard, visit
-
-
-
-
Method Detail
-
getType
XSType getType()
Gets the type of this element declaration.- Returns:
- always non-null.
-
isNillable
boolean isNillable()
-
getSubstAffiliation
XSElementDecl getSubstAffiliation()
Gets the substitution head of this element, if any. Otherwise null.
-
getIdentityConstraints
List<XSIdentityConstraint> getIdentityConstraints()
Returns all theXSIdentityConstraint
s in this element decl.- Returns:
- never null, but can be empty.
-
isSubstitutionExcluded
boolean isSubstitutionExcluded(int method)
Checks the substitution excluded property of the schema component. IOW, this checks the value of thefinal
attribute (plusfinalDefault
).- Parameters:
method
- Possible values areXSType.EXTENSION
orXSType.RESTRICTION
.
-
isSubstitutionDisallowed
boolean isSubstitutionDisallowed(int method)
Checks the diallowed substitution property of the schema component. IOW, this checks the value of theblock
attribute (plusblockDefault
).- Parameters:
method
- Possible values areXSType.EXTENSION
,XSType.RESTRICTION
, orXSType.SUBSTITUTION
-
isAbstract
boolean isAbstract()
-
listSubstitutables
@Deprecated XSElementDecl[] listSubstitutables()
Deprecated.this method allocates a new array every time, so it could be inefficient when working with a large schema. UsegetSubstitutables()
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:
- nun-null valid array. The return value always contains this element decl itself.
-
getSubstitutables
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:
- nun-null unmodifiable list. The returned list always contains this element decl itself.
-
canBeSubstitutedBy
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);
-
getDefaultValue
XmlString getDefaultValue()
-
getFixedValue
XmlString getFixedValue()
-
getForm
Boolean getForm()
Used for javadoc schema generation- 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.
-
-