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.Serializable
XML 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 void
addDescription(int index, XmlDescription description)
void
addDescription(XmlDescription description)
java.util.Iterator<? extends XmlDescription>
enumerateDescription()
Return anIterator
of allXmlDescription
.XmlDescription[]
getDescription()
Returns the contents of the collection in an Array.XmlDescription
getDescription(int index)
Return theXmlDescription
at the specified position in theList
.int
getDescriptionCount()
Return the number of theXmlDescription
.void
removeAllDescription()
Remove allXmlDescription
in theList
.boolean
removeDescription(XmlDescription description)
Remove a specifiedXmlDescription
.XmlDescription
removeDescriptionAt(int index)
Remove aXmlDescription
at the specified position.void
setDescription(int index, XmlDescription description)
Set theXmlDescription
at the specified position of theList
.void
setDescription(XmlDescription[] descriptionArray)
Set a allXmlDescription
to theList
.
-
-
-
Method Detail
-
addDescription
public void addDescription(XmlDescription description) throws java.lang.IndexOutOfBoundsException
- Parameters:
description
- theXmlDescription
to 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
- theXmlDescription
to 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 anIterator
of allXmlDescription
.- Returns:
- an Iterator over all
XmlDescription
elements.
-
getDescription
public XmlDescription getDescription(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlDescription
at the specified position in theList
.- Parameters:
index
- the position of the searchedXmlDescription
.- Returns:
- the value of the
XmlDescription
at 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 allXmlDescription
in theList
.
-
removeDescription
public boolean removeDescription(XmlDescription description)
Remove a specifiedXmlDescription
.- Parameters:
description
- theXmlDescription
to remove.- Returns:
- true if the object was removed from the collection.
-
removeDescriptionAt
public XmlDescription removeDescriptionAt(int index)
Remove aXmlDescription
at the specified position.- Parameters:
index
- the position of theXmlDescription
to remove.- Returns:
- the element removed from the collection
-
setDescription
public void setDescription(int index, XmlDescription description) throws java.lang.IndexOutOfBoundsException
Set theXmlDescription
at the specified position of theList
.- Parameters:
index
- the position to set theXmlDescription
.description
- theXmlDescription
to set.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setDescription
public void setDescription(XmlDescription[] descriptionArray)
Set a allXmlDescription
to theList
.- Parameters:
descriptionArray
- the array of descriptions to set
-
-