Package org.exolab.castor.xml.schema
Class Union
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.XMLType
org.exolab.castor.xml.schema.SimpleType
org.exolab.castor.xml.schema.Union
- All Implemented Interfaces:
Serializable,Referable
A class that represents the XML Schema Union simple-type.
- Version:
- $Revision: 6230 $ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $
- Author:
- Keith Visco
- See Also:
-
Field Summary
Fields inherited from class org.exolab.castor.xml.schema.SimpleType
FINAL_ALL, FINAL_LIST, FINAL_RESTRICTION, FINAL_UNIONFields inherited from class org.exolab.castor.xml.schema.XMLType
NULL_ARGUMENTFields inherited from class org.exolab.castor.xml.schema.Structure
ANNOTATION, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemberType(String typeName) Adds the given SimpleType reference as a member of this Union.voidaddMemberType(SimpleType simpleType) Adds the given SimpleType as a member of this UniongetId()Returns the id for this Union, or null if no id has been set.Returns the annotation which appears local to this Union, or null if no local annotation has been set.Returns an Enumeration of all the SimpleTypes that are members of this Union.shortReturns the type of this Schema StructurevoidSets the id for this Union.voidsetLocalAnnotation(Annotation annotation) Sets an annotation which is local to this Union.voidSets the Schema for this Union.Methods inherited from class org.exolab.castor.xml.schema.SimpleType
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, setTypeCode, validateMethods inherited from class org.exolab.castor.xml.schema.XMLType
getBaseType, getBaseTypeName, getDerivationMethod, getName, getSchema, getType, isAnyType, isComplexType, isSimpleType, setBaseType, setDerivationMethod, setNameMethods inherited from class org.exolab.castor.xml.schema.Annotated
addAnnotation, getAnnotations, removeAnnotation
-
Constructor Details
-
Union
Creates a new Union type.- Parameters:
schema- the Schema for this Union (Cannot be null)- Throws:
SchemaException
-
-
Method Details
-
addMemberType
Adds the given SimpleType reference as a member of this Union. An exception will be thrown during a call to #getMemberTypes if this reference cannot be resolved.- Parameters:
typeName- the name of the SimpleType to add.
-
addMemberType
Adds the given SimpleType as a member of this Union- Parameters:
simpleType- the SimpleType to add to this Union.
-
getId
Returns the id for this Union, or null if no id has been set. -
getLocalAnnotation
Returns the annotation which appears local to this Union, or null if no local annotation has been set.- Returns:
- the annotation which is local to this Union.
-
getMemberTypes
Returns an Enumeration of all the SimpleTypes that are members of this Union.- Returns:
- an Enumeration of all member SimpleTypes.
-
getStructureType
public short getStructureType()Returns the type of this Schema Structure- Overrides:
getStructureTypein classSimpleType- Returns:
- the type of this Schema Structure
-
setSchema
Sets the Schema for this Union. This method overloads the SimpleType#setSchema method to prevent the Schema from being changed. -
setId
Sets the id for this Union. -
setLocalAnnotation
Sets an annotation which is local to this Union.- Parameters:
annotation- the local annotation to set for this Union.
-