Class XmlGeoLocations
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.reference.datacite.xml.XmlGeoLocations
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlGeoLocations extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XmlGeoLocations()
-
Method Summary
Modifier and Type Method Description void
addGeoLocation(int index, XmlGeoLocation geoLocation)
void
addGeoLocation(XmlGeoLocation geoLocation)
java.util.Iterator<? extends XmlGeoLocation>
enumerateGeoLocation()
Return anIterator
of allXmlGeoLocation
.XmlGeoLocation[]
getgeoLocation()
Returns the contents of the collection in an Array.XmlGeoLocation
getGeoLocation(int index)
Return theXmlGeoLocation
at the specified position in theList
.int
getGeoLocationCount()
Return the number of theXmlGeoLocation
.void
removeAllGeoLocation()
Remove allXmlGeoLocation
in theList
.boolean
removeGeoLocation(XmlGeoLocation geoLocation)
Remove a specifiedXmlGeoLocation
.XmlGeoLocation
removeGeoLocationAt(int index)
Remove aXmlGeoLocation
at the specified position.void
setGeoLocation(int index, XmlGeoLocation geoLocation)
Set theXmlGeoLocation
at the specified position of theList
.void
setGeoLocation(XmlGeoLocation[] geoLocationArray)
Set a allXmlGeoLocation
to theList
.
-
-
-
Method Detail
-
addGeoLocation
public void addGeoLocation(XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsException
- Parameters:
geoLocation
- theXmlGeoLocation
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection.
-
addGeoLocation
public void addGeoLocation(int index, XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
- the position to insert theXmlGeoLocation
.geoLocation
- theXmlGeoLocation
to add.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateGeoLocation
public java.util.Iterator<? extends XmlGeoLocation> enumerateGeoLocation()
Return anIterator
of allXmlGeoLocation
.- Returns:
- an Iterator over all
XmlGeoLocation
elements.
-
getGeoLocation
public XmlGeoLocation getGeoLocation(int index) throws java.lang.IndexOutOfBoundsException
Return theXmlGeoLocation
at the specified position in theList
.- Parameters:
index
- the position of the searchedXmlGeoLocation
.- Returns:
- the value of the
XmlGeoLocation
at the given index - Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getgeoLocation
public XmlGeoLocation[] getgeoLocation()
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
-
getGeoLocationCount
public int getGeoLocationCount()
Return the number of theXmlGeoLocation
.- Returns:
- the size of this collection
-
removeAllGeoLocation
public void removeAllGeoLocation()
Remove allXmlGeoLocation
in theList
.
-
removeGeoLocation
public boolean removeGeoLocation(XmlGeoLocation geoLocation)
Remove a specifiedXmlGeoLocation
.- Parameters:
geoLocation
- theXmlGeoLocation
to remove.- Returns:
- true if the object was removed from the collection.
-
removeGeoLocationAt
public XmlGeoLocation removeGeoLocationAt(int index)
Remove aXmlGeoLocation
at the specified position.- Parameters:
index
- the position of theXmlGeoLocation
to remove.- Returns:
- the element removed from the collection
-
setGeoLocation
public void setGeoLocation(int index, XmlGeoLocation geoLocation) throws java.lang.IndexOutOfBoundsException
Set theXmlGeoLocation
at the specified position of theList
.- Parameters:
index
- the position to set theXmlGeoLocation
.geoLocation
- theXmlGeoLocation
to set.- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setGeoLocation
public void setGeoLocation(XmlGeoLocation[] geoLocationArray)
Set a allXmlGeoLocation
to theList
.- Parameters:
geoLocationArray
- the array of geolocations to set
-
-