Class Type
- java.lang.Object
-
- org.apache.xmlbeans.impl.inst2xsd.util.Type
-
public class Type extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMPLEX_TYPE_COMPLEX_CONTENT
static int
COMPLEX_TYPE_EMPTY_CONTENT
static int
COMPLEX_TYPE_MIXED_CONTENT
static int
COMPLEX_TYPE_SIMPLE_CONTENT
static int
PARTICLE_CHOICE_UNBOUNDED
static int
PARTICLE_SEQUENCE
static int
SIMPLE_TYPE_SIMPLE_CONTENT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllEnumerationsFrom(Type from)
void
addAttribute(Attribute attribute)
void
addElement(Element element)
void
addEnumerationValue(java.lang.String enumerationValue, XmlCursor xc)
void
closeEnumeration()
static Type
createNamedType(javax.xml.namespace.QName name, int contentType)
static Type
createUnnamedType(int contentType)
Attribute
getAttribute(javax.xml.namespace.QName name)
java.util.List<Attribute>
getAttributes()
int
getContentType()
java.util.List<Element>
getElements()
java.util.List<javax.xml.namespace.QName>
getEnumerationQNames()
java.util.List<java.lang.String>
getEnumerationValues()
Type
getExtensionType()
javax.xml.namespace.QName
getName()
int
getTopParticleForComplexOrMixedContent()
boolean
hasSimpleContent()
boolean
isComplexType()
boolean
isEnumeration()
boolean
isGlobal()
boolean
isQNameEnumeration()
void
setContentType(int kind)
void
setElements(java.util.List<Element> elements)
void
setExtensionType(Type extendedType)
void
setGlobal(boolean isGlobal)
void
setName(javax.xml.namespace.QName name)
void
setTopParticleForComplexOrMixedContent(int topParticleForComplexOrMixedContent)
java.lang.String
toString()
-
-
-
Field Detail
-
SIMPLE_TYPE_SIMPLE_CONTENT
public static final int SIMPLE_TYPE_SIMPLE_CONTENT
- See Also:
- Constant Field Values
-
COMPLEX_TYPE_SIMPLE_CONTENT
public static final int COMPLEX_TYPE_SIMPLE_CONTENT
- See Also:
- Constant Field Values
-
COMPLEX_TYPE_COMPLEX_CONTENT
public static final int COMPLEX_TYPE_COMPLEX_CONTENT
- See Also:
- Constant Field Values
-
COMPLEX_TYPE_MIXED_CONTENT
public static final int COMPLEX_TYPE_MIXED_CONTENT
- See Also:
- Constant Field Values
-
COMPLEX_TYPE_EMPTY_CONTENT
public static final int COMPLEX_TYPE_EMPTY_CONTENT
- See Also:
- Constant Field Values
-
PARTICLE_SEQUENCE
public static final int PARTICLE_SEQUENCE
- See Also:
- Constant Field Values
-
PARTICLE_CHOICE_UNBOUNDED
public static final int PARTICLE_CHOICE_UNBOUNDED
- See Also:
- Constant Field Values
-
-
Method Detail
-
createNamedType
public static Type createNamedType(javax.xml.namespace.QName name, int contentType)
-
createUnnamedType
public static Type createUnnamedType(int contentType)
-
getName
public javax.xml.namespace.QName getName()
-
setName
public void setName(javax.xml.namespace.QName name)
-
getContentType
public int getContentType()
- Returns:
- SIMPLE_TYPE_SIMPLE_CONTENT // ie no atts, no elems, just text COMPLEX_TYPE_SIMPLE_CONTENT // ie atts*, no elems, text* - simple type extension COMPLEX_TYPE_COMPLEX_CONTENT // ie atts*, elems, no text COMPLEX_TYPE_MIXED_CONTENT // ie atts*, elems, text COMPLEX_TYPE_EMPTY_CONTENT // no elems, no text, just atts
-
setContentType
public void setContentType(int kind)
- Parameters:
kind
- 4 kinds: SIMPLE_TYPE_SIMPLE_CONTENT // ie no atts, no elems, just text COMPLEX_TYPE_SIMPLE_CONTENT // ie atts*, no elems, text* - simple type extension COMPLEX_TYPE_COMPLEX_CONTENT // ie atts*, elems, no text COMPLEX_TYPE_MIXED_CONTENT // ie atts*, elems, text COMPLEX_TYPE_EMPTY_CONTENT // no elems, no text, just atts
-
getElements
public java.util.List<Element> getElements()
-
addElement
public void addElement(Element element)
-
setElements
public void setElements(java.util.List<Element> elements)
-
getAttributes
public java.util.List<Attribute> getAttributes()
-
addAttribute
public void addAttribute(Attribute attribute)
-
getAttribute
public Attribute getAttribute(javax.xml.namespace.QName name)
-
isComplexType
public boolean isComplexType()
-
hasSimpleContent
public boolean hasSimpleContent()
-
getTopParticleForComplexOrMixedContent
public int getTopParticleForComplexOrMixedContent()
- Returns:
- PARTICLE_SEQUENCE or PARTICLE_CHOICE_UNBOUNDED
-
setTopParticleForComplexOrMixedContent
public void setTopParticleForComplexOrMixedContent(int topParticleForComplexOrMixedContent)
- Parameters:
topParticleForComplexOrMixedContent
- PARTICLE_SEQUENCE or PARTICLE_CHOICE_UNBOUNDED
-
isGlobal
public boolean isGlobal()
-
setGlobal
public void setGlobal(boolean isGlobal)
-
getExtensionType
public Type getExtensionType()
-
setExtensionType
public void setExtensionType(Type extendedType)
-
getEnumerationValues
public java.util.List<java.lang.String> getEnumerationValues()
-
getEnumerationQNames
public java.util.List<javax.xml.namespace.QName> getEnumerationQNames()
-
addEnumerationValue
public void addEnumerationValue(java.lang.String enumerationValue, XmlCursor xc)
-
isEnumeration
public boolean isEnumeration()
-
isQNameEnumeration
public boolean isQNameEnumeration()
-
closeEnumeration
public void closeEnumeration()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
addAllEnumerationsFrom
public void addAllEnumerationsFrom(Type from)
-
-