|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.commons.schema.walker.XmlSchemaTypeInfo
public final class XmlSchemaTypeInfo
Represents an element's or attribute's type, meaning either a
XmlSchemaBaseSimpleType with facets, a union or list of them, or a
complex type.
Also maintains a QName representing a type the user recognizes. Users
attempting to convert from one schema to another may use this to track which
types in XML Schema map to their own schema types.
| Nested Class Summary | |
|---|---|
static class |
XmlSchemaTypeInfo.Type
What the data in this XmlSchemaTypeInfo represents. |
| Constructor Summary | |
|---|---|
XmlSchemaTypeInfo(boolean isMixed)
Constructs a complex type whose value may or may not be mixed. |
|
XmlSchemaTypeInfo(List<XmlSchemaTypeInfo> unionTypes)
Constructs a union with the set of valid types a value adhering to the union must conform to. |
|
XmlSchemaTypeInfo(List<XmlSchemaTypeInfo> unionTypes,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
Constructs a union with the set of valid types the a value adhering to the union must conform to, along with any constraining facets on the union itself. |
|
XmlSchemaTypeInfo(XmlSchemaBaseSimpleType baseSimpleType)
Constructs an atomic type with the XmlSchemaBaseSimpleType
conforming values must adhere to. |
|
XmlSchemaTypeInfo(XmlSchemaBaseSimpleType baseSimpleType,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
Constructs an atomic type with the XmlSchemaBaseSimpleType
conforming values must adhere to, along with any additional constraining
facets. |
|
XmlSchemaTypeInfo(XmlSchemaTypeInfo listType)
Constructs a new XmlSchemaTypeInfo representing a list of
other XmlSchemaTypeInfos. |
|
XmlSchemaTypeInfo(XmlSchemaTypeInfo listType,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
Constructs a list with facets. |
|
| Method Summary | |
|---|---|
XmlSchemaBaseSimpleType |
getBaseType()
If this represents an atomic type, returns the type. |
List<XmlSchemaTypeInfo> |
getChildTypes()
If this represents a list or a union, returns the set of children types. |
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> |
getFacets()
The set of constraining facets on the value, or null if
none. |
XmlSchemaTypeInfo.Type |
getType()
The type represented by this XmlSchemaTypeInfo. |
QName |
getUserRecognizedType()
The corresponding user-defined type, or null if none. |
boolean |
isMixed()
If this is a complex type, returns whether its value is mixed. |
void |
setUserRecognizedType(QName userRecType)
Sets the user-recognized type. |
String |
toString()
A String representation of this XmlSchemaTypeInfo. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XmlSchemaTypeInfo(XmlSchemaTypeInfo listType)
XmlSchemaTypeInfo representing a list of
other XmlSchemaTypeInfos. Lists are homogeneous, so only one
type is necessary.
Lists may be either of atomic types or unions of atomic types. Lists of lists are not allowed.
listType - The list's type.
public XmlSchemaTypeInfo(XmlSchemaTypeInfo listType,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
XmlSchemaRestriction.Type.LENGTH facet, a
XmlSchemaRestriction.Type.LENGTH_MIN facet, or a
XmlSchemaRestriction.Type.LENGTH_MAX facet (or both
LENGTH_MIN and LENGTH_MAX).
listType - The list type.facets - Constraining facets on the list itself.public XmlSchemaTypeInfo(List<XmlSchemaTypeInfo> unionTypes)
A union may either be of a set of atomic types or a set of list types, but not mixed between the two. A union of list types cannot be a type of a list.
unionTypes - The set of types that a value may adhere to in order to
conform to the union.
public XmlSchemaTypeInfo(List<XmlSchemaTypeInfo> unionTypes,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
unionTypes - The set of types that a value must adhere to.facets - Constraining facets on the union.public XmlSchemaTypeInfo(XmlSchemaBaseSimpleType baseSimpleType)
XmlSchemaBaseSimpleType
conforming values must adhere to.
baseSimpleType - The value type.
public XmlSchemaTypeInfo(XmlSchemaBaseSimpleType baseSimpleType,
HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> facets)
XmlSchemaBaseSimpleType
conforming values must adhere to, along with any additional constraining
facets.
baseSimpleType - The value type.facets - The constraining facets on the value.public XmlSchemaTypeInfo(boolean isMixed)
isMixed - Whether the element is a mixed type.| Method Detail |
|---|
public HashMap<XmlSchemaRestriction.Type,List<XmlSchemaRestriction>> getFacets()
null if
none.
public XmlSchemaBaseSimpleType getBaseType()
XmlSchemaBaseSimpleType.ANYTYPE.
public XmlSchemaTypeInfo.Type getType()
XmlSchemaTypeInfo.
public List<XmlSchemaTypeInfo> getChildTypes()
Otherwise, returns null.
public QName getUserRecognizedType()
null if none.
public boolean isMixed()
false.
public void setUserRecognizedType(QName userRecType)
userRecType - The user-recognized type.public String toString()
String representation of this XmlSchemaTypeInfo.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||