dk.netarkivet.common.distribute.arcrepository
Class Location

java.lang.Object
  extended by dk.netarkivet.common.distribute.arcrepository.Location

public class Location
extends java.lang.Object

This class encapsulates the bitarchive locations. It guarantees that there is only one Location object per location name.


Method Summary
static Location get(java.lang.String name)
          Get an object representing the location with the given name.
 ChannelID getChannelID()
          Get the BaMon channel id that corresponds to this location.
static java.util.Collection<Location> getKnown()
          Get all known locations.
static java.lang.String[] getKnownNames()
          Get all known locations as names.
 java.lang.String getName()
          Get the name of an location.
static boolean isKnownLocation(java.lang.String name)
          Check, if a given name is a location name.
 java.lang.String toString()
          Returns a human-readable representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

get

public static Location get(java.lang.String name)
Get an object representing the location with the given name.

Parameters:
name - The given name of an location
Returns:
an object representing the location with the given name

isKnownLocation

public static boolean isKnownLocation(java.lang.String name)
Check, if a given name is a location name.

Parameters:
name - a given name
Returns:
true, if the given name is a location name, false otherwise

getKnown

public static java.util.Collection<Location> getKnown()
Get all known locations.

Returns:
A unmodifiable view of the currently known locations.

getKnownNames

public static java.lang.String[] getKnownNames()
Get all known locations as names.

Returns:
all known locations as names

getName

public java.lang.String getName()
Get the name of an location.

Returns:
The name that this location is known as in queues etc.

getChannelID

public ChannelID getChannelID()
Get the BaMon channel id that corresponds to this location.

Returns:
The BaMon ChannelID of this location. Please do not parse its name!

toString

public java.lang.String toString()
Returns a human-readable representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
An arbitrary string version of the object. Do not depend on its format.