org.apache.xmlbeans.impl.inst2xsd.util
Class Type
java.lang.Object
org.apache.xmlbeans.impl.inst2xsd.util.Type
public class Type
- extends java.lang.Object
- Author:
- Cezar Andrei (cezar.andrei at bea.com) Date: Jul 16, 2004
Constructor Summary |
protected |
Type()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
Type
protected Type()
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 getElements()
addElement
public void addElement(Element element)
setElements
public void setElements(java.util.List elements)
getAttributes
public java.util.List 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 getEnumerationValues()
getEnumerationQNames
public java.util.List 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 class java.lang.Object
addAllEnumerationsFrom
public void addAllEnumerationsFrom(Type from)