Class OrientDBUtility


  • public class OrientDBUtility
    extends Object
    Author:
    Luca Frosini (ISTI - CNR)
    • Constructor Detail

      • OrientDBUtility

        public OrientDBUtility()
    • Method Detail

      • toJsonNode

        public static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode​(com.orientechnologies.orient.core.record.OElement element)
                                                                            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)
                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • replaceType

        public static String replaceType​(String s)
      • toJsonString

        public static String toJsonString​(com.orientechnologies.orient.core.sql.executor.OResult oResult)
      • toJsonString

        public static String toJsonString​(com.orientechnologies.orient.core.record.ORecord oRecord)
      • getAsStringForLogging

        public static String getAsStringForLogging​(com.orientechnologies.orient.core.record.ORecord oRecord)
      • getAsStringForException

        public static String getAsStringForException​(com.orientechnologies.orient.core.record.ORecord oRecord)
      • 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