Package com.sun.xml.xsom.impl
Class ElementDecl
java.lang.Object
com.sun.xml.xsom.impl.ComponentImpl
com.sun.xml.xsom.impl.ElementDecl
- All Implemented Interfaces:
Ref.Term,XSComponent,XSDeclaration,XSElementDecl,XSTerm
-
Field Summary
Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl
ownerDocument -
Constructor Summary
ConstructorsConstructorDescriptionElementDecl(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 TypeMethodDescriptionprotected voidaddSubstitutable(ElementDecl decl) apply(XSFunction function) Accepts a functor.apply(XSTermFunction function) <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) booleanReturns true if this element declaration can be validly substituted by the given declaration.getForm()Used for javadoc schema generationReturns all theXSIdentityConstraints in this element decl.getName()Gets the (local) name of the declaration.Gets the substitution head of this element, if any.Set<? extends XSElementDecl>Returns the element declarations that can substitute this element.Target namespace to which this component belongs.getTerm()Obtains a reference as a term.getType()Gets the type of this element declaration.booleanbooleanDeprecated.booleanfinal booleanisGlobal()Returns true if this declaration is a global declaration.final booleanisLocal()Returns true if this declaration is a local declaration.booleanbooleanbooleanbooleanisSubstitutionDisallowed(int method) Checks the diallowed substitution property of the schema component.booleanisSubstitutionExcluded(int method) Checks the substitution excluded property of the schema component.booleanDeprecated.voidvoidvisit(XSTermVisitor visitor) voidAccepts a visitor.Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sun.xml.xsom.XSComponent
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingleMethods inherited from interface com.sun.xml.xsom.XSDeclaration
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
-
Constructor Details
-
ElementDecl
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 Details
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceXSElementDecl
-
getFixedValue
- Specified by:
getFixedValuein interfaceXSElementDecl
-
isNillable
public boolean isNillable()- Specified by:
isNillablein interfaceXSElementDecl
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfaceXSElementDecl
-
getType
Description copied from interface:XSElementDeclGets the type of this element declaration.- Specified by:
getTypein interfaceXSElementDecl- Returns:
- always non-null.
-
getSubstAffiliation
Description copied from interface:XSElementDeclGets the substitution head of this element, if any. Otherwise null.- Specified by:
getSubstAffiliationin interfaceXSElementDecl
-
isSubstitutionDisallowed
public boolean isSubstitutionDisallowed(int method) Description copied from interface:XSElementDeclChecks the diallowed substitution property of the schema component. IOW, this checks the value of theblockattribute (plusblockDefault).- Specified by:
isSubstitutionDisallowedin interfaceXSElementDecl- Parameters:
method- Possible values areXSType.EXTENSION,XSType.RESTRICTION, orXSType.SUBSTITUTION
-
isSubstitutionExcluded
public boolean isSubstitutionExcluded(int method) Description copied from interface:XSElementDeclChecks the substitution excluded property of the schema component. IOW, this checks the value of thefinalattribute (plusfinalDefault).- Specified by:
isSubstitutionExcludedin interfaceXSElementDecl- Parameters:
method- Possible values areXSType.EXTENSIONorXSType.RESTRICTION.
-
getIdentityConstraints
Description copied from interface:XSElementDeclReturns all theXSIdentityConstraints in this element decl.- Specified by:
getIdentityConstraintsin interfaceXSElementDecl- Returns:
- never null, but can be empty.
-
getForm
Description copied from interface:XSElementDeclUsed for javadoc schema generation- Specified by:
getFormin interfaceXSElementDecl- 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.
-
listSubstitutables
Deprecated.Description copied from interface:XSElementDeclReturns the element declarations that can substitute this element.IOW, this set returns all the element decls that satisfies the "Substitution Group OK" constraint.
- Specified by:
listSubstitutablesin interfaceXSElementDecl- Returns:
- nun-null valid array. The return value always contains this element decl itself.
-
getSubstitutables
Description copied from interface:XSElementDeclReturns 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.
- Specified by:
getSubstitutablesin interfaceXSElementDecl- Returns:
- nun-null unmodifiable list. The returned list always contains this element decl itself.
-
addSubstitutable
-
updateSubstitutabilityMap
public void updateSubstitutabilityMap() -
canBeSubstitutedBy
Description copied from interface:XSElementDeclReturns true if this element declaration can be validly substituted by the given declaration.Just a short cut of
getSubstitutables().contain(e);- Specified by:
canBeSubstitutedByin interfaceXSElementDecl
-
isWildcard
public boolean isWildcard()- Specified by:
isWildcardin interfaceXSTerm
-
isModelGroupDecl
public boolean isModelGroupDecl()- Specified by:
isModelGroupDeclin interfaceXSTerm
-
isModelGroup
public boolean isModelGroup()- Specified by:
isModelGroupin interfaceXSTerm
-
isElementDecl
public boolean isElementDecl()- Specified by:
isElementDeclin interfaceXSTerm
-
asWildcard
- Specified by:
asWildcardin interfaceXSTerm
-
asModelGroupDecl
- Specified by:
asModelGroupDeclin interfaceXSTerm
-
asModelGroup
- Specified by:
asModelGroupin interfaceXSTerm
-
asElementDecl
- Specified by:
asElementDeclin interfaceXSTerm
-
visit
Description copied from interface:XSComponentAccepts a visitor.- Specified by:
visitin interfaceXSComponent
-
visit
-
apply
-
apply
-
apply
Description copied from interface:XSComponentAccepts a functor.- Specified by:
applyin interfaceXSComponent
-
getTerm
Description copied from interface:Ref.TermObtains a reference as a term. -
getName
Description copied from interface:XSDeclarationGets the (local) name of the declaration.- Specified by:
getNamein interfaceXSDeclaration- Returns:
- null if this component is anonymous.
-
getTargetNamespace
Description copied from interface:XSDeclarationTarget namespace to which this component belongs.""is used to represent the default no namespace.- Specified by:
getTargetNamespacein interfaceXSDeclaration
-
isAnonymous
public boolean isAnonymous()Deprecated.- Specified by:
isAnonymousin interfaceXSDeclaration
-
isGlobal
public final boolean isGlobal()Description copied from interface:XSDeclarationReturns true if this declaration is a global declaration. Global declarations are those declaration that can be enumerated through the schema object.- Specified by:
isGlobalin interfaceXSDeclaration
-
isLocal
public final boolean isLocal()Description copied from interface:XSDeclarationReturns true if this declaration is a local declaration. Equivalent of!isGlobal()- Specified by:
isLocalin interfaceXSDeclaration
-