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.Serializable
XML 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 void
addCreator(int index, XmlCreator creator)
void
addCreator(XmlCreator creator)
java.util.Iterator<? extends XmlCreator>
enumerateCreator()
Return anIterator
of allXmlCreator
.XmlCreator[]
getCreator()
Returns the contents of theList
in an Array.XmlCreator
getCreator(int index)
Return theXmlCreator
at the specified position in theList
.int
getCreatorCount()
Return the number of theXmlCreator
.void
removeAllCreator()
Remove allXmlCreator
in theList
.boolean
removeCreator(XmlCreator creator)
Remove a specifiedXmlCreator
.XmlCreator
removeCreatorAt(int index)
Remove aXmlCreator
at the specified position.void
setCreator(int index, XmlCreator creator)
Set theXmlCreator
at the specified position of theList
.void
setCreator(XmlCreator[] creatorArray)
Set a allXmlCreator
to theList
.
-
-
-
Method Detail
-
addCreator
public void addCreator(XmlCreator creator) throws java.lang.IndexOutOfBoundsException
- Parameters:
creator
- theXmlCreator
to 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
- theXmlCreator
to 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 anIterator
of allXmlCreator
.- Returns:
- an Iterator over all
XmlCreator
elements.
-
getCreator
public XmlCreator getCreator(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlCreator
at the specified position in theList
.- Parameters:
index
- the position of the searchedXmlCreator
.- Returns:
- the value of the
XmlCreator
at 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 theList
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:
- an Array of
XmlCreator
.
-
getCreatorCount
public int getCreatorCount()
Return the number of theXmlCreator
.- Returns:
- the size of this collection
-
removeAllCreator
public void removeAllCreator()
Remove allXmlCreator
in theList
.
-
removeCreator
public boolean removeCreator(XmlCreator creator)
Remove a specifiedXmlCreator
.- Parameters:
creator
- theXmlCreator
to remove.- Returns:
- true if the object was removed from the collection.
-
removeCreatorAt
public XmlCreator removeCreatorAt(int index)
Remove aXmlCreator
at the specified position.- Parameters:
index
- the position of theXmlCreator
to remove.- Returns:
- the element removed from the collection
-
setCreator
public void setCreator(int index, XmlCreator creator) throws java.lang.IndexOutOfBoundsException
Set theXmlCreator
at the specified position of theList
.- Parameters:
index
- the position to set theXmlCreator
.creator
- theXmlCreator
to set.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setCreator
public void setCreator(XmlCreator[] creatorArray)
Set a allXmlCreator
to theList
.- Parameters:
creatorArray
- the array of creators to set
-
-