edu.ucsb.nceas.metacat.admin.upgrade

## Class GenerateGlobalIdentifiers

- java.lang.Object
- - edu.ucsb.nceas.metacat.admin.upgrade.GenerateGlobalIdentifiers

- All Implemented Interfaces:
    UpgradeUtilityInterface

      public class GenerateGlobalIdentifiers
      extends java.lang.Object
      implements UpgradeUtilityInterface

  Optionally upgrade all of the existing identifiers in the tables to be official DOIs that are assigned by a DOI registration authority. This class first checks if GUIDs should be converted to DOIs, and if so, updates all relevant tables and resources in Metacat, and then registers each of the newly minted identifiers with the EZID service. You must have an EZID account for this to work properly. Whether or not identifiers should be converted is determined by several metacat.properties. First, only upgrade if 'guid.assignGUIDs' is true. Next, for each server registered in the xml_replication table, only convert the documents belonging to that server if there is a corresponding property that gives the 'shoulder' or 'prefix'' to be used to convert existing IDs to GUIDs. For example, if servers 1 & 2 are registered in xml_replication, then only convert the IDs for server 1 to GUIDs if the property 'guid.doi.doishoulder.1' defines a valid doi shoulder. NOTE: Metacat v2.0.5 has changed the name of the systemmetadata* tables to accommodate Oracle length restrictions. The table names have been updated in this utility to enable users to run this utility on v2.0.5+. You can only run this version of the utility on Metacat deployments that have been upgraded to 2.0.5+
  Author:
    jones

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenerateGlobalIdentifiers()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] ags)` Main method, solely for testing.
    `boolean` | `upgrade()` The main upgrade() procedure, which first upgrades identifiers in the database, then registers these with EZID.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GenerateGlobalIdentifiers

          public GenerateGlobalIdentifiers()

  - ### Method Detail

    - #### upgrade

          public boolean upgrade()
                          throws AdminException

      The main upgrade() procedure, which first upgrades identifiers in the database, then registers these with EZID.
      Specified by:
        `upgrade` in interface `UpgradeUtilityInterface`
      Throws:
        `AdminException`

    - #### main

          public static void main(java.lang.String[] ags)

      Main method, solely for testing. Not used in ordinary operation.

Copyright © 2023 Regents of the University of California. All Rights Reserved.