org.dspace.identifier
Class IdentifierServiceImpl

java.lang.Object
  extended by org.dspace.identifier.IdentifierServiceImpl
All Implemented Interfaces:
IdentifierService

public class IdentifierServiceImpl
extends Object
implements IdentifierService

The main service class used to reserve, register and resolve identifiers

Author:
Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)

Constructor Summary
IdentifierServiceImpl()
           
 
Method Summary
 void delete(Context context, DSpaceObject dso)
          Delete (Unbind) all identifiers registered for a specific DSpace item.
 void delete(Context context, DSpaceObject dso, String identifier)
          Used to Delete a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.
 String lookup(Context context, DSpaceObject dso, Class<? extends Identifier> identifier)
           
 void register(Context context, DSpaceObject dso)
           
 void register(Context context, DSpaceObject object, String identifier)
          Used to Register a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.
 void reserve(Context context, DSpaceObject dso)
          Reserves identifiers for the item
 void reserve(Context context, DSpaceObject dso, String identifier)
          Used to Reserve a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.
 DSpaceObject resolve(Context context, String identifier)
          This will resolve a DSpaceObject based on a provided Identifier.
 void setProviders(List<IdentifierProvider> providers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifierServiceImpl

public IdentifierServiceImpl()
Method Detail

setProviders

public void setProviders(List<IdentifierProvider> providers)

reserve

public void reserve(Context context,
                    DSpaceObject dso)
             throws AuthorizeException,
                    SQLException,
                    IdentifierException
Reserves identifiers for the item

Specified by:
reserve in interface IdentifierService
Parameters:
context - dspace context
dso - dspace object
Throws:
AuthorizeException
SQLException
IdentifierException

reserve

public void reserve(Context context,
                    DSpaceObject dso,
                    String identifier)
             throws AuthorizeException,
                    SQLException,
                    IdentifierException
Description copied from interface: IdentifierService
Used to Reserve a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.

Specified by:
reserve in interface IdentifierService
Throws:
AuthorizeException
SQLException
IdentifierException

register

public void register(Context context,
                     DSpaceObject dso)
              throws AuthorizeException,
                     SQLException,
                     IdentifierException
Specified by:
register in interface IdentifierService
Throws:
AuthorizeException
SQLException
IdentifierException

register

public void register(Context context,
                     DSpaceObject object,
                     String identifier)
              throws AuthorizeException,
                     SQLException,
                     IdentifierException
Description copied from interface: IdentifierService
Used to Register a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.

Specified by:
register in interface IdentifierService
Throws:
AuthorizeException
SQLException
IdentifierException

lookup

public String lookup(Context context,
                     DSpaceObject dso,
                     Class<? extends Identifier> identifier)
Specified by:
lookup in interface IdentifierService
Returns:

resolve

public DSpaceObject resolve(Context context,
                            String identifier)
                     throws IdentifierNotFoundException,
                            IdentifierNotResolvableException
Description copied from interface: IdentifierService
This will resolve a DSpaceObject based on a provided Identifier. The Service will interrogate the providers in no particular order and return the first successful result discovered. If no resolution is successful, the method will return null if no object is found. TODO: Verify null is returned.

Specified by:
resolve in interface IdentifierService
Returns:
Throws:
IdentifierNotFoundException
IdentifierNotResolvableException

delete

public void delete(Context context,
                   DSpaceObject dso)
            throws AuthorizeException,
                   SQLException,
                   IdentifierException
Description copied from interface: IdentifierService
Delete (Unbind) all identifiers registered for a specific DSpace item. Identifiers are "unbound" across all providers in no particular order.

Specified by:
delete in interface IdentifierService
Throws:
AuthorizeException
SQLException
IdentifierException

delete

public void delete(Context context,
                   DSpaceObject dso,
                   String identifier)
            throws AuthorizeException,
                   SQLException,
                   IdentifierException
Description copied from interface: IdentifierService
Used to Delete a Specific Identifier (for example a Handle, hdl:1234.5/6) The provider is responsible for Detecting and Processing the appropriate identifier, all Providers are interrogated, multiple providers can process the same identifier.

Specified by:
delete in interface IdentifierService
Throws:
AuthorizeException
SQLException
IdentifierException


Copyright © 2012 DuraSpace. All Rights Reserved.