Class XmlCreators
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlCreators
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlCreators extends java.lang.Object implements java.io.SerializableXML Mapping class for the 'creators' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlCreators()Default constructor
-
Method Summary
Modifier and Type Method Description voidaddCreator(int index, XmlCreator creator)voidaddCreator(XmlCreator creator)java.util.Iterator<? extends XmlCreator>enumerateCreator()Return anIteratorof allXmlCreator.XmlCreator[]getCreator()Returns the contents of theListin an Array.XmlCreatorgetCreator(int index)Return theXmlCreatorat the specified position in theList.intgetCreatorCount()Return the number of theXmlCreator.voidremoveAllCreator()Remove allXmlCreatorin theList.booleanremoveCreator(XmlCreator creator)Remove a specifiedXmlCreator.XmlCreatorremoveCreatorAt(int index)Remove aXmlCreatorat the specified position.voidsetCreator(int index, XmlCreator creator)Set theXmlCreatorat the specified position of theList.voidsetCreator(XmlCreator[] creatorArray)Set a allXmlCreatorto theList.
-
-
-
Method Detail
-
addCreator
public void addCreator(XmlCreator creator) throws java.lang.IndexOutOfBoundsException
- Parameters:
creator- theXmlCreatorto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection.
-
addCreator
public void addCreator(int index, XmlCreator creator) throws java.lang.IndexOutOfBoundsException- Parameters:
index- the position to insert theXmlCreator.creator- theXmlCreatorto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateCreator
public java.util.Iterator<? extends XmlCreator> enumerateCreator()
Return anIteratorof allXmlCreator.- Returns:
- an Iterator over all
XmlCreatorelements.
-
getCreator
public XmlCreator getCreator(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlCreatorat the specified position in theList.- Parameters:
index- the position of the searchedXmlCreator.- Returns:
- the value of the
XmlCreatorat the given index - Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getCreator
public XmlCreator[] getCreator()
Returns the contents of theListin 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:
- an Array of
XmlCreator.
-
getCreatorCount
public int getCreatorCount()
Return the number of theXmlCreator.- Returns:
- the size of this collection
-
removeAllCreator
public void removeAllCreator()
Remove allXmlCreatorin theList.
-
removeCreator
public boolean removeCreator(XmlCreator creator)
Remove a specifiedXmlCreator.- Parameters:
creator- theXmlCreatorto remove.- Returns:
- true if the object was removed from the collection.
-
removeCreatorAt
public XmlCreator removeCreatorAt(int index)
Remove aXmlCreatorat the specified position.- Parameters:
index- the position of theXmlCreatorto remove.- Returns:
- the element removed from the collection
-
setCreator
public void setCreator(int index, XmlCreator creator) throws java.lang.IndexOutOfBoundsExceptionSet theXmlCreatorat the specified position of theList.- Parameters:
index- the position to set theXmlCreator.creator- theXmlCreatorto set.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setCreator
public void setCreator(XmlCreator[] creatorArray)
Set a allXmlCreatorto theList.- Parameters:
creatorArray- the array of creators to set
-
-