Class Utility
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.utils.Utility
-
public class Utility extends Object
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringSHOULD_NOT_OCCUR_ERROR_MESSAGE
-
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>
ElgetElementByUUID(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>
ElgetElementByUUIDAsAdmin(String elementType, UUID uuid, Class<? extends El> clz)static <P extends org.gcube.informationsystem.base.reference.properties.PropertyElement>
PgetPropertyDocument(Class<P> clz, com.orientechnologies.orient.core.record.OElement element, String property)static UUIDgetUUID(com.orientechnologies.orient.core.record.OElement element)static org.gcube.com.fasterxml.jackson.databind.JsonNodetoJsonNode(com.orientechnologies.orient.core.record.OElement element, boolean raw)static org.gcube.com.fasterxml.jackson.databind.JsonNodetoJsonNode(com.orientechnologies.orient.core.record.ORecord oRecord, boolean raw)static StringtoJsonString(com.orientechnologies.orient.core.record.OElement element, boolean raw)static StringtoJsonString(com.orientechnologies.orient.core.record.ORecord oRecord, boolean raw)
-
-
-
Field Detail
-
SHOULD_NOT_OCCUR_ERROR_MESSAGE
public static final String SHOULD_NOT_OCCUR_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
-
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.NotFoundExceptionorg.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.NotFoundExceptionorg.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
-
-