Class XmlDescriptions
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlDescriptions
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlDescriptions extends java.lang.Object implements java.io.SerializableXML mapping class for the 'descriptions' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlDescriptions()Default constructor.
-
Method Summary
Modifier and Type Method Description voidaddDescription(int index, XmlDescription description)voidaddDescription(XmlDescription description)java.util.Iterator<? extends XmlDescription>enumerateDescription()Return anIteratorof allXmlDescription.XmlDescription[]getDescription()Returns the contents of the collection in an Array.XmlDescriptiongetDescription(int index)Return theXmlDescriptionat the specified position in theList.intgetDescriptionCount()Return the number of theXmlDescription.voidremoveAllDescription()Remove allXmlDescriptionin theList.booleanremoveDescription(XmlDescription description)Remove a specifiedXmlDescription.XmlDescriptionremoveDescriptionAt(int index)Remove aXmlDescriptionat the specified position.voidsetDescription(int index, XmlDescription description)Set theXmlDescriptionat the specified position of theList.voidsetDescription(XmlDescription[] descriptionArray)Set a allXmlDescriptionto theList.
-
-
-
Method Detail
-
addDescription
public void addDescription(XmlDescription description) throws java.lang.IndexOutOfBoundsException
- Parameters:
description- theXmlDescriptionto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection.
-
addDescription
public void addDescription(int index, XmlDescription description) throws java.lang.IndexOutOfBoundsException- Parameters:
index- the position to insert theXmlDescription.description- theXmlDescriptionto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateDescription
public java.util.Iterator<? extends XmlDescription> enumerateDescription()
Return anIteratorof allXmlDescription.- Returns:
- an Iterator over all
XmlDescriptionelements.
-
getDescription
public XmlDescription getDescription(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlDescriptionat the specified position in theList.- Parameters:
index- the position of the searchedXmlDescription.- Returns:
- the value of the
XmlDescriptionat the given index - Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getDescription
public XmlDescription[] getDescription()
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
-
getDescriptionCount
public int getDescriptionCount()
Return the number of theXmlDescription.- Returns:
- the size of this collection
-
removeAllDescription
public void removeAllDescription()
Remove allXmlDescriptionin theList.
-
removeDescription
public boolean removeDescription(XmlDescription description)
Remove a specifiedXmlDescription.- Parameters:
description- theXmlDescriptionto remove.- Returns:
- true if the object was removed from the collection.
-
removeDescriptionAt
public XmlDescription removeDescriptionAt(int index)
Remove aXmlDescriptionat the specified position.- Parameters:
index- the position of theXmlDescriptionto remove.- Returns:
- the element removed from the collection
-
setDescription
public void setDescription(int index, XmlDescription description) throws java.lang.IndexOutOfBoundsExceptionSet theXmlDescriptionat the specified position of theList.- Parameters:
index- the position to set theXmlDescription.description- theXmlDescriptionto set.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setDescription
public void setDescription(XmlDescription[] descriptionArray)
Set a allXmlDescriptionto theList.- Parameters:
descriptionArray- the array of descriptions to set
-
-