Class RelationElementManagement<SEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,SET>,TEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,TET>,SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType>
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET,TET>>
-
- org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement<SEM,TEM,SET,TET>
-
- Direct Known Subclasses:
IsParentOfManagement,RelationManagement,RelationTypeDefinitionManagement
public abstract class RelationElementManagement<SEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,SET>,TEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,TET>,SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType> extends ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET,TET>>
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringINprotected booleanincludeSourceprotected booleanincludeTargetstatic StringOUTprotected Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement>sourceEntityClassprotected SEMsourceEntityManagementprotected Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement>targetEntityClassprotected TEMtargetEntityManagement-
Fields inherited from class org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement
accessType, affectedInstances, AT, cachedType, complete, DELETED, dryRun, element, elementClass, entryPoint, ignoreKeys, ignoreStartWithKeys, jsonNode, logger, oClass, oDatabaseDocument, operation, reload, self, typeName, UNDERSCORE, uuid, workingContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRelationElementManagement(org.gcube.informationsystem.base.reference.AccessType accessType, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> sourceEntityClass, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> targetEntityClass)protectedRelationElementManagement(org.gcube.informationsystem.base.reference.AccessType accessType, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> sourceEntityClass, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> targetEntityClass, SecurityContext workingContext, com.orientechnologies.orient.core.db.document.ODatabaseDocument orientGraph)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidchecksourceAndTargetEntityCompliancy()protected org.gcube.com.fasterxml.jackson.databind.JsonNodecreateCompleteJsonNode()SEMgetSourceEntityManagement()TEMgetTargetEntityManagement()voidincludeSource(boolean includeSource)voidincludeTarget(boolean includeTarget)protected abstract SEMnewSourceEntityManagement()protected abstract TEMnewTargetEntityManagement()protected com.orientechnologies.orient.core.record.OEdgereallyCreate()protected voidreallyDelete()protected com.orientechnologies.orient.core.record.OEdgereallyUpdate()voidsetSourceEntityManagement(SEM sourceEntityManagement)voidsetTargetEntityManagement(TEM targetEntityManagement)-
Methods inherited from class org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement
all, checkERMatch, checkJsonNode, checkUUIDMatch, cleanCachedSerialization, create, createOrUpdate, delete, exists, getAccessType, getAffectedInstances, getAllProperties, getCachedType, getClassProperty, getContexts, getContextsAsObjectNode, getContextsSet, getElement, getMandatoryErrorMessage, getNotNullErrorMessage, getObjectFromJsonNode, getOClass, getPropertyForJson, getPropertyMap, getSpecificAlreadyPresentException, getSpecificNotFoundException, getTypeName, getUUID, getWorkingContext, internalCreate, internalCreateOrUdate, internalDelete, internalUpdate, isDryRun, isReload, read, reallyGetAll, retrieveElement, retrieveElementFromAnyContext, sanityCheck, serializeAsAffectedInstance, serializeAsJsonNode, serializeSelfAsJsonNode, setAsEntryPoint, setDryRun, setElement, setElementType, setJson, setJsonNode, setOClass, setODatabaseDocument, setOperation, setProperty, setReload, setUUID, setWorkingContext, typeSatified, update, updateProperties
-
-
-
-
Field Detail
-
IN
public static final String IN
- See Also:
- Constant Field Values
-
OUT
public static final String OUT
- See Also:
- Constant Field Values
-
sourceEntityClass
protected final Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> sourceEntityClass
-
targetEntityClass
protected final Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> targetEntityClass
-
sourceEntityManagement
protected SEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,SET> sourceEntityManagement
-
targetEntityManagement
protected TEM extends EntityElementManagement<? extends org.gcube.informationsystem.base.reference.entities.EntityElement,TET> targetEntityManagement
-
includeSource
protected boolean includeSource
-
includeTarget
protected boolean includeTarget
-
-
Constructor Detail
-
RelationElementManagement
protected RelationElementManagement(org.gcube.informationsystem.base.reference.AccessType accessType, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> sourceEntityClass, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> targetEntityClass)
-
RelationElementManagement
protected RelationElementManagement(org.gcube.informationsystem.base.reference.AccessType accessType, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> sourceEntityClass, Class<? extends org.gcube.informationsystem.base.reference.entities.EntityElement> targetEntityClass, SecurityContext workingContext, com.orientechnologies.orient.core.db.document.ODatabaseDocument orientGraph)
-
-
Method Detail
-
includeSource
public void includeSource(boolean includeSource)
-
includeTarget
public void includeTarget(boolean includeTarget)
-
getSourceEntityManagement
public SEM getSourceEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getTargetEntityManagement
public TEM getTargetEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
setSourceEntityManagement
public void setSourceEntityManagement(SEM sourceEntityManagement)
-
setTargetEntityManagement
public void setTargetEntityManagement(TEM targetEntityManagement)
-
createCompleteJsonNode
protected org.gcube.com.fasterxml.jackson.databind.JsonNode createCompleteJsonNode() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Specified by:
createCompleteJsonNodein classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType>>- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
checksourceAndTargetEntityCompliancy
protected abstract void checksourceAndTargetEntityCompliancy() throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
reallyCreate
protected com.orientechnologies.orient.core.record.OEdge reallyCreate() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Specified by:
reallyCreatein classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType>>- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
newSourceEntityManagement
protected abstract SEM newSourceEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
newTargetEntityManagement
protected abstract TEM newTargetEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
reallyUpdate
protected com.orientechnologies.orient.core.record.OEdge reallyUpdate() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Specified by:
reallyUpdatein classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType>>- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
reallyDelete
protected void reallyDelete() throws org.gcube.informationsystem.resourceregistry.api.exceptions.relations.RelationNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- Specified by:
reallyDeletein classElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationType<SET extends org.gcube.informationsystem.types.reference.entities.EntityType,TET extends org.gcube.informationsystem.types.reference.entities.EntityType>>- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.relations.RelationNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
-