Class XmlFormats
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlFormats
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlFormats extends java.lang.Object implements java.io.SerializableXML Mapping class for the 'formats' element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlFormats()Default constructor
-
Method Summary
Modifier and Type Method Description voidaddFormat(int index, java.lang.String format)voidaddFormat(java.lang.String format)java.util.Iterator<? extends java.lang.String>enumerateFormat()Return anIteratorof allXmlFormats.java.lang.String[]getFormat()Returns the contents of theListin an Array.java.lang.StringgetFormat(int index)Return theXmlFormatsat the specified position in theList.intgetFormatCount()Return the number of theXmlFormats.voidremoveAllFormat()Remove allXmlFormatsin theList.booleanremoveFormat(java.lang.String format)Remove a specifiedXmlFormats.java.lang.StringremoveFormatAt(int index)Remove aXmlFormatsat the specified position.voidsetFormat(int index, java.lang.String format)Set theXmlFormatsat the specified position of theList.voidsetFormat(java.lang.String[] formatArray)Set a allXmlFormatsto theList.
-
-
-
Method Detail
-
addFormat
public void addFormat(java.lang.String format) throws java.lang.IndexOutOfBoundsException- Parameters:
format- theXmlFormatsto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection.
-
addFormat
public void addFormat(int index, java.lang.String format) throws java.lang.IndexOutOfBoundsException- Parameters:
index- the position to insert theXmlFormats.format- theXmlFormatsto add.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateFormat
public java.util.Iterator<? extends java.lang.String> enumerateFormat()
Return anIteratorof allXmlFormats.- Returns:
- an Iterator over all
XmlFormatselements.
-
getFormat
public java.lang.String getFormat(int index) throws java.lang.IndexOutOfBoundsExceptionReturn theXmlFormatsat the specified position in theList.- Parameters:
index- the position of the searchedXmlFormats.- Returns:
- the value of the
XmlFormatsat the given index - Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getFormat
public java.lang.String[] getFormat()
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
XmlFormats.
-
getFormatCount
public int getFormatCount()
Return the number of theXmlFormats.- Returns:
- the size of this collection
-
removeAllFormat
public void removeAllFormat()
Remove allXmlFormatsin theList.
-
removeFormat
public boolean removeFormat(java.lang.String format)
Remove a specifiedXmlFormats.- Parameters:
format- theXmlFormatsto remove.- Returns:
- true if the object was removed from the collection.
-
removeFormatAt
public java.lang.String removeFormatAt(int index)
Remove aXmlFormatsat the specified position.- Parameters:
index- the position of theXmlFormatsto remove.- Returns:
- the element removed from the collection
-
setFormat
public void setFormat(int index, java.lang.String format) throws java.lang.IndexOutOfBoundsExceptionSet theXmlFormatsat the specified position of theList.- Parameters:
index- the position to set theXmlFormats.format- theXmlFormatsto set.- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setFormat
public void setFormat(java.lang.String[] formatArray)
Set a allXmlFormatsto theList.- Parameters:
formatArray- the array of formats to set
-
-