java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.utils.UUIDUtility

public class UUIDUtility extends Object
Utility class for handling UUID operations specific to Resource Registry persistence.
Author:
Luca Frosini (ISTI - CNR)
  • Method Summary

    Modifier and Type
    Method
    Description
    static UUID
    getUUID(com.orientechnologies.orient.core.record.OElement element)
    Retrieves and parses the unique identifier (UUID) from the given database element.
    static UUID
    getUUID(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
    Retrieves and parses the unique identifier from a JSON node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getUUID

      public static UUID getUUID(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
      Retrieves and parses the unique identifier from a JSON node.
      Parameters:
      jsonNode - the JSON node from which to read the identifier
      Returns:
      the parsed identifier, or null when no textual identifier is present
    • getUUID

      public static UUID getUUID(com.orientechnologies.orient.core.record.OElement element) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Retrieves and parses the unique identifier (UUID) from the given database element.
      Parameters:
      element - the database element to extract the UUID from
      Returns:
      the parsed UUID of the element
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the UUID is missing, invalid, or cannot be parsed