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<ResourceSchemaManagement,T,org.gcube.informationsystem.types.reference.entities.ResourceSchema,TT>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.types.relations.AbstractRelationSchemaManagement<FacetSchemaManagement,org.gcube.informationsystem.types.reference.entities.FacetSchema>
org.gcube.informationsystem.resourceregistry.persistence.orientdb.types.relations.ConsistsOfSchemaManagement
All Implemented Interfaces:
TypeDefinitionManagement

public class ConsistsOfSchemaManagement extends AbstractRelationSchemaManagement<FacetSchemaManagement,org.gcube.informationsystem.types.reference.entities.FacetSchema>
Manages the ConsistsOfSchema relation type definition in the database schema.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • ConsistsOfSchemaManagement

      public ConsistsOfSchemaManagement()
      Creates a new, uninitialized ConsistsOfSchemaManagement instance.
    • ConsistsOfSchemaManagement

      public ConsistsOfSchemaManagement(TypeEnvironment typeEnvironment, com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Creates a new ConsistsOfSchemaManagement instance bound to the specified environment and database session.
      Parameters:
      typeEnvironment - the Type environment to use
      oDatabaseDocument - the active OrientDB database session
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if initialization fails
  • Method Details

    • newTargetEntityManagement

      protected FacetSchemaManagement 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<ResourceSchemaManagement,FacetSchemaManagement,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
    • 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 the schema constraints this service enforces from the definition rather than through OrientDB: the mandatory properties, and the min and max bounds of the numeric values a creation or an update wrote.
      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