java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.system.SystemDumpManagement

public class SystemDumpManagement extends Object
OrientDB-specific System Dump reads: unrestricted traversal of every Context, QueryTemplate, Resource, and IsRelatedTo relation, serialized with the complete state required for backup purposes.

Facet entities and ConsistsOf relations are intentionally not walked separately: they are already embedded within their owning Resource's own representation.

Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • SystemDumpManagement

      public SystemDumpManagement()
  • Method Details

    • dumpContexts

      public String dumpContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns every Context visible to the database administrator, including live and cemetery records.
      Returns:
      JSON array of every Context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the traversal or serialization fails
    • dumpQueryTemplates

      public String dumpQueryTemplates() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns every Query Template through the administrative reader and fails on any invalid row.
      Returns:
      JSON array of every Query Template
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the traversal or serialization fails
    • dumpResources

      public String dumpResources() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns every Resource instance (with embedded ConsistsOf/Facets, full metadata, and embedded Context membership) as a JSON array string.
      Returns:
      JSON array of every Resource
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the traversal or serialization fails
    • dumpRelations

      public String dumpRelations() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns every IsRelatedTo relation instance (full metadata, embedded Context membership) as a JSON array string.
      Returns:
      JSON array of every IsRelatedTo relation
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the traversal or serialization fails