|
XSOM 20110809-redhat-3 | |||||||||
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.RestrictionSimpleTypeImpl
public class RestrictionSimpleTypeImpl
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 | |
---|---|
RestrictionSimpleTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
Locator _loc,
ForeignAttributesImpl _fa,
String _name,
boolean _anonymous,
Set<XSVariety> finalSet,
Ref.SimpleType _baseType)
|
Method Summary | |
---|---|
void |
addFacet(XSFacet facet)
|
Object |
apply(XSSimpleTypeFunction function)
|
XSRestrictionSimpleType |
asRestriction()
|
XSFacet |
getDeclaredFacet(String name)
Gets the declared facet object of the given name. |
Collection<? extends XSFacet> |
getDeclaredFacets()
Gets all the facets that are declared on this restriction. |
List<XSFacet> |
getDeclaredFacets(String name)
Gets the declared facets of the given name. |
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. |
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 |
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 . |
Iterator<XSFacet> |
iterateDeclaredFacets()
Iterates facets that are specified in this step of derivation. |
void |
visit(XSSimpleTypeVisitor visitor)
|
Methods inherited from class com.sun.xml.xsom.impl.SimpleTypeImpl |
---|
apply, apply, asComplexType, asEmpty, asList, asParticle, asSimpleType, asUnion, getBaseListType, getBaseType, getBaseUnionType, getContentType, getDerivationMethod, getRedefinedBy, getRedefinedCount, getSimpleBaseType, getType, isComplexType, isDerivedFrom, isFinal, isList, 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.XSSimpleType |
---|
asList, asUnion, getBaseListType, getBaseUnionType, getRedefinedBy, getSimpleBaseType, isFinal, isList, isUnion |
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 RestrictionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _baseType)
Method Detail |
---|
public void addFacet(XSFacet facet)
public Iterator<XSFacet> iterateDeclaredFacets()
XSRestrictionSimpleType
iterateDeclaredFacets
in interface XSRestrictionSimpleType
public Collection<? extends XSFacet> getDeclaredFacets()
XSRestrictionSimpleType
getDeclaredFacets
in interface XSRestrictionSimpleType
public XSFacet getDeclaredFacet(String name)
XSRestrictionSimpleType
This method returns a facet object that is added in this type and does not recursively check the ancestors.
For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one.
getDeclaredFacet
in interface XSRestrictionSimpleType
public List<XSFacet> getDeclaredFacets(String name)
XSRestrictionSimpleType
getDeclaredFacets
in interface XSRestrictionSimpleType
public XSFacet getFacet(String name)
XSSimpleType
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.
getFacet
in interface XSSimpleType
public List<XSFacet> getFacets(String name)
XSSimpleType
getFacets
in interface XSSimpleType
XSSimpleType.getFacet(String)
public XSVariety getVariety()
XSSimpleType
getVariety
in interface XSSimpleType
public XSSimpleType getPrimitiveType()
XSSimpleType
XSSimpleType
if
this type is atomic
.
getPrimitiveType
in interface XSSimpleType
public boolean isPrimitive()
XSSimpleType
isPrimitive
in interface XSSimpleType
isPrimitive
in class SimpleTypeImpl
public void visit(XSSimpleTypeVisitor visitor)
visit
in interface XSSimpleType
public Object apply(XSSimpleTypeFunction function)
apply
in interface XSSimpleType
public boolean isRestriction()
XSSimpleType
this instanceof XSRestrictionSimpleType
.
isRestriction
in interface XSSimpleType
isRestriction
in class SimpleTypeImpl
public XSRestrictionSimpleType asRestriction()
asRestriction
in interface XSSimpleType
asRestriction
in class SimpleTypeImpl
public String getName()
XSDeclaration
getName
in interface XSDeclaration
public String getTargetNamespace()
XSDeclaration
""
is used to represent the default no namespace.
getTargetNamespace
in interface XSDeclaration
public boolean isAnonymous()
isAnonymous
in interface XSDeclaration
public final boolean isGlobal()
XSDeclaration
isGlobal
in interface XSDeclaration
public final boolean isLocal()
XSDeclaration
!isGlobal()
isLocal
in interface XSDeclaration
|
XSOM 20110809-redhat-3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |