Class MappingRoot
- java.lang.Object
-
- org.exolab.castor.mapping.xml.MappingRoot
-
- All Implemented Interfaces:
java.io.Serializable
public class MappingRoot extends java.lang.Object implements java.io.SerializableClass MappingRoot.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MappingRoot()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClassMapping(int index, ClassMapping vClassMapping)voidaddClassMapping(ClassMapping vClassMapping)voidaddFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef)voidaddFieldHandlerDef(FieldHandlerDef vFieldHandlerDef)voidaddInclude(int index, Include vInclude)voidaddInclude(Include vInclude)voidaddKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef)voidaddKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef)java.util.Enumeration<? extends ClassMapping>enumerateClassMapping()Method enumerateClassMapping.java.util.Enumeration<? extends FieldHandlerDef>enumerateFieldHandlerDef()Method enumerateFieldHandlerDef.java.util.Enumeration<? extends Include>enumerateInclude()Method enumerateInclude.java.util.Enumeration<? extends KeyGeneratorDef>enumerateKeyGeneratorDef()Method enumerateKeyGeneratorDef.ClassMapping[]getClassMapping()Method getClassMapping.Returns the contents of the collection in an Array.ClassMappinggetClassMapping(int index)Method getClassMapping.intgetClassMappingCount()Method getClassMappingCount.java.lang.StringgetDescription()Returns the value of field 'description'.FieldHandlerDef[]getFieldHandlerDef()Method getFieldHandlerDef.Returns the contents of the collection in an Array.FieldHandlerDefgetFieldHandlerDef(int index)Method getFieldHandlerDef.intgetFieldHandlerDefCount()Method getFieldHandlerDefCount.Include[]getInclude()Method getInclude.Returns the contents of the collection in an Array.IncludegetInclude(int index)Method getInclude.intgetIncludeCount()Method getIncludeCount.KeyGeneratorDef[]getKeyGeneratorDef()Method getKeyGeneratorDef.Returns the contents of the collection in an Array.KeyGeneratorDefgetKeyGeneratorDef(int index)Method getKeyGeneratorDef.intgetKeyGeneratorDefCount()Method getKeyGeneratorDefCount.booleanisValid()Method isValid.java.util.Iterator<? extends ClassMapping>iterateClassMapping()Method iterateClassMapping.java.util.Iterator<? extends FieldHandlerDef>iterateFieldHandlerDef()Method iterateFieldHandlerDef.java.util.Iterator<? extends Include>iterateInclude()Method iterateInclude.java.util.Iterator<? extends KeyGeneratorDef>iterateKeyGeneratorDef()Method iterateKeyGeneratorDef.voidmarshal(java.io.Writer out)voidmarshal(org.xml.sax.ContentHandler handler)voidremoveAllClassMapping()voidremoveAllFieldHandlerDef()voidremoveAllInclude()voidremoveAllKeyGeneratorDef()booleanremoveClassMapping(ClassMapping vClassMapping)Method removeClassMapping.ClassMappingremoveClassMappingAt(int index)Method removeClassMappingAt.booleanremoveFieldHandlerDef(FieldHandlerDef vFieldHandlerDef)Method removeFieldHandlerDef.FieldHandlerDefremoveFieldHandlerDefAt(int index)Method removeFieldHandlerDefAt.booleanremoveInclude(Include vInclude)Method removeInclude.IncluderemoveIncludeAt(int index)Method removeIncludeAt.booleanremoveKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef)Method removeKeyGeneratorDef.KeyGeneratorDefremoveKeyGeneratorDefAt(int index)Method removeKeyGeneratorDefAt.voidsetClassMapping(int index, ClassMapping vClassMapping)voidsetClassMapping(ClassMapping[] vClassMappingArray)voidsetDescription(java.lang.String description)Sets the value of field 'description'.voidsetFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef)voidsetFieldHandlerDef(FieldHandlerDef[] vFieldHandlerDefArray)voidsetInclude(int index, Include vInclude)voidsetInclude(Include[] vIncludeArray)voidsetKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef)voidsetKeyGeneratorDef(KeyGeneratorDef[] vKeyGeneratorDefArray)static MappingRootunmarshal(java.io.Reader reader)Method unmarshal.voidvalidate()
-
-
-
Method Detail
-
addClassMapping
public void addClassMapping(ClassMapping vClassMapping) throws java.lang.IndexOutOfBoundsException
- Parameters:
vClassMapping-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addClassMapping
public void addClassMapping(int index, ClassMapping vClassMapping) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vClassMapping-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addFieldHandlerDef
public void addFieldHandlerDef(FieldHandlerDef vFieldHandlerDef) throws java.lang.IndexOutOfBoundsException
- Parameters:
vFieldHandlerDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addFieldHandlerDef
public void addFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vFieldHandlerDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addInclude
public void addInclude(Include vInclude) throws java.lang.IndexOutOfBoundsException
- Parameters:
vInclude-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addInclude
public void addInclude(int index, Include vInclude) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vInclude-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addKeyGeneratorDef
public void addKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef) throws java.lang.IndexOutOfBoundsException
- Parameters:
vKeyGeneratorDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addKeyGeneratorDef
public void addKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vKeyGeneratorDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateClassMapping
public java.util.Enumeration<? extends ClassMapping> enumerateClassMapping()
Method enumerateClassMapping.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateFieldHandlerDef
public java.util.Enumeration<? extends FieldHandlerDef> enumerateFieldHandlerDef()
Method enumerateFieldHandlerDef.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateInclude
public java.util.Enumeration<? extends Include> enumerateInclude()
Method enumerateInclude.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateKeyGeneratorDef
public java.util.Enumeration<? extends KeyGeneratorDef> enumerateKeyGeneratorDef()
Method enumerateKeyGeneratorDef.- Returns:
- an Enumeration over all possible elements of this collection
-
getClassMapping
public ClassMapping getClassMapping(int index) throws java.lang.IndexOutOfBoundsException
Method getClassMapping.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.ClassMapping at the given index
- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getClassMapping
public ClassMapping[] getClassMapping()
Method getClassMapping.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
-
getClassMappingCount
public int getClassMappingCount()
Method getClassMappingCount.- Returns:
- the size of this collection
-
getDescription
public java.lang.String getDescription()
Returns the value of field 'description'.- Returns:
- the value of field 'Description'.
-
getFieldHandlerDef
public FieldHandlerDef getFieldHandlerDef(int index) throws java.lang.IndexOutOfBoundsException
Method getFieldHandlerDef.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.FieldHandlerDef at the given index
- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getFieldHandlerDef
public FieldHandlerDef[] getFieldHandlerDef()
Method getFieldHandlerDef.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
-
getFieldHandlerDefCount
public int getFieldHandlerDefCount()
Method getFieldHandlerDefCount.- Returns:
- the size of this collection
-
getInclude
public Include getInclude(int index) throws java.lang.IndexOutOfBoundsException
Method getInclude.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.Include at the given index
- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getInclude
public Include[] getInclude()
Method getInclude.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
-
getIncludeCount
public int getIncludeCount()
Method getIncludeCount.- Returns:
- the size of this collection
-
getKeyGeneratorDef
public KeyGeneratorDef getKeyGeneratorDef(int index) throws java.lang.IndexOutOfBoundsException
Method getKeyGeneratorDef.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.KeyGeneratorDef at the given index
- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getKeyGeneratorDef
public KeyGeneratorDef[] getKeyGeneratorDef()
Method getKeyGeneratorDef.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
-
getKeyGeneratorDefCount
public int getKeyGeneratorDefCount()
Method getKeyGeneratorDefCount.- Returns:
- the size of this collection
-
isValid
public boolean isValid()
Method isValid.- Returns:
- true if this object is valid according to the schema
-
iterateClassMapping
public java.util.Iterator<? extends ClassMapping> iterateClassMapping()
Method iterateClassMapping.- Returns:
- an Iterator over all possible elements in this collection
-
iterateFieldHandlerDef
public java.util.Iterator<? extends FieldHandlerDef> iterateFieldHandlerDef()
Method iterateFieldHandlerDef.- Returns:
- an Iterator over all possible elements in this collection
-
iterateInclude
public java.util.Iterator<? extends Include> iterateInclude()
Method iterateInclude.- Returns:
- an Iterator over all possible elements in this collection
-
iterateKeyGeneratorDef
public java.util.Iterator<? extends KeyGeneratorDef> iterateKeyGeneratorDef()
Method iterateKeyGeneratorDef.- 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
-
removeAllClassMapping
public void removeAllClassMapping()
-
removeAllFieldHandlerDef
public void removeAllFieldHandlerDef()
-
removeAllInclude
public void removeAllInclude()
-
removeAllKeyGeneratorDef
public void removeAllKeyGeneratorDef()
-
removeClassMapping
public boolean removeClassMapping(ClassMapping vClassMapping)
Method removeClassMapping.- Parameters:
vClassMapping-- Returns:
- true if the object was removed from the collection.
-
removeClassMappingAt
public ClassMapping removeClassMappingAt(int index)
Method removeClassMappingAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
removeFieldHandlerDef
public boolean removeFieldHandlerDef(FieldHandlerDef vFieldHandlerDef)
Method removeFieldHandlerDef.- Parameters:
vFieldHandlerDef-- Returns:
- true if the object was removed from the collection.
-
removeFieldHandlerDefAt
public FieldHandlerDef removeFieldHandlerDefAt(int index)
Method removeFieldHandlerDefAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
removeInclude
public boolean removeInclude(Include vInclude)
Method removeInclude.- Parameters:
vInclude-- Returns:
- true if the object was removed from the collection.
-
removeIncludeAt
public Include removeIncludeAt(int index)
Method removeIncludeAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
removeKeyGeneratorDef
public boolean removeKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef)
Method removeKeyGeneratorDef.- Parameters:
vKeyGeneratorDef-- Returns:
- true if the object was removed from the collection.
-
removeKeyGeneratorDefAt
public KeyGeneratorDef removeKeyGeneratorDefAt(int index)
Method removeKeyGeneratorDefAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
setClassMapping
public void setClassMapping(int index, ClassMapping vClassMapping) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vClassMapping-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setClassMapping
public void setClassMapping(ClassMapping[] vClassMappingArray)
- Parameters:
vClassMappingArray-
-
setDescription
public void setDescription(java.lang.String description)
Sets the value of field 'description'.- Parameters:
description- the value of field 'description'.
-
setFieldHandlerDef
public void setFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vFieldHandlerDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setFieldHandlerDef
public void setFieldHandlerDef(FieldHandlerDef[] vFieldHandlerDefArray)
- Parameters:
vFieldHandlerDefArray-
-
setInclude
public void setInclude(int index, Include vInclude) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vInclude-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setInclude
public void setInclude(Include[] vIncludeArray)
- Parameters:
vIncludeArray-
-
setKeyGeneratorDef
public void setKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vKeyGeneratorDef-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setKeyGeneratorDef
public void setKeyGeneratorDef(KeyGeneratorDef[] vKeyGeneratorDefArray)
- Parameters:
vKeyGeneratorDefArray-
-
unmarshal
public static MappingRoot unmarshal(java.io.Reader reader) throws MarshalException, ValidationException
Method unmarshal.- Parameters:
reader-- Returns:
- the unmarshaled org.exolab.castor.mapping.xml.MappingRoot
- 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
-
-