Package org.exolab.castor.mapping.xml
Class ClassChoice
- java.lang.Object
-
- org.exolab.castor.mapping.xml.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 Summary
Constructors Constructor Description ClassChoice()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContainer(int index, Container vContainer)
void
addContainer(Container vContainer)
void
addFieldMapping(int index, FieldMapping vFieldMapping)
void
addFieldMapping(FieldMapping vFieldMapping)
java.util.Enumeration<? extends Container>
enumerateContainer()
Method enumerateContainer.java.util.Enumeration<? extends FieldMapping>
enumerateFieldMapping()
Method enumerateFieldMapping.Container[]
getContainer()
Method getContainer.Returns the contents of the collection in an Array.Container
getContainer(int index)
Method getContainer.int
getContainerCount()
Method getContainerCount.FieldMapping[]
getFieldMapping()
Method getFieldMapping.Returns the contents of the collection in an Array.FieldMapping
getFieldMapping(int index)
Method getFieldMapping.int
getFieldMappingCount()
Method getFieldMappingCount.boolean
isValid()
Method isValid.java.util.Iterator<? extends Container>
iterateContainer()
Method iterateContainer.java.util.Iterator<? extends FieldMapping>
iterateFieldMapping()
Method iterateFieldMapping.void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
void
removeAllContainer()
void
removeAllFieldMapping()
boolean
removeContainer(Container vContainer)
Method removeContainer.Container
removeContainerAt(int index)
Method removeContainerAt.boolean
removeFieldMapping(FieldMapping vFieldMapping)
Method removeFieldMapping.FieldMapping
removeFieldMappingAt(int index)
Method removeFieldMappingAt.void
setContainer(int index, Container vContainer)
void
setContainer(Container[] vContainerArray)
void
setFieldMapping(int index, FieldMapping vFieldMapping)
void
setFieldMapping(FieldMapping[] vFieldMappingArray)
static ClassChoice
unmarshal(java.io.Reader reader)
Method unmarshal.void
validate()
-
-
-
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(java.io.Writer out) throws MarshalException, ValidationException
- Parameters:
out
-- Throws:
MarshalException
- if object is null or if any SAXException is thrown during marshalingValidationException
- if this object is an invalid instance according to the schema
-
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 marshalingValidationException
- if this object is an invalid instance according to the schemaMarshalException
- 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 marshalingValidationException
- 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
-
-