java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<SET,TET>>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.base.RelationElementManagement<ResourceManagement,T,org.gcube.informationsystem.types.reference.entities.ResourceSchema,TET>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.RelationManagement<FacetManagement,org.gcube.informationsystem.types.reference.entities.FacetSchema>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.instances.relations.ConsistsOfManagement
All Implemented Interfaces:
ERManagement

public class ConsistsOfManagement extends RelationManagement<FacetManagement,org.gcube.informationsystem.types.reference.entities.FacetSchema>
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • DEFAULT_CONSISTS_OF_PC

      public static final org.gcube.informationsystem.model.reference.properties.PropagationConstraint DEFAULT_CONSISTS_OF_PC
      The default propagation constraint for ConsistsOf relations.
  • Constructor Details

    • ConsistsOfManagement

      public ConsistsOfManagement()
      Creates a new ConsistsOfManagement instance with default propagation constraints.
  • Method Details

    • getSpecificNotFoundException

      protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException getSpecificNotFoundException(org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException e)
      Description copied from class: ElementManagement
      Converts a generic NotFoundException into a subclass-specific NotFoundException.
      Specified by:
      getSpecificNotFoundException in class ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema,org.gcube.informationsystem.types.reference.entities.FacetSchema>>
      Parameters:
      e - the generic exception
      Returns:
      the specific NotFoundException
    • getSpecificAvailableInAnotherContextException

      public org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException getSpecificAvailableInAnotherContextException(String message)
      Description copied from interface: ERManagement
      Returns the subclass-specific AvailableInAnotherContextException instance.
      Parameters:
      message - the exception message
      Returns:
      the specific AvailableInAnotherContextException
    • getSpecificAlreadyPresentException

      protected org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException getSpecificAlreadyPresentException(String message)
      Description copied from class: ElementManagement
      Converts a generic AlreadyPresentException into a subclass-specific AlreadyPresentException.
      Specified by:
      getSpecificAlreadyPresentException in class ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema,org.gcube.informationsystem.types.reference.entities.FacetSchema>>
      Parameters:
      message - the exception message
      Returns:
      the specific AlreadyPresentException
    • newTargetEntityManagement

      protected FacetManagement newTargetEntityManagement() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Description copied from class: RelationElementManagement
      Creates a new management instance for the target entity of the relation (subclass hook).
      Specified by:
      newTargetEntityManagement in class RelationElementManagement<ResourceManagement,FacetManagement,org.gcube.informationsystem.types.reference.entities.ResourceSchema,org.gcube.informationsystem.types.reference.entities.FacetSchema>
      Returns:
      the target entity management instance
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on database or lookup error
    • reallyCreate

      protected com.orientechnologies.orient.core.record.OEdge reallyCreate() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Description copied from class: ElementManagement
      Persists a new element in the database (subclass hook).
      Overrides:
      reallyCreate in class RelationManagement<FacetManagement,org.gcube.informationsystem.types.reference.entities.FacetSchema>
      Returns:
      the persisted OrientDB vertex
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - if the element already exists in the database
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on any database error
    • checkResource

      protected void checkResource() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Validates the topological sanity constraints of the associated resource.
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException - if topological validation fails
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on database lookup failure
    • sanityCheck

      public void sanityCheck() throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Description copied from class: ElementManagement
      Performs runtime validation of mandatory and not-null schema constraints that cannot be enforced directly by OrientDB in distributed mode.
      Overrides:
      sanityCheck in class ElementManagement<com.orientechnologies.orient.core.record.OEdge,org.gcube.informationsystem.types.reference.relations.RelationSchema<org.gcube.informationsystem.types.reference.entities.ResourceSchema,org.gcube.informationsystem.types.reference.entities.FacetSchema>>
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException - if a schema constraint is violated
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on database lookup failure