Class ClassChoice

java.lang.Object
org.exolab.castor.mapping.xml.ClassChoice
All Implemented Interfaces:
Serializable

public class ClassChoice extends Object implements Serializable
Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • ClassChoice

      public ClassChoice()
  • Method Details

    • addContainer

      public void addContainer(Container vContainer) throws IndexOutOfBoundsException
      Parameters:
      vContainer -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addContainer

      public void addContainer(int index, Container vContainer) throws IndexOutOfBoundsException
      Parameters:
      index -
      vContainer -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addFieldMapping

      public void addFieldMapping(FieldMapping vFieldMapping) throws IndexOutOfBoundsException
      Parameters:
      vFieldMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addFieldMapping

      public void addFieldMapping(int index, FieldMapping vFieldMapping) throws IndexOutOfBoundsException
      Parameters:
      index -
      vFieldMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • enumerateContainer

      public Enumeration<? extends Container> enumerateContainer()
      Method enumerateContainer.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateFieldMapping

      public Enumeration<? extends FieldMapping> enumerateFieldMapping()
      Method enumerateFieldMapping.
      Returns:
      an Enumeration over all possible elements of this collection
    • getContainer

      public Container getContainer(int index) throws IndexOutOfBoundsException
      Method getContainer.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.Container at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getContainer

      public Container[] getContainer()
      Method getContainer.Returns the contents of the collection in an Array.

      Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

      Returns:
      this collection as an Array
    • getContainerCount

      public int getContainerCount()
      Method getContainerCount.
      Returns:
      the size of this collection
    • getFieldMapping

      public FieldMapping getFieldMapping(int index) throws IndexOutOfBoundsException
      Method getFieldMapping.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.FieldMapping at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getFieldMapping

      public FieldMapping[] getFieldMapping()
      Method getFieldMapping.Returns the contents of the collection in an Array.

      Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

      Returns:
      this collection as an Array
    • getFieldMappingCount

      public int getFieldMappingCount()
      Method getFieldMappingCount.
      Returns:
      the size of this collection
    • isValid

      public boolean isValid()
      Method isValid.
      Returns:
      true if this object is valid according to the schema
    • iterateContainer

      public Iterator<? extends Container> iterateContainer()
      Method iterateContainer.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateFieldMapping

      public Iterator<? extends FieldMapping> iterateFieldMapping()
      Method iterateFieldMapping.
      Returns:
      an Iterator over all possible elements in this collection
    • marshal

      public void marshal(Writer out) throws MarshalException, ValidationException
      Parameters:
      out -
      Throws:
      MarshalException - if object is null or if any SAXException is thrown during marshaling
      ValidationException - if this object is an invalid instance according to the schema
    • marshal

      public void marshal(ContentHandler handler) throws IOException, MarshalException, ValidationException
      Parameters:
      handler -
      Throws:
      IOException - if an IOException occurs during marshaling
      ValidationException - if this object is an invalid instance according to the schema
      MarshalException - if object is null or if any SAXException is thrown during marshaling
    • removeAllContainer

      public void removeAllContainer()
    • removeAllFieldMapping

      public void removeAllFieldMapping()
    • removeContainer

      public boolean removeContainer(Container vContainer)
      Method removeContainer.
      Parameters:
      vContainer -
      Returns:
      true if the object was removed from the collection.
    • removeContainerAt

      public Container removeContainerAt(int index)
      Method removeContainerAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • removeFieldMapping

      public boolean removeFieldMapping(FieldMapping vFieldMapping)
      Method removeFieldMapping.
      Parameters:
      vFieldMapping -
      Returns:
      true if the object was removed from the collection.
    • removeFieldMappingAt

      public FieldMapping removeFieldMappingAt(int index)
      Method removeFieldMappingAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • setContainer

      public void setContainer(int index, Container vContainer) throws IndexOutOfBoundsException
      Parameters:
      index -
      vContainer -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setContainer

      public void setContainer(Container[] vContainerArray)
      Parameters:
      vContainerArray -
    • setFieldMapping

      public void setFieldMapping(int index, FieldMapping vFieldMapping) throws IndexOutOfBoundsException
      Parameters:
      index -
      vFieldMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setFieldMapping

      public void setFieldMapping(FieldMapping[] vFieldMappingArray)
      Parameters:
      vFieldMappingArray -
    • unmarshal

      public static ClassChoice unmarshal(Reader reader) throws MarshalException, ValidationException
      Method unmarshal.
      Parameters:
      reader -
      Returns:
      the unmarshaled org.exolab.castor.mapping.xml.ClassChoice
      Throws:
      MarshalException - if object is null or if any SAXException is thrown during marshaling
      ValidationException - if this object is an invalid instance according to the schema
    • validate

      public void validate() throws ValidationException
      Throws:
      ValidationException - if this object is an invalid instance according to the schema