Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.util
Class CustomIdentifiers<T>

java.lang.Object
  extended by eu.esdihumboldt.util.IdentifiersBase<T>
      extended by eu.esdihumboldt.util.Identifiers<T>
          extended by eu.esdihumboldt.util.CustomIdentifiers<T>
Type Parameters:
T - the type of objects that shall be identified

public class CustomIdentifiers<T>
extends Identifiers<T>

Identifiers that allows custom identifiers to be used through getId(Object, String).

Author:
Simon Templer

Field Summary
 
Fields inherited from class eu.esdihumboldt.util.IdentifiersBase
ids, objects
 
Constructor Summary
CustomIdentifiers(Class<T> clazz, boolean useEquals)
           
CustomIdentifiers(String prefix, boolean useEquals)
           
CustomIdentifiers(String prefix, boolean useEquals, int startCounter)
           
 
Method Summary
 String getId(T object, String desiredId)
          Get the identifier for the given object.
 
Methods inherited from class eu.esdihumboldt.util.Identifiers
getId, getPrefix, onInsertion
 
Methods inherited from class eu.esdihumboldt.util.IdentifiersBase
fetchId, getIds, getObject, getObjects, putObjectIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomIdentifiers

public CustomIdentifiers(Class<T> clazz,
                         boolean useEquals)
See Also:
Identifiers.Identifiers(Class, boolean)

CustomIdentifiers

public CustomIdentifiers(String prefix,
                         boolean useEquals,
                         int startCounter)
See Also:
Identifiers.Identifiers(String, boolean, int)

CustomIdentifiers

public CustomIdentifiers(String prefix,
                         boolean useEquals)
See Also:
Identifiers.Identifiers(String, boolean)
Method Detail

getId

public String getId(T object,
                    String desiredId)
Get the identifier for the given object. If not already present, a new identifier will be assigned, if possible the given desired identifier is used.

Parameters:
object - the object to identify
desiredId - the desired identifier
Returns:
the object identifier, if the identifier was newly assigned this is either the desiredId or the desiredId with a suffix

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d