Class OMRSArchiveGUIDMap


  • public class OMRSArchiveGUIDMap
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      OMRSArchiveGUIDMap​(java.lang.String guidMapFileName)
      Constructor for the GUIDMap.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getGUID​(java.lang.String id)
      Retrieve the guid for an element based on its id.
      int getSize()
      Return the size of the map.
      java.lang.String queryGUID​(java.lang.String id)
      Retrieve the guid for an element based on its id.
      void saveGUIDs()
      Save the map to a file
      void setGUID​(java.lang.String id, java.lang.String guid)
      Fix the guid for a particular name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OMRSArchiveGUIDMap

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

      • setGUID

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

        public java.lang.String getGUID​(java.lang.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 java.lang.String queryGUID​(java.lang.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
      • getSize

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