Class ClassChoice

  • All Implemented Interfaces:
    java.io.Serializable

    public class ClassChoice
    extends java.lang.Object
    implements java.io.Serializable
    Class ClassChoice.
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Constructor Detail

      • ClassChoice

        public ClassChoice()
    • Method Detail

      • addContainer

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

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

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

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

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

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

        public Container getContainer​(int index)
                               throws java.lang.IndexOutOfBoundsException
        Method getContainer.
        Parameters:
        index -
        Returns:
        the value of the org.exolab.castor.mapping.xml.Container at the given index
        Throws:
        java.lang.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 java.lang.IndexOutOfBoundsException
        Method getFieldMapping.
        Parameters:
        index -
        Returns:
        the value of the org.exolab.castor.mapping.xml.FieldMapping at the given index
        Throws:
        java.lang.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 java.util.Iterator<? extends Container> iterateContainer()
        Method iterateContainer.
        Returns:
        an Iterator over all possible elements in this collection
      • iterateFieldMapping

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

        public void marshal​(org.xml.sax.ContentHandler handler)
                     throws java.io.IOException,
                            MarshalException,
                            ValidationException
        Parameters:
        handler -
        Throws:
        java.io.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 java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vContainer -
        Throws:
        java.lang.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 java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vFieldMapping -
        Throws:
        java.lang.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​(java.io.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