|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.xsom.impl.ComponentImpl
com.sun.xml.xsom.impl.AttributesHolder
com.sun.xml.xsom.impl.ComplexTypeImpl
public class ComplexTypeImpl
| Field Summary |
|---|
| Fields inherited from class com.sun.xml.xsom.impl.AttributesHolder |
|---|
attGroups, attributes, prohibitedAtts |
| Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl |
|---|
ownerDocument |
| Fields inherited from interface com.sun.xml.xsom.XSType |
|---|
EXTENSION, RESTRICTION, SUBSTITUTION |
| Constructor Summary | |
|---|---|
ComplexTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
Locator _loc,
ForeignAttributesImpl _fa,
String _name,
boolean _anonymous,
boolean _abstract,
int _derivationMethod,
Ref.Type _base,
int _final,
int _block,
boolean _mixed)
|
|
| Method Summary | ||
|---|---|---|
|
apply(XSFunction<T> function)
Accepts a functor. |
|
XSComplexType |
asComplexType()
Casts this object to XSComplexType if possible, otherwise returns null. |
|
XSSimpleType |
asSimpleType()
Casts this object to XSSimpleType if possible, otherwise returns null. |
|
XSAttributeUse |
getAttributeUse(String nsURI,
String localName)
Looks for the attribute use with the specified name from all the attribute uses that are directly/indirectly referenced from this component. |
|
Collection<XSAttributeUse> |
getAttributeUses()
Returns the attribute uses by looking at attribute groups and etc. |
|
XSWildcard |
getAttributeWildcard()
|
|
XSType |
getBaseType()
Returns the base type of this type. |
|
XSContentType |
getContentType()
The content of this complex type. |
|
int |
getDerivationMethod()
|
|
List<XSElementDecl> |
getElementDecls()
Returns a list of element declarations of this type. |
|
XSContentType |
getExplicitContent()
Gets the explicit content of a complex type with a complex content that was derived by extension. |
|
String |
getName()
Gets the (local) name of the declaration. |
|
XSComplexType |
getRedefinedBy()
If this XSComplexType is redefined by another complex type,
return that component. |
|
int |
getRedefinedCount()
Returns the number of complex types that redefine this component. |
|
XSElementDecl |
getScope()
Gets the scope of this complex type. |
|
List<XSComplexType> |
getSubtypes()
Returns a list of direct subtypes of this complex type. |
|
String |
getTargetNamespace()
Target namespace to which this component belongs. |
|
XSComplexType |
getType()
Obtains a reference as a type. |
|
boolean |
isAbstract()
Checks if this complex type is declared as an abstract type. |
|
boolean |
isAnonymous()
Deprecated. |
|
boolean |
isComplexType()
Returns true if this instanceof XSComplexType. |
|
boolean |
isDerivedFrom(XSType t)
Returns true if this type is derived from the specified type. |
|
boolean |
isFinal(int derivationMethod)
|
|
boolean |
isGlobal()
Returns true if this declaration is a global declaration. |
|
boolean |
isLocal()
Returns true if this declaration is a local declaration. |
|
boolean |
isMixed()
|
|
boolean |
isSimpleType()
Returns true if this instanceof XSSimpleType. |
|
boolean |
isSubstitutionProhibited(int method)
Roughly corresponds to the block attribute. |
|
Iterator<XSAttributeUse> |
iterateAttributeUses()
Lists all the attribute uses that are directly/indirectly referenced from this component. |
|
XSType[] |
listSubstitutables()
Lists up types that can substitute this type by using xsi:type. |
|
void |
redefine(ComplexTypeImpl ct)
Called when this complex type redefines the specified complex type. |
|
void |
setContentType(Ref.ContentType v)
|
|
void |
setExplicitContent(XSContentType v)
|
|
void |
setScope(XSElementDecl _scope)
|
|
void |
setWildcard(WildcardImpl wc)
Set the local attribute wildcard. |
|
void |
visit(XSVisitor visitor)
Accepts a visitor. |
|
| Methods inherited from class com.sun.xml.xsom.impl.AttributesHolder |
|---|
addAttGroup, addAttributeUse, addProhibitedAttribute, getAttGroups, getDeclaredAttributeUse, getDeclaredAttributeUses, iterateAttGroups, iterateDeclaredAttributeUses |
| Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl |
|---|
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sun.xml.xsom.XSAttContainer |
|---|
getAttGroups, getDeclaredAttributeUse, getDeclaredAttributeUses, iterateAttGroups, iterateDeclaredAttributeUses |
| Methods inherited from interface com.sun.xml.xsom.XSDeclaration |
|---|
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal |
| Methods inherited from interface com.sun.xml.xsom.XSComponent |
|---|
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle |
| Constructor Detail |
|---|
public ComplexTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
Locator _loc,
ForeignAttributesImpl _fa,
String _name,
boolean _anonymous,
boolean _abstract,
int _derivationMethod,
Ref.Type _base,
int _final,
int _block,
boolean _mixed)
| Method Detail |
|---|
public XSComplexType asComplexType()
XSType
asComplexType in interface XSTypepublic boolean isDerivedFrom(XSType t)
XSTypeNote that t.isDerivedFrom(t) returns true.
isDerivedFrom in interface XSTypepublic XSSimpleType asSimpleType()
XSType
asSimpleType in interface XSTypepublic final boolean isSimpleType()
XSTypethis instanceof XSSimpleType.
isSimpleType in interface XSTypepublic final boolean isComplexType()
XSTypethis instanceof XSComplexType.
isComplexType in interface XSTypepublic int getDerivationMethod()
getDerivationMethod in interface XSTypepublic XSType getBaseType()
XSType
getBaseType in interface XSTypepublic void redefine(ComplexTypeImpl ct)
public XSComplexType getRedefinedBy()
XSComplexTypeXSComplexType is redefined by another complex type,
return that component.
getRedefinedBy in interface XSComplexTypegetRedefinedBy in interface XSTypepublic int getRedefinedCount()
XSTypeFor example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.
getRedefinedCount in interface XSTypepublic XSElementDecl getScope()
XSComplexType
getScope in interface XSComplexTypepublic void setScope(XSElementDecl _scope)
public boolean isAbstract()
XSComplexType
isAbstract in interface XSComplexTypepublic void setWildcard(WildcardImpl wc)
setWildcard in class AttributesHolderpublic XSWildcard getAttributeWildcard()
getAttributeWildcard in interface XSAttContainerpublic boolean isFinal(int derivationMethod)
isFinal in interface XSComplexTypepublic boolean isSubstitutionProhibited(int method)
XSComplexType
isSubstitutionProhibited in interface XSComplexTypepublic void setContentType(Ref.ContentType v)
public XSContentType getContentType()
XSComplexType
getContentType in interface XSComplexTypepublic void setExplicitContent(XSContentType v)
public XSContentType getExplicitContent()
XSComplexTypeInformally, the "explicit content" is the portion of the content model added in this derivation. IOW, it's a delta between the base complex type and this complex type.
For example, when a complex type T2 derives fom T1, then:
content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
getExplicitContent in interface XSComplexTypepublic boolean isMixed()
isMixed in interface XSComplexType
public XSAttributeUse getAttributeUse(String nsURI,
String localName)
XSAttContainerThis is the exact implementation of the "attribute use" schema component.
getAttributeUse in interface XSAttContainerpublic Iterator<XSAttributeUse> iterateAttributeUses()
XSAttContainerThis is the exact implementation of the "attribute use" schema component.
iterateAttributeUses in interface XSAttContaineriterateAttributeUses in class AttributesHolderpublic Collection<XSAttributeUse> getAttributeUses()
AttributesHolderComplexTypeImpl.
getAttributeUses in interface XSAttContainergetAttributeUses in class AttributesHolderpublic XSType[] listSubstitutables()
XSTypeThis method honors the block flag.
listSubstitutables in interface XSTypepublic void visit(XSVisitor visitor)
XSComponent
visit in interface XSComponentpublic <T> T apply(XSFunction<T> function)
XSComponent
apply in interface XSComponentpublic XSComplexType getType()
Ref.Type
getType in interface Ref.ComplexTypegetType in interface Ref.Typepublic List<XSComplexType> getSubtypes()
XSComplexType
getSubtypes in interface XSComplexTypepublic List<XSElementDecl> getElementDecls()
XSComplexType
getElementDecls in interface XSComplexTypepublic String getName()
XSDeclaration
getName in interface XSDeclarationpublic String getTargetNamespace()
XSDeclaration"" is used to represent the default no namespace.
getTargetNamespace in interface XSDeclarationpublic boolean isAnonymous()
isAnonymous in interface XSDeclarationpublic final boolean isGlobal()
XSDeclaration
isGlobal in interface XSDeclarationpublic final boolean isLocal()
XSDeclaration!isGlobal()
isLocal in interface XSDeclaration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||