Package org.exolab.castor.mapping.xml
Class ClassChoice
java.lang.Object
org.exolab.castor.mapping.xml.ClassChoice
- All Implemented Interfaces:
Serializable
Class ClassChoice.
- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContainer
(int index, Container vContainer) void
addContainer
(Container vContainer) void
addFieldMapping
(int index, FieldMapping vFieldMapping) void
addFieldMapping
(FieldMapping vFieldMapping) Enumeration
<? extends Container> Method enumerateContainer.Enumeration
<? extends FieldMapping> Method enumerateFieldMapping.Method getContainer.Returns the contents of the collection in an Array.getContainer
(int index) Method getContainer.int
Method getContainerCount.Method getFieldMapping.Returns the contents of the collection in an Array.getFieldMapping
(int index) Method getFieldMapping.int
Method getFieldMappingCount.boolean
isValid()
Method isValid.Method iterateContainer.Iterator
<? extends FieldMapping> Method iterateFieldMapping.void
void
marshal
(ContentHandler handler) void
void
boolean
removeContainer
(Container vContainer) Method removeContainer.removeContainerAt
(int index) Method removeContainerAt.boolean
removeFieldMapping
(FieldMapping vFieldMapping) Method removeFieldMapping.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
Method unmarshal.void
validate()
-
Constructor Details
-
ClassChoice
public ClassChoice()
-
-
Method Details
-
addContainer
- Parameters:
vContainer
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addContainer
- Parameters:
index
-vContainer
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addFieldMapping
- Parameters:
vFieldMapping
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addFieldMapping
- Parameters:
index
-vFieldMapping
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateContainer
Method enumerateContainer.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateFieldMapping
Method enumerateFieldMapping.- Returns:
- an Enumeration over all possible elements of this collection
-
getContainer
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
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
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
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
Method iterateContainer.- Returns:
- an Iterator over all possible elements in this collection
-
iterateFieldMapping
Method iterateFieldMapping.- Returns:
- an Iterator over all possible elements in this collection
-
marshal
- 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(ContentHandler handler) throws IOException, MarshalException, ValidationException - Parameters:
handler
-- Throws:
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
Method removeContainer.- Parameters:
vContainer
-- Returns:
- true if the object was removed from the collection.
-
removeContainerAt
Method removeContainerAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
removeFieldMapping
Method removeFieldMapping.- Parameters:
vFieldMapping
-- Returns:
- true if the object was removed from the collection.
-
removeFieldMappingAt
Method removeFieldMappingAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setContainer
- Parameters:
index
-vContainer
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setContainer
- Parameters:
vContainerArray
-
-
setFieldMapping
- Parameters:
index
-vFieldMapping
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setFieldMapping
- Parameters:
vFieldMappingArray
-
-
unmarshal
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
- Throws:
ValidationException
- if this object is an invalid instance according to the schema
-