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.SerializableXML 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 voidaddContributor(int index, XmlContributor contributor)voidaddContributor(XmlContributor contributor)java.util.Iterator<? extends XmlContributor>enumerateContributor()Return anIteratorof allXmlContributor.XmlContributor[]getContributor()Returns the contents of the collection in an Array.XmlContributorgetContributor(int index)Return theXmlContributorat the specified position in theList.intgetContributorCount()Return the number of theXmlContributor.voidremoveAllContributor()Remove allXmlContributorin theList.booleanremoveContributor(XmlContributor contributor)Remove a specifiedXmlContributor.XmlContributorremoveContributorAt(int index)Remove aXmlContributorat the specified position.voidsetContributor(int index, XmlContributor contributor)Set theXmlContributorat the specified position of theList.voidsetContributor(XmlContributor[] contributorArray)Set a allXmlContributorto theList.
-
-
-
Method Detail
-
addContributor
public void addContributor(XmlContributor contributor) throws java.lang.IndexOutOfBoundsException
- Parameters:
contributor- theXmlContributorto 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- theXmlContributorto 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 anIteratorof allXmlContributor.- Returns:
- an Iterator over all
XmlContributorelements.
-
getContributor
public XmlContributor getContributor(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlContributorat the specified position in theList.- Parameters:
index- the position of the searchedXmlContributor.- Returns:
- the value of the
XmlContributorat 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 allXmlContributorin theList.
-
removeContributor
public boolean removeContributor(XmlContributor contributor)
Remove a specifiedXmlContributor.- Parameters:
contributor- theXmlContributorto remove.- Returns:
- true if the object was removed from the collection.
-
removeContributorAt
public XmlContributor removeContributorAt(int index)
Remove aXmlContributorat the specified position.- Parameters:
index- the position of theXmlContributorto remove.- Returns:
- the element removed from the collection
-
setContributor
public void setContributor(int index, XmlContributor contributor) throws java.lang.IndexOutOfBoundsExceptionSet theXmlContributorat the specified position of theList.- Parameters:
index- the position to set theXmlContributor.contributor- theXmlContributorto set.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setContributor
public void setContributor(XmlContributor[] contributorArray)
Set a allXmlContributorto theList.- Parameters:
contributorArray- the array ofXmlContributorto set.
-
-