- java.lang.Object
-
- com.sun.xml.xsom.impl.ComponentImpl
-
- com.sun.xml.xsom.impl.SchemaSetImpl.AnyType
-
- All Implemented Interfaces:
Ref.Type,XSAttContainer,XSComplexType,XSComponent,XSDeclaration,XSType
- Enclosing class:
- SchemaSetImpl
public class SchemaSetImpl.AnyType extends ComponentImpl implements XSComplexType, Ref.Type
-
-
Field Summary
-
Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl
ownerDocument
-
Fields inherited from interface com.sun.xml.xsom.XSType
EXTENSION, RESTRICTION, SUBSTITUTION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> Tapply(XSFunction<T> f)Accepts a functor.XSComplexTypeasComplexType()Casts this object to XSComplexType if possible, otherwise returns null.XSContentTypeasEmpty()XSSimpleTypeasSimpleType()Casts this object to XSSimpleType if possible, otherwise returns null.Collection<? extends XSAttGroupDecl>getAttGroups()Iterates all AttGroups which are directly referenced from this component.XSAttributeUsegetAttributeUse(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()Gets all the attribute uses.XSWildcardgetAttributeWildcard()XSTypegetBaseType()Returns the base type of this type.XSContentTypegetContentType()The content of this complex type.XSAttributeUsegetDeclaredAttributeUse(String nsURI, String localName)Looks for the attribute use with the specified name from the attribute uses which are declared in this complex type.Collection<? extends XSAttributeUse>getDeclaredAttributeUses()Lists all the attribute uses that are declared in this complex type.intgetDerivationMethod()List<XSElementDecl>getElementDecls()Returns a list of element declarations of this type.XSContentTypegetExplicitContent()Gets the explicit content of a complex type with a complex content that was derived by extension.StringgetName()Gets the (local) name of the declaration.SchemaImplgetOwnerSchema()Gets a reference to theXSSchemaobject to which this component belongs.XSComplexTypegetRedefinedBy()If this is redefined by another complex type, return that component.intgetRedefinedCount()Returns the number of complex types that redefine this component.XSElementDeclgetScope()Gets the scope of this complex type.List<XSComplexType>getSubtypes()Returns a list of direct subtypes of this complex type.StringgetTargetNamespace()Target namespace to which this component belongs.XSTypegetType()Obtains a reference as a type.booleanisAbstract()Checks if this complex type is declared as an abstract type.booleanisAnonymous()Deprecated.booleanisComplexType()Returns true ifthis instanceof XSComplexType.booleanisDerivedFrom(XSType t)Returns true if this type is derived from the specified type.booleanisFinal(int i)booleanisGlobal()Returns true if this declaration is a global declaration.booleanisLocal()Returns true if this declaration is a local declaration.booleanisMixed()booleanisSimpleType()Returns true ifthis instanceof XSSimpleType.booleanisSubstitutionProhibited(int i)Roughly corresponds to the block attribute.Iterator<XSAttGroupDecl>iterateAttGroups()Iterates all AttGroups which are directly referenced from this component.Iterator<XSAttributeUse>iterateAttributeUses()Lists all the attribute uses that are directly/indirectly referenced from this component.Iterator<XSAttributeUse>iterateDeclaredAttributeUses()Lists all the attribute uses that are declared in this complex type.XSType[]listSubstitutables()Lists up types that can substitute this type by using xsi:type.voidvisit(XSVisitor visitor)Accepts a visitor.-
Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, 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.XSComponent
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getRoot, getSourceDocument, select, selectSingle
-
Methods inherited from interface com.sun.xml.xsom.XSDeclaration
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
-
-
-
-
Method Detail
-
getOwnerSchema
public SchemaImpl getOwnerSchema()
Description copied from interface:XSComponentGets a reference to theXSSchemaobject to which this component belongs.In case of
XSEmptycomponent, this method returns null since there is no owner component.- Specified by:
getOwnerSchemain interfaceXSComponent- Overrides:
getOwnerSchemain classComponentImpl
-
isAbstract
public boolean isAbstract()
Description copied from interface:XSComplexTypeChecks if this complex type is declared as an abstract type.- Specified by:
isAbstractin interfaceXSComplexType
-
getAttributeWildcard
public XSWildcard getAttributeWildcard()
- Specified by:
getAttributeWildcardin interfaceXSAttContainer
-
getAttributeUse
public XSAttributeUse getAttributeUse(String nsURI, String localName)
Description copied from interface:XSAttContainerLooks for the attribute use with the specified name from all the attribute uses that are directly/indirectly referenced from this component.This is the exact implementation of the "attribute use" schema component.
- Specified by:
getAttributeUsein interfaceXSAttContainer
-
iterateAttributeUses
public Iterator<XSAttributeUse> iterateAttributeUses()
Description copied from interface:XSAttContainerLists all the attribute uses that are directly/indirectly referenced from this component.This is the exact implementation of the "attribute use" schema component.
- Specified by:
iterateAttributeUsesin interfaceXSAttContainer
-
getDeclaredAttributeUse
public XSAttributeUse getDeclaredAttributeUse(String nsURI, String localName)
Description copied from interface:XSAttContainerLooks for the attribute use with the specified name from the attribute uses which are declared in this complex type. This does not include att uses declared in att groups that are referenced from this complex type, nor does include att uses declared in base types.- Specified by:
getDeclaredAttributeUsein interfaceXSAttContainer
-
iterateDeclaredAttributeUses
public Iterator<XSAttributeUse> iterateDeclaredAttributeUses()
Description copied from interface:XSAttContainerLists all the attribute uses that are declared in this complex type.- Specified by:
iterateDeclaredAttributeUsesin interfaceXSAttContainer
-
iterateAttGroups
public Iterator<XSAttGroupDecl> iterateAttGroups()
Description copied from interface:XSAttContainerIterates all AttGroups which are directly referenced from this component.- Specified by:
iterateAttGroupsin interfaceXSAttContainer
-
getAttributeUses
public Collection<XSAttributeUse> getAttributeUses()
Description copied from interface:XSAttContainerGets all the attribute uses.- Specified by:
getAttributeUsesin interfaceXSAttContainer
-
getDeclaredAttributeUses
public Collection<? extends XSAttributeUse> getDeclaredAttributeUses()
Description copied from interface:XSAttContainerLists all the attribute uses that are declared in this complex type.- Specified by:
getDeclaredAttributeUsesin interfaceXSAttContainer
-
getAttGroups
public Collection<? extends XSAttGroupDecl> getAttGroups()
Description copied from interface:XSAttContainerIterates all AttGroups which are directly referenced from this component.- Specified by:
getAttGroupsin interfaceXSAttContainer
-
isFinal
public boolean isFinal(int i)
- Specified by:
isFinalin interfaceXSComplexType
-
isSubstitutionProhibited
public boolean isSubstitutionProhibited(int i)
Description copied from interface:XSComplexTypeRoughly corresponds to the block attribute. But see the spec for gory detail.- Specified by:
isSubstitutionProhibitedin interfaceXSComplexType
-
isMixed
public boolean isMixed()
- Specified by:
isMixedin interfaceXSComplexType
-
getContentType
public XSContentType getContentType()
Description copied from interface:XSComplexTypeThe content of this complex type.- Specified by:
getContentTypein interfaceXSComplexType- Returns:
- always non-null.
-
getExplicitContent
public XSContentType getExplicitContent()
Description copied from interface:XSComplexTypeGets the explicit content of a complex type with a complex content that was derived by extension.Informally, 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 )
- Specified by:
getExplicitContentin interfaceXSComplexType- Returns:
- If this complex type is derived by restriction or has a simple content, this method returns null. IOW, this method only works for a complex type with a complex content derived by extension from another complex type.
-
getBaseType
public XSType getBaseType()
Description copied from interface:XSTypeReturns the base type of this type. Note that if this type representsxs:anyType, this method returns itself. This is awkward as an API, but it follows the schema specification.- Specified by:
getBaseTypein interfaceXSType- Returns:
- always non-null.
-
asSimpleType
public XSSimpleType asSimpleType()
Description copied from interface:XSTypeCasts this object to XSSimpleType if possible, otherwise returns null.- Specified by:
asSimpleTypein interfaceXSType
-
asComplexType
public XSComplexType asComplexType()
Description copied from interface:XSTypeCasts this object to XSComplexType if possible, otherwise returns null.- Specified by:
asComplexTypein interfaceXSType
-
isDerivedFrom
public boolean isDerivedFrom(XSType t)
Description copied from interface:XSTypeReturns true if this type is derived from the specified type.Note that
t.isDerivedFrom(t)returns true.- Specified by:
isDerivedFromin interfaceXSType
-
isSimpleType
public boolean isSimpleType()
Description copied from interface:XSTypeReturns true ifthis instanceof XSSimpleType.- Specified by:
isSimpleTypein interfaceXSType
-
isComplexType
public boolean isComplexType()
Description copied from interface:XSTypeReturns true ifthis instanceof XSComplexType.- Specified by:
isComplexTypein interfaceXSType
-
asEmpty
public XSContentType asEmpty()
-
getDerivationMethod
public int getDerivationMethod()
- Specified by:
getDerivationMethodin interfaceXSType
-
getScope
public XSElementDecl getScope()
Description copied from interface:XSComplexTypeGets the scope of this complex type. This is not a property defined in the schema spec.- Specified by:
getScopein interfaceXSComplexType- Returns:
- null if this complex type is global. Otherwise return the element declaration that contains this anonymous complex type.
-
visit
public void visit(XSVisitor visitor)
Description copied from interface:XSComponentAccepts a visitor.- Specified by:
visitin interfaceXSComponent
-
apply
public <T> T apply(XSFunction<T> f)
Description copied from interface:XSComponentAccepts a functor.- Specified by:
applyin interfaceXSComponent
-
getType
public XSType getType()
Description copied from interface:Ref.TypeObtains a reference as a type.
-
getRedefinedBy
public XSComplexType getRedefinedBy()
Description copied from interface:XSComplexTypeIf this is redefined by another complex type, return that component.- Specified by:
getRedefinedByin interfaceXSComplexType- Specified by:
getRedefinedByin interfaceXSType- Returns:
- null if this component has not been redefined.
-
getRedefinedCount
public int getRedefinedCount()
Description copied from interface:XSTypeReturns the number of complex types that redefine this component.For example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.
- Specified by:
getRedefinedCountin interfaceXSType
-
listSubstitutables
public XSType[] listSubstitutables()
Description copied from interface:XSTypeLists up types that can substitute this type by using xsi:type. Includes this type itself.This method honors the block flag.
- Specified by:
listSubstitutablesin interfaceXSType
-
getSubtypes
public List<XSComplexType> getSubtypes()
Description copied from interface:XSComplexTypeReturns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list. Doesn't return null. Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.- Specified by:
getSubtypesin interfaceXSComplexType
-
getElementDecls
public List<XSElementDecl> getElementDecls()
Description copied from interface:XSComplexTypeReturns a list of element declarations of this type.- Specified by:
getElementDeclsin interfaceXSComplexType
-
getName
public String getName()
Description copied from interface:XSDeclarationGets the (local) name of the declaration.- Specified by:
getNamein interfaceXSDeclaration- Returns:
- null if this component is anonymous.
-
getTargetNamespace
public String 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
@Deprecated 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
-
-