Class Utility


  • public class Utility
    extends Object
    Author:
    Luca Frosini (ISTI - CNR)
    • Constructor Summary

      Constructors 
      Constructor Description
      Utility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <El extends com.orientechnologies.orient.core.record.OElement>
      El
      getElementByUUID​(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument, String elementType, UUID uuid, Class<? extends El> clz)  
      static <El extends com.orientechnologies.orient.core.record.OElement>
      El
      getElementByUUIDAsAdmin​(String elementType, UUID uuid, Class<? extends El> clz)  
      static <P extends org.gcube.informationsystem.base.reference.properties.PropertyElement>
      P
      getPropertyDocument​(Class<P> clz, com.orientechnologies.orient.core.record.OElement element, String property)  
      static UUID getUUID​(com.orientechnologies.orient.core.record.OElement element)  
      static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.orientechnologies.orient.core.record.OElement element, boolean raw)  
      static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.orientechnologies.orient.core.record.ORecord oRecord, boolean raw)  
      static String toJsonString​(com.orientechnologies.orient.core.record.OElement element, boolean raw)  
      static String toJsonString​(com.orientechnologies.orient.core.record.ORecord oRecord, boolean raw)  
    • Constructor Detail

      • Utility

        public Utility()
    • Method Detail

      • toJsonNode

        public static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.orientechnologies.orient.core.record.OElement element,
                                                                                   boolean raw)
                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • toJsonNode

        public static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.orientechnologies.orient.core.record.ORecord oRecord,
                                                                                   boolean raw)
                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • toJsonString

        public static String toJsonString​(com.orientechnologies.orient.core.record.OElement element,
                                          boolean raw)
      • toJsonString

        public static String toJsonString​(com.orientechnologies.orient.core.record.ORecord oRecord,
                                          boolean raw)
      • getElementByUUIDAsAdmin

        public static <El extends com.orientechnologies.orient.core.record.OElement> El getElementByUUIDAsAdmin​(String elementType,
                                                                                                                UUID uuid,
                                                                                                                Class<? extends El> clz)
                                                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
                                                                                                                org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getElementByUUID

        public static <El extends com.orientechnologies.orient.core.record.OElement> El getElementByUUID​(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument,
                                                                                                         String elementType,
                                                                                                         UUID uuid,
                                                                                                         Class<? extends El> clz)
                                                                                                  throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
                                                                                                         org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getPropertyDocument

        public static <P extends org.gcube.informationsystem.base.reference.properties.PropertyElement> P getPropertyDocument​(Class<P> clz,
                                                                                                                              com.orientechnologies.orient.core.record.OElement element,
                                                                                                                              String property)
                                                                                                                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getUUID

        public static UUID getUUID​(com.orientechnologies.orient.core.record.OElement element)
                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException