|
||||||||||
| 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
com.sun.xml.xsom.impl.UnionSimpleTypeImpl
public class UnionSimpleTypeImpl
| 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 |
| Constructor Summary | |
|---|---|
UnionSimpleTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
Locator _loc,
ForeignAttributesImpl _fa,
String _name,
boolean _anonymous,
Set<XSVariety> finalSet,
Ref.SimpleType[] _members)
|
|
| Method Summary | |
|---|---|
Object |
apply(XSSimpleTypeFunction function)
|
XSUnionSimpleType |
asUnion()
|
XSUnionSimpleType |
getBaseUnionType()
Gets the nearest ancestor XSUnionSimpleType (including itself)
if the variety of this type is union. |
XSFacet |
getFacet(String name)
Gets the effective facet object of the given name. |
List<XSFacet> |
getFacets(String name)
For multi-valued facets (enumeration and pattern), obtain all values. |
XSSimpleType |
getMember(int idx)
|
int |
getMemberSize()
|
String |
getName()
Gets the (local) name of the declaration. |
XSSimpleType |
getPrimitiveType()
Gets the ancestor primitive XSSimpleType if
this type is atomic. |
String |
getTargetNamespace()
Target namespace to which this component belongs. |
XSVariety |
getVariety()
Gets the variety of this simple type. |
boolean |
isAnonymous()
Deprecated. |
boolean |
isGlobal()
Returns true if this declaration is a global declaration. |
boolean |
isLocal()
Returns true if this declaration is a local declaration. |
boolean |
isUnion()
Returns true if this instanceof XSUnionSimpleType. |
Iterator<XSSimpleType> |
iterator()
|
void |
visit(XSSimpleTypeVisitor visitor)
|
| Methods inherited from class com.sun.xml.xsom.impl.SimpleTypeImpl |
|---|
apply, apply, asComplexType, asEmpty, asList, asParticle, asRestriction, asSimpleType, getBaseListType, getBaseType, getContentType, getDerivationMethod, getRedefinedBy, getRedefinedCount, getSimpleBaseType, getType, isComplexType, isDerivedFrom, isFinal, isList, isPrimitive, isRestriction, isSimpleType, listSubstitutables, redefine, visit, visit |
| 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 |
|---|
asList, asRestriction, getBaseListType, getRedefinedBy, getSimpleBaseType, isFinal, isList, isPrimitive, isRestriction |
| Methods inherited from interface com.sun.xml.xsom.XSType |
|---|
asComplexType, asSimpleType, getBaseType, getDerivationMethod, getRedefinedCount, isComplexType, isDerivedFrom, isSimpleType, listSubstitutables |
| Methods inherited from interface com.sun.xml.xsom.XSDeclaration |
|---|
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal |
| Methods inherited from interface com.sun.xml.xsom.XSComponent |
|---|
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit |
| Methods inherited from interface com.sun.xml.xsom.XSContentType |
|---|
apply, asEmpty, asParticle, asSimpleType, visit |
| Constructor Detail |
|---|
public UnionSimpleTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
Locator _loc,
ForeignAttributesImpl _fa,
String _name,
boolean _anonymous,
Set<XSVariety> finalSet,
Ref.SimpleType[] _members)
| Method Detail |
|---|
public XSSimpleType getMember(int idx)
getMember in interface XSUnionSimpleTypepublic int getMemberSize()
getMemberSize in interface XSUnionSimpleTypepublic Iterator<XSSimpleType> iterator()
iterator in interface Iterable<XSSimpleType>public void visit(XSSimpleTypeVisitor visitor)
visit in interface XSSimpleTypepublic Object apply(XSSimpleTypeFunction function)
apply in interface XSSimpleTypepublic XSUnionSimpleType getBaseUnionType()
XSSimpleTypeXSUnionSimpleType (including itself)
if the variety of this type is union.
getBaseUnionType in interface XSSimpleTypegetBaseUnionType in class SimpleTypeImplpublic XSFacet getFacet(String name)
XSSimpleTypeFor example, if a simple type "foo" is derived from xs:string by restriction with the "maxLength" facet and another simple type "bar" is derived from "foo" by restriction with another "maxLength" facet, this method will return the latter one, because that is the most restrictive, effective facet.
For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one. TODO: allow clients to access all of them by some means.
getFacet in interface XSSimpleTypepublic List<XSFacet> getFacets(String name)
XSSimpleType
getFacets in interface XSSimpleTypeXSSimpleType.getFacet(String)public XSVariety getVariety()
XSSimpleType
getVariety in interface XSSimpleTypepublic XSSimpleType getPrimitiveType()
XSSimpleTypeXSSimpleType if
this type is atomic.
getPrimitiveType in interface XSSimpleTypepublic boolean isUnion()
XSSimpleTypethis instanceof XSUnionSimpleType.
isUnion in interface XSSimpleTypeisUnion in class SimpleTypeImplpublic XSUnionSimpleType asUnion()
asUnion in interface XSSimpleTypeasUnion in class SimpleTypeImplpublic 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 | |||||||||