Class Union

All Implemented Interfaces:
Serializable, Referable

public class Union extends SimpleType
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:
  • Constructor Details

  • Method Details

    • 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.
      Parameters:
      typeName - the name of the SimpleType to add.
    • addMemberType

      public void addMemberType(SimpleType simpleType)
      Adds the given SimpleType as a member of this Union
      Parameters:
      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.
      Overrides:
      getId in class XMLType
      Returns:
      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.
      Returns:
      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.
      Returns:
      an Enumeration of all member SimpleTypes.
    • getStructureType

      public short getStructureType()
      Returns the type of this Schema Structure
      Overrides:
      getStructureType in class SimpleType
      Returns:
      the type of this Schema Structure
    • 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.
      Overrides:
      setSchema in class XMLType
      Parameters:
      schema - the schema that this Union belongs to.
    • setId

      public void setId(String id)
      Sets the id for this Union.
      Overrides:
      setId in class XMLType
      Parameters:
      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.
      Parameters:
      annotation - the local annotation to set for this Union.