Class IdentifierProvider

java.lang.Object
org.dspace.identifier.IdentifierProvider
Direct Known Subclasses:
EZIDIdentifierProvider, FilteredIdentifierProvider, HandleIdentifierProvider, VersionedHandleIdentifierProvider, VersionedHandleIdentifierProviderWithCanonicalHandles

public abstract class IdentifierProvider extends Object
Author:
Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)
  • Field Details

  • Constructor Details

    • IdentifierProvider

      public IdentifierProvider()
  • Method Details

    • setConfigurationService

      @Autowired(required=true) public void setConfigurationService(ConfigurationService configurationService)
    • setParentService

      public void setParentService(IdentifierService parentService)
    • supports

      public abstract boolean supports(Class<? extends Identifier> identifier)
      Can this provider provide identifiers of a given type?
      Parameters:
      identifier - requested type.
      Returns:
      true if the given type is assignable from this provider's type.
    • supports

      public abstract boolean supports(String identifier)
      Can this provider provide identifiers of a given type?
      Parameters:
      identifier - requested type.
      Returns:
      true if this provider can provide the named type of identifier.
    • register

      public abstract String register(Context context, DSpaceObject item) throws IdentifierException
      Create and apply an identifier to a DSpaceObject.
      Parameters:
      context - The relevant DSpace Context.
      item - object to be named.
      Returns:
      existing identifier of item if it has one, else a new identifier.
      Throws:
      IdentifierException - if identifier error
    • mint

      public abstract String mint(Context context, DSpaceObject dso) throws IdentifierException
      Create an identifier for a DSpaceObject.
      Parameters:
      context - The relevant DSpace Context.
      dso - object to be named.
      Returns:
      existing identifier of dso if it has one, else a new identifier.
      Throws:
      IdentifierException - if identifier error
    • resolve

      public abstract DSpaceObject resolve(Context context, String identifier, String... attributes) throws IdentifierNotFoundException, IdentifierNotResolvableException
      Find the object named by a given identifier.
      Parameters:
      context - The relevant DSpace Context.
      identifier - to be resolved.
      attributes - additional information for resolving identifier.
      Returns:
      the named object.
      Throws:
      IdentifierNotFoundException - if identifier not found
      IdentifierNotResolvableException - if identifier not resolvable
    • lookup

      public abstract String lookup(Context context, DSpaceObject object) throws IdentifierNotFoundException, IdentifierNotResolvableException
      Return the identifier for a DSpaceObject.
      Parameters:
      context - The relevant DSpace Context.
      object - The object to be looked up.
      Returns:
      identifier for object.
      Throws:
      IdentifierNotFoundException - if identifier not found
      IdentifierNotResolvableException - if identifier not resolvable
    • delete

      public abstract void delete(Context context, DSpaceObject dso) throws IdentifierException
      Unbind this type of identifier(s) from an object.
      Parameters:
      context - The relevant DSpace Context.
      dso - object to lose its identity.
      Throws:
      IdentifierException - if identifier error
    • delete

      public abstract void delete(Context context, DSpaceObject dso, String identifier) throws IdentifierException
      Unbind the given identifier from an object.
      Parameters:
      context - The relevant DSpace Context.
      dso - object to be de-identified.
      identifier - to be removed.
      Throws:
      IdentifierException - if identifier error
    • reserve

      public abstract void reserve(Context context, DSpaceObject dso, String identifier) throws IdentifierException
      Set an object's identifier.
      Parameters:
      context - The relevant DSpace Context.
      dso - object to be identified.
      identifier - to be set on the object.
      Throws:
      IdentifierException - if identifier error
    • register

      public abstract void register(Context context, DSpaceObject object, String identifier) throws IdentifierException
      Create a specific identifier and apply it to an object.
      Parameters:
      context - The relevant DSpace Context.
      object - to be identified.
      identifier - to be created.
      Throws:
      IdentifierException - if identifier error