|
||||||||||
| 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.SimpleTypeImpl
public abstract class SimpleTypeImpl
| 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 | |
|---|---|
Object |
apply(XSContentTypeFunction function)
|
Object |
apply(XSFunction function)
Accepts a functor. |
XSComplexType |
asComplexType()
Casts this object to XSComplexType if possible, otherwise returns null. |
XSContentType |
asEmpty()
If this content type represents the empty content, return this,
otherwise null. |
XSListSimpleType |
asList()
|
XSParticle |
asParticle()
Equivalent of (this instanceof XSParticle)?this:null |
XSRestrictionSimpleType |
asRestriction()
|
XSSimpleType |
asSimpleType()
Casts this object to XSSimpleType if possible, otherwise returns null. |
XSUnionSimpleType |
asUnion()
|
XSListSimpleType |
getBaseListType()
Gets the nearest ancestor XSListSimpleType (including itself)
if the variety of this type is list. |
XSType |
getBaseType()
Returns the base type of this type. |
XSUnionSimpleType |
getBaseUnionType()
Gets the nearest ancestor XSUnionSimpleType (including itself)
if the variety of this type is union. |
XSContentType |
getContentType()
|
int |
getDerivationMethod()
|
String |
getName()
Gets the (local) name of the declaration. |
XSSimpleType |
getRedefinedBy()
If this XSSimpleType is redefined by another simple type,
return that component. |
int |
getRedefinedCount()
Returns the number of complex types that redefine this component. |
XSSimpleType |
getSimpleBaseType()
Gets the base type as XSSimpleType. |
String |
getTargetNamespace()
Target namespace to which this component belongs. |
XSSimpleType |
getType()
Obtains a reference as a 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(XSVariety v)
Returns true if this type definition is marked as 'final' with respect to the given XSVariety. |
boolean |
isGlobal()
Returns true if this declaration is a global declaration. |
boolean |
isList()
Returns true if this instanceof XSListSimpleType. |
boolean |
isLocal()
Returns true if this declaration is a local declaration. |
boolean |
isPrimitive()
Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.) |
boolean |
isRestriction()
Returns true if this instanceof XSRestrictionSimpleType. |
boolean |
isSimpleType()
Returns true if this instanceof XSSimpleType. |
boolean |
isUnion()
Returns true if this instanceof XSUnionSimpleType. |
XSType[] |
listSubstitutables()
Lists up types that can substitute this type by using xsi:type. |
void |
redefine(SimpleTypeImpl st)
|
void |
visit(XSContentTypeVisitor visitor)
|
void |
visit(XSVisitor visitor)
Accepts a visitor. |
| 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.XSSimpleType |
|---|
apply, getFacet, getFacets, getPrimitiveType, getVariety, visit |
| 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 |
| Method Detail |
|---|
public XSType[] listSubstitutables()
XSTypeThis method honors the block flag.
listSubstitutables in interface XSTypepublic void redefine(SimpleTypeImpl st)
public XSSimpleType getRedefinedBy()
XSSimpleTypeXSSimpleType is redefined by another simple type,
return that component.
getRedefinedBy in interface XSSimpleTypegetRedefinedBy 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 XSType getBaseType()
XSType
getBaseType in interface XSTypepublic XSSimpleType getSimpleBaseType()
XSSimpleType
(XSSimpleType)getBaseType()
Since this is a simple type, we know that the base type
is also a simple type.
The only exception is xs:anySimpleType, which has xs:anyType
as the base type.
getSimpleBaseType in interface XSSimpleTypepublic boolean isPrimitive()
XSSimpleType
isPrimitive in interface XSSimpleTypepublic XSListSimpleType getBaseListType()
XSSimpleTypeXSListSimpleType (including itself)
if the variety of this type is list.
getBaseListType in interface XSSimpleTypepublic XSUnionSimpleType getBaseUnionType()
XSSimpleTypeXSUnionSimpleType (including itself)
if the variety of this type is union.
getBaseUnionType in interface XSSimpleTypepublic boolean isFinal(XSVariety v)
XSSimpleTypeXSVariety.
isFinal in interface XSSimpleTypepublic final int getDerivationMethod()
getDerivationMethod in interface XSTypepublic final XSSimpleType asSimpleType()
XSType
asSimpleType in interface XSContentTypeasSimpleType in interface XSTypepublic final XSComplexType asComplexType()
XSType
asComplexType in interface XSTypepublic boolean isDerivedFrom(XSType t)
XSTypeNote that t.isDerivedFrom(t) returns true.
isDerivedFrom in interface XSTypepublic final boolean isSimpleType()
XSTypethis instanceof XSSimpleType.
isSimpleType in interface XSTypepublic final boolean isComplexType()
XSTypethis instanceof XSComplexType.
isComplexType in interface XSTypepublic final XSParticle asParticle()
XSContentType(this instanceof XSParticle)?this:null
asParticle in interface XSContentTypepublic final XSContentType asEmpty()
XSContentTypethis,
otherwise null.
asEmpty in interface XSContentTypepublic boolean isRestriction()
XSSimpleTypethis instanceof XSRestrictionSimpleType.
isRestriction in interface XSSimpleTypepublic boolean isList()
XSSimpleTypethis instanceof XSListSimpleType.
isList in interface XSSimpleTypepublic boolean isUnion()
XSSimpleTypethis instanceof XSUnionSimpleType.
isUnion in interface XSSimpleTypepublic XSRestrictionSimpleType asRestriction()
asRestriction in interface XSSimpleTypepublic XSListSimpleType asList()
asList in interface XSSimpleTypepublic XSUnionSimpleType asUnion()
asUnion in interface XSSimpleTypepublic final void visit(XSVisitor visitor)
XSComponent
visit in interface XSComponentpublic final void visit(XSContentTypeVisitor visitor)
visit in interface XSContentTypepublic final Object apply(XSFunction function)
XSComponent
apply in interface XSComponentpublic final Object apply(XSContentTypeFunction function)
apply in interface XSContentTypepublic XSContentType getContentType()
getContentType in interface Ref.ContentTypepublic XSSimpleType getType()
Ref.Type
getType in interface Ref.SimpleTypegetType in interface Ref.Typepublic 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 | |||||||||