org.exolab.castor.xml.schema
Class Union
- Referable, java.io.Serializable
A class that represents the XML Schema Union simple-type.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:35 $
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 |
void | addMemberType(String typeName) - Adds the given SimpleType reference as a member of this
Union.
|
void | addMemberType(SimpleType simpleType) - Adds the given SimpleType 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 | 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 , getFacet , getFacets , getFacets , getFinal , getLength , getLocalFacets , getMaxLength , getMinLength , getParent , getReferenceId , getStructureType , getTypeCode , hasFacet , isBuiltInType , resolveReference , setFinal , setParent , setTypeCode , validate |
getBaseType , getDerivationMethod , getId , getName , getSchema , getType , isAnyType , isComplexType , isSimpleType , setBaseType , setDerivationMethod , setId , setName , setParent , setSchema |
Union
public Union(Schema schema)
throws SchemaException
Creates a new Union type.
schema
- the Schema for this Union (Cannot be null)
addMemberType
public void addMemberType(String typeName)
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.
typeName
- the name of the SimpleType to add.
addMemberType
public void addMemberType(SimpleType simpleType)
Adds the given SimpleType as a member of this Union
simpleType
- the SimpleType to add to this Union.
getId
public String getId()
Returns the id for this Union, or null if no id has been set.
- getId in interface XMLType
- the id for this Union, or null if no id has been set..
getLocalAnnotation
public Annotation getLocalAnnotation()
Returns the annotation which appears local to this Union, or
null if no local annotation has been set.
- the annotation which is local to this Union.
getMemberTypes
public Enumeration getMemberTypes()
Returns an Enumeration of all the SimpleTypes that are members of
this Union.
- an Enumeration of all member SimpleTypes.
getStructureType
public short getStructureType()
Returns the type of this Schema Structure
- getStructureType in interface SimpleType
- the type of this Schema Structure
setId
public void setId(String id)
Sets the id for this Union.
- setId in interface XMLType
id
- the unique id for this Union. Must be globally unique
within the scope of the Schema.
setLocalAnnotation
public void setLocalAnnotation(Annotation annotation)
Sets an annotation which is local to this Union.
annotation
- the local annotation to set for this Union.
setSchema
public void setSchema(Schema schema)
Sets the Schema for this Union. This method overloads the
SimpleType#setSchema method to prevent the Schema from being
changed.
- setSchema in interface XMLType
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com