Top Fields Constructors Methods
com.sun.xml.xsom.impl

public Class ElementDecl

extends DeclarationImpl
implements XSElementDecl, Term
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.impl.Ref.Term, com.sun.xml.xsom.XSElementDecl, com.sun.xml.xsom.XSTerm, com.sun.xml.xsom.XSComponent, com.sun.xml.xsom.XSDeclaration
Imports
com.sun.xml.xsom.XSElementDecl, .XSIdentityConstraint, .XSModelGroup, .XSModelGroupDecl, .XSTerm, .XSType, .XSWildcard, .XmlString, com.sun.xml.xsom.impl.parser.PatcherManager, .SchemaDocumentImpl, com.sun.xml.xsom.visitor.XSFunction, .XSTermFunction, .XSTermFunctionWithParam, .XSTermVisitor, .XSVisitor, org.xml.sax.Locator, java.util.Collections, .HashSet, .List, .Set

Field Summary

Modifier and TypeField and Description
private boolean
private XmlString
private XmlString
private Boolean
private final List<XSIdentityConstraint>
private boolean
private int
private int
private Ref.Element
private Set<XSElementDecl>
substitutables

Set that represents element decls that can substitute this element.

private Set<XSElementDecl>
substitutablesView

Unmodifieable view of substitutables.

private Ref.Type

Constructor Summary

AccessConstructor and Description
public
ElementDecl(PatcherManager reader, SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, String _tns, String _name, boolean _anonymous, XmlString _defv, XmlString _fixedv, boolean _nillable, boolean _abstract, Boolean _form, Ref.Type _type, Ref.Element _substHead, int _substDisallowed, int _substExcluded, List<IdentityConstraintImpl> idConstraints)

Method Summary

Modifier and TypeMethod and Description
protected void
public <T> T
public <T, P> T
apply(XSTermFunctionWithParam<T, P> function, P param)

Implements com.sun.xml.xsom.XSTerm.apply.

public <T> T
apply(XSFunction<T> function)

Implements com.sun.xml.xsom.XSComponent.apply.

Accepts a functor.

public XSElementDecl
public XSModelGroup
public XSModelGroupDecl
public XSWildcard
public boolean
canBeSubstitutedBy(XSElementDecl e)

Implements com.sun.xml.xsom.XSElementDecl.canBeSubstitutedBy.

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

public XmlString
public XmlString
public Boolean
getForm()

Implements com.sun.xml.xsom.XSElementDecl.getForm.

Used for javadoc schema generation

public List<XSIdentityConstraint>
public XSElementDecl
getSubstAffiliation()

Implements com.sun.xml.xsom.XSElementDecl.getSubstAffiliation.

Gets the substitution head of this element, if any.

public Set<? extends XSElementDecl>
getSubstitutables()

Implements com.sun.xml.xsom.XSElementDecl.getSubstitutables.

Returns the element declarations that can substitute this element.

public XSTerm
getTerm()

Implements com.sun.xml.xsom.impl.Ref.Term.getTerm.

Obtains a reference as a term.

public XSType
getType()

Implements com.sun.xml.xsom.XSElementDecl.getType.

Gets the type of this element declaration.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isSubstitutionDisallowed(int method)

Implements com.sun.xml.xsom.XSElementDecl.isSubstitutionDisallowed.

Checks the diallowed substitution property of the schema component.

public boolean
isSubstitutionExcluded(int method)

Implements com.sun.xml.xsom.XSElementDecl.isSubstitutionExcluded.

Checks the substitution excluded property of the schema component.

public boolean
public XSElementDecl[]
listSubstitutables()

Implements com.sun.xml.xsom.XSElementDecl.listSubstitutables.

Deprecated

Returns the element declarations that can substitute this element.

public void
public void
visit(XSVisitor visitor)

Implements com.sun.xml.xsom.XSComponent.visit.

Accepts a visitor.

public void
Inherited from com.sun.xml.xsom.impl.DeclarationImpl:
getNamegetTargetNamespaceisAnonymousisGlobalisLocal

Field Detail

_abstractback to summary
private boolean _abstract
defaultValueback to summary
private XmlString defaultValue
fixedValueback to summary
private XmlString fixedValue
formback to summary
private Boolean form
idConstraintsback to summary
private final List<XSIdentityConstraint> idConstraints
nillableback to summary
private boolean nillable
substDisallowedback to summary
private int substDisallowed
substExcludedback to summary
private int substExcluded
substHeadback to summary
private Ref.Element substHead
substitutablesback to summary
private Set<XSElementDecl> substitutables

Set that represents element decls that can substitute this element.

substitutablesViewback to summary
private Set<XSElementDecl> substitutablesView

Unmodifieable view of substitutables.

typeback to summary
private Ref.Type type

Constructor Detail

ElementDeclback to summary
public ElementDecl(PatcherManager reader, SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, String _tns, String _name, boolean _anonymous, XmlString _defv, XmlString _fixedv, boolean _nillable, boolean _abstract, Boolean _form, Ref.Type _type, Ref.Element _substHead, int _substDisallowed, int _substExcluded, List<IdentityConstraintImpl> idConstraints)

Method Detail

addSubstitutableback to summary
protected void addSubstitutable(ElementDecl decl)
applyback to summary
public <T> T apply(XSTermFunction<T> function)

Implements com.sun.xml.xsom.XSTerm.apply.

Annotations
@Override
applyback to summary
public <T, P> T apply(XSTermFunctionWithParam<T, P> function, P param)

Implements com.sun.xml.xsom.XSTerm.apply.

Annotations
@Override
applyback to summary
public <T> T apply(XSFunction<T> function)

Implements com.sun.xml.xsom.XSComponent.apply.

Doc from com.sun.xml.xsom.XSComponent.apply.

Accepts a functor.

Annotations
@Override
asElementDeclback to summary
public XSElementDecl asElementDecl()

Implements com.sun.xml.xsom.XSTerm.asElementDecl.

Annotations
@Override
asModelGroupback to summary
public XSModelGroup asModelGroup()

Implements com.sun.xml.xsom.XSTerm.asModelGroup.

Annotations
@Override
asModelGroupDeclback to summary
public XSModelGroupDecl asModelGroupDecl()

Implements com.sun.xml.xsom.XSTerm.asModelGroupDecl.

Annotations
@Override
asWildcardback to summary
public XSWildcard asWildcard()

Implements com.sun.xml.xsom.XSTerm.asWildcard.

Annotations
@Override
canBeSubstitutedByback to summary
public boolean canBeSubstitutedBy(XSElementDecl e)

Implements com.sun.xml.xsom.XSElementDecl.canBeSubstitutedBy.

Doc from com.sun.xml.xsom.XSElementDecl.canBeSubstitutedBy.

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

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

Annotations
@Override
getDefaultValueback to summary
public XmlString getDefaultValue()

Implements com.sun.xml.xsom.XSElementDecl.getDefaultValue.

Annotations
@Override
getFixedValueback to summary
public XmlString getFixedValue()

Implements com.sun.xml.xsom.XSElementDecl.getFixedValue.

Annotations
@Override
getFormback to summary
public Boolean getForm()

Implements com.sun.xml.xsom.XSElementDecl.getForm.

Doc from com.sun.xml.xsom.XSElementDecl.getForm.

Used for javadoc schema generation

Annotations
@Override
getIdentityConstraintsback to summary
public List<XSIdentityConstraint> getIdentityConstraints()

Implements com.sun.xml.xsom.XSElementDecl.getIdentityConstraints.

Doc from com.sun.xml.xsom.XSElementDecl.getIdentityConstraints.

Returns all the XSIdentityConstraints in this element decl.

Annotations
@Override
getSubstAffiliationback to summary
public XSElementDecl getSubstAffiliation()

Implements com.sun.xml.xsom.XSElementDecl.getSubstAffiliation.

Doc from com.sun.xml.xsom.XSElementDecl.getSubstAffiliation.

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

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

Implements com.sun.xml.xsom.XSElementDecl.getSubstitutables.

Doc from com.sun.xml.xsom.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.

Annotations
@Override
getTermback to summary
public XSTerm getTerm()

Implements com.sun.xml.xsom.impl.Ref.Term.getTerm.

Doc from com.sun.xml.xsom.impl.Ref.Term.getTerm.

Obtains a reference as a term.

Annotations
@Override
getTypeback to summary
public XSType getType()

Implements com.sun.xml.xsom.XSElementDecl.getType.

Doc from com.sun.xml.xsom.XSElementDecl.getType.

Gets the type of this element declaration.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Implements com.sun.xml.xsom.XSElementDecl.isAbstract.

Annotations
@Override
isElementDeclback to summary
public boolean isElementDecl()

Implements com.sun.xml.xsom.XSTerm.isElementDecl.

Annotations
@Override
isModelGroupback to summary
public boolean isModelGroup()

Implements com.sun.xml.xsom.XSTerm.isModelGroup.

Annotations
@Override
isModelGroupDeclback to summary
public boolean isModelGroupDecl()

Implements com.sun.xml.xsom.XSTerm.isModelGroupDecl.

Annotations
@Override
isNillableback to summary
public boolean isNillable()

Implements com.sun.xml.xsom.XSElementDecl.isNillable.

Annotations
@Override
isSubstitutionDisallowedback to summary
public boolean isSubstitutionDisallowed(int method)

Implements com.sun.xml.xsom.XSElementDecl.isSubstitutionDisallowed.

Doc from com.sun.xml.xsom.XSElementDecl.isSubstitutionDisallowed.

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

Annotations
@Override
isSubstitutionExcludedback to summary
public boolean isSubstitutionExcluded(int method)

Implements com.sun.xml.xsom.XSElementDecl.isSubstitutionExcluded.

Doc from com.sun.xml.xsom.XSElementDecl.isSubstitutionExcluded.

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

Annotations
@Override
isWildcardback to summary
public boolean isWildcard()

Implements com.sun.xml.xsom.XSTerm.isWildcard.

Annotations
@Override
listSubstitutablesback to summary
public XSElementDecl[] listSubstitutables()

Implements com.sun.xml.xsom.XSElementDecl.listSubstitutables.

Doc from com.sun.xml.xsom.XSElementDecl.listSubstitutables.

Deprecated

Returns the element declarations that can substitute this element.

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

Annotations
@Override
@Deprecated
updateSubstitutabilityMapback to summary
public void updateSubstitutabilityMap()
visitback to summary
public void visit(XSVisitor visitor)

Implements com.sun.xml.xsom.XSComponent.visit.

Doc from com.sun.xml.xsom.XSComponent.visit.

Accepts a visitor.

Annotations
@Override
visitback to summary
public void visit(XSTermVisitor visitor)

Implements com.sun.xml.xsom.XSTerm.visit.

Annotations
@Override