org.bibalex.daf.managers.checkin
Class ExternalIDsUtilities

java.lang.Object
  extended by org.bibalex.daf.managers.checkin.ExternalIDsUtilities

public class ExternalIDsUtilities
extends java.lang.Object

Contains common methods to handle ExternalID[].

Author:
Shehab.Kamal

Constructor Summary
ExternalIDsUtilities()
           
 
Method Summary
static boolean allHaveDifferentTypes(ExternalID[] data)
          Determines whether all the items in the given have different external ID type.
static boolean areValuesPresent(ExternalID[] data)
          Determines whether all the items has values associated with them.
static boolean hasOneDefaultItem(ExternalID[] data)
          Determines whether the given array has exactly one item with whose default is set to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalIDsUtilities

public ExternalIDsUtilities()
Method Detail

hasOneDefaultItem

public static boolean hasOneDefaultItem(ExternalID[] data)
Determines whether the given array has exactly one item with whose default is set to true.

Parameters:
data - The data to examine.
Returns:
True if only one item is default, otherwise false.
If the given array is null false is returned.

areValuesPresent

public static boolean areValuesPresent(ExternalID[] data)
Determines whether all the items has values associated with them.

Parameters:
data - The data to examine.
Returns:
True if all the entries has values associted with them, otherwise false.
If the given array is null true is returned.

allHaveDifferentTypes

public static boolean allHaveDifferentTypes(ExternalID[] data)
Determines whether all the items in the given have different external ID type.

Parameters:
data - The data to examine.
Returns:
True if each item has an external ID type different from the others, otherwise false.
If the given array is null true is returned.