public class Union extends SimpleType
FINAL_ALL, FINAL_LIST, FINAL_RESTRICTION, FINAL_UNIONNULL_ARGUMENTANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD| Constructor and Description |
|---|
Union(Schema schema)
Creates a new Union type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMemberType(SimpleType simpleType)
Adds the given SimpleType as a member of this Union
|
void |
addMemberType(String typeName)
Adds the given SimpleType reference as a member of this Union.
|
String |
getId()
Returns the id for this Union, or null if no id has been set.
|
Annotation |
getLocalAnnotation()
Returns the annotation which appears local to this Union, or null if no local annotation has
been set.
|
Enumeration<SimpleType> |
getMemberTypes()
Returns an Enumeration of all the SimpleTypes that are members of this Union.
|
short |
getStructureType()
Returns the type of this Schema Structure
|
void |
setId(String id)
Sets the id for this Union.
|
void |
setLocalAnnotation(Annotation annotation)
Sets an annotation which is local to this Union.
|
void |
setSchema(Schema schema)
Sets the Schema for this Union.
|
addFacet, copyFacets, createReference, getBuiltInBaseType, getEffectiveFacets, getFacet, getFacets, getFacets, getFinal, getLength, getLocalFacets, getMaxLength, getMinLength, getNumberOfFacets, getParent, getReferenceId, getTypeCode, hasFacet, isBuiltInType, isDateTimeType, isNumericType, isRedefined, removeFacet, removeFacet, resolveReference, setFinal, setParent, setRedefined, validategetBaseType, getBaseTypeName, getDerivationMethod, getName, getSchema, isAnyType, isComplexType, isSimpleType, setBaseType, setDerivationMethod, setNameaddAnnotation, getAnnotations, removeAnnotationpublic Union(Schema schema) throws SchemaException
schema - the Schema for this Union (Cannot be null)SchemaExceptionpublic void addMemberType(String typeName)
typeName - the name of the SimpleType to add.public void addMemberType(SimpleType simpleType)
simpleType - the SimpleType to add to this Union.public String getId()
public Annotation getLocalAnnotation()
public Enumeration<SimpleType> getMemberTypes()
public short getStructureType()
getStructureType in class SimpleTypepublic void setSchema(Schema schema)
public void setId(String id)
public void setLocalAnnotation(Annotation annotation)
annotation - the local annotation to set for this Union.Copyright © 2016. All rights reserved.