Package com.sun.xml.xsom.impl
Class ListSimpleTypeImpl
java.lang.Object
com.sun.xml.xsom.impl.ComponentImpl
com.sun.xml.xsom.impl.SimpleTypeImpl
com.sun.xml.xsom.impl.ListSimpleTypeImpl
- All Implemented Interfaces:
ContentTypeImpl
,Ref.ContentType
,Ref.SimpleType
,Ref.Type
,XSComponent
,XSContentType
,XSDeclaration
,XSListSimpleType
,XSSimpleType
,XSType
-
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
ConstructorsConstructorDescriptionListSimpleTypeImpl
(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _itemType) -
Method Summary
Modifier and TypeMethodDescription<T> T
apply
(XSSimpleTypeFunction<T> function) asList()
Gets the nearest ancestorXSListSimpleType
(including itself) if the variety of this type islist
.Gets the effective facet object of the given name.For multi-valued facets (enumeration and pattern), obtain all values.getName()
Gets the (local) name of the declaration.Gets the ancestor primitive if this type isatomic
.Target namespace to which this component belongs.Gets the variety of this simple type.boolean
Deprecated.final boolean
isGlobal()
Returns true if this declaration is a global declaration.boolean
isList()
Returns true ifthis instanceof XSListSimpleType
.final boolean
isLocal()
Returns true if this declaration is a local declaration.void
visit
(XSSimpleTypeVisitor visitor) Methods inherited from class com.sun.xml.xsom.impl.SimpleTypeImpl
apply, apply, asComplexType, asEmpty, asParticle, asRestriction, asSimpleType, asUnion, getBaseType, getBaseUnionType, getContentType, getDerivationMethod, getRedefinedBy, getRedefinedCount, getSimpleBaseType, getType, isComplexType, isDerivedFrom, isFinal, isPrimitive, isRestriction, isSimpleType, isUnion, 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.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
Methods inherited from interface com.sun.xml.xsom.XSDeclaration
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
Methods inherited from interface com.sun.xml.xsom.XSSimpleType
asRestriction, asUnion, getBaseUnionType, getRedefinedBy, getSimpleBaseType, isFinal, isPrimitive, isRestriction, isUnion
Methods inherited from interface com.sun.xml.xsom.XSType
asComplexType, asSimpleType, getBaseType, getDerivationMethod, getRedefinedCount, isComplexType, isDerivedFrom, isSimpleType, listSubstitutables
-
Constructor Details
-
ListSimpleTypeImpl
public ListSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _itemType)
-
-
Method Details
-
getItemType
- Specified by:
getItemType
in interfaceXSListSimpleType
-
visit
- Specified by:
visit
in interfaceXSSimpleType
-
apply
- Specified by:
apply
in interfaceXSSimpleType
-
getFacet
Description copied from interface:XSSimpleType
Gets the effective facet object of the given name.For 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.
- Specified by:
getFacet
in interfaceXSSimpleType
- Returns:
- If this datatype has a facet of the given name, return that object. If the facet is not specified anywhere in its derivation chain, null will be returned.
-
getFacets
Description copied from interface:XSSimpleType
For multi-valued facets (enumeration and pattern), obtain all values.- Specified by:
getFacets
in interfaceXSSimpleType
- Returns:
- can be empty but never null.
- See Also:
-
getVariety
Description copied from interface:XSSimpleType
Gets the variety of this simple type.- Specified by:
getVariety
in interfaceXSSimpleType
-
getPrimitiveType
Description copied from interface:XSSimpleType
Gets the ancestor primitive if this type isatomic
.- Specified by:
getPrimitiveType
in interfaceXSSimpleType
- Returns:
- null otherwise.
-
getBaseListType
Description copied from interface:XSSimpleType
Gets the nearest ancestorXSListSimpleType
(including itself) if the variety of this type islist
.- Specified by:
getBaseListType
in interfaceXSSimpleType
- Overrides:
getBaseListType
in classSimpleTypeImpl
- Returns:
- otherwise return null
-
isList
public boolean isList()Description copied from interface:XSSimpleType
Returns true ifthis instanceof XSListSimpleType
.- Specified by:
isList
in interfaceXSSimpleType
- Overrides:
isList
in classSimpleTypeImpl
-
asList
- Specified by:
asList
in interfaceXSSimpleType
- Overrides:
asList
in classSimpleTypeImpl
-
getName
Description copied from interface:XSDeclaration
Gets the (local) name of the declaration.- Specified by:
getName
in interfaceXSDeclaration
- Returns:
- null if this component is anonymous.
-
getTargetNamespace
Description copied from interface:XSDeclaration
Target namespace to which this component belongs.""
is used to represent the default no namespace.- Specified by:
getTargetNamespace
in interfaceXSDeclaration
-
isAnonymous
Deprecated.- Specified by:
isAnonymous
in interfaceXSDeclaration
-
isGlobal
public final boolean isGlobal()Description copied from interface:XSDeclaration
Returns true if this declaration is a global declaration. Global declarations are those declaration that can be enumerated through the schema object.- Specified by:
isGlobal
in interfaceXSDeclaration
-
isLocal
public final boolean isLocal()Description copied from interface:XSDeclaration
Returns true if this declaration is a local declaration. Equivalent of!isGlobal()
- Specified by:
isLocal
in interfaceXSDeclaration
-