java.lang.Object
org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveGUIDMap

public class OMRSArchiveGUIDMap extends Object
OMRSArchiveGUIDMap is a utility to create a persisted list of GUIDs used by an archive builder. This helps the archive builder use the same GUIDs each time the archive is built. GUIDs for new elements are created automatically.
  • Constructor Details

    • OMRSArchiveGUIDMap

      public OMRSArchiveGUIDMap(String guidMapFileName)
      Constructor for the GUIDMap.
      Parameters:
      guidMapFileName - name of the file name where the GUIDs are stashed.
  • Method Details

    • setGUID

      public void setGUID(String id, String guid)
      Fix the guid for a particular name.
      Parameters:
      id - identifier associated with the GUID
      guid - fixed guid value
    • getGUID

      public String getGUID(String id)
      Retrieve the guid for an element based on its id. If no GUID exists, a new one is created and returned
      Parameters:
      id - id of element
      Returns:
      guid mapped to id
    • queryGUID

      public String queryGUID(String id)
      Retrieve the guid for an element based on its id.
      Parameters:
      id - id of element
      Returns:
      guid mapped to id
    • saveGUIDs

      public void saveGUIDs()
      Save the map to a file
    • saveUsedGUIDs

      public void saveUsedGUIDs()
      Save the map to a file
    • getSize

      public int getSize()
      Return the size of the map.
      Returns:
      int (zero if the map is null)
    • getUsedSize

      public int getUsedSize()
      Return the size of the map.
      Returns:
      int (zero if the map is null)