Class XmlContributors
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlContributors
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlContributors extends java.lang.Object implements java.io.Serializable
XML mapping class for the 'contributors' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlContributors()
Default constructor.
-
Method Summary
Modifier and Type Method Description void
addContributor(int index, XmlContributor contributor)
void
addContributor(XmlContributor contributor)
java.util.Iterator<? extends XmlContributor>
enumerateContributor()
Return anIterator
of allXmlContributor
.XmlContributor[]
getContributor()
Returns the contents of the collection in an Array.XmlContributor
getContributor(int index)
Return theXmlContributor
at the specified position in theList
.int
getContributorCount()
Return the number of theXmlContributor
.void
removeAllContributor()
Remove allXmlContributor
in theList
.boolean
removeContributor(XmlContributor contributor)
Remove a specifiedXmlContributor
.XmlContributor
removeContributorAt(int index)
Remove aXmlContributor
at the specified position.void
setContributor(int index, XmlContributor contributor)
Set theXmlContributor
at the specified position of theList
.void
setContributor(XmlContributor[] contributorArray)
Set a allXmlContributor
to theList
.
-
-
-
Method Detail
-
addContributor
public void addContributor(XmlContributor contributor) throws java.lang.IndexOutOfBoundsException
- Parameters:
contributor
- theXmlContributor
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection.
-
addContributor
public void addContributor(int index, XmlContributor contributor) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
- the position to insert theXmlContributor
.contributor
- theXmlContributor
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateContributor
public java.util.Iterator<? extends XmlContributor> enumerateContributor()
Return anIterator
of allXmlContributor
.- Returns:
- an Iterator over all
XmlContributor
elements.
-
getContributor
public XmlContributor getContributor(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlContributor
at the specified position in theList
.- Parameters:
index
- the position of the searchedXmlContributor
.- Returns:
- the value of the
XmlContributor
at the given index - Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getContributor
public XmlContributor[] getContributor()
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
-
getContributorCount
public int getContributorCount()
Return the number of theXmlContributor
.- Returns:
- the size of this collection
-
removeAllContributor
public void removeAllContributor()
Remove allXmlContributor
in theList
.
-
removeContributor
public boolean removeContributor(XmlContributor contributor)
Remove a specifiedXmlContributor
.- Parameters:
contributor
- theXmlContributor
to remove.- Returns:
- true if the object was removed from the collection.
-
removeContributorAt
public XmlContributor removeContributorAt(int index)
Remove aXmlContributor
at the specified position.- Parameters:
index
- the position of theXmlContributor
to remove.- Returns:
- the element removed from the collection
-
setContributor
public void setContributor(int index, XmlContributor contributor) throws java.lang.IndexOutOfBoundsException
Set theXmlContributor
at the specified position of theList
.- Parameters:
index
- the position to set theXmlContributor
.contributor
- theXmlContributor
to set.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setContributor
public void setContributor(XmlContributor[] contributorArray)
Set a allXmlContributor
to theList
.- Parameters:
contributorArray
- the array ofXmlContributor
to set.
-
-