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>

  • 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 Detail

      • 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:
        createCompleteJsonNode in class ElementManagement<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.NotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException
        org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException
        org.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:
        reallyCreate in class ElementManagement<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:
        reallyUpdate in class ElementManagement<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:
        reallyDelete in class ElementManagement<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.RelationNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException