Class ArchiveService

java.lang.Object
ai.chatur.cortex.core.archive.ArchiveService

public class ArchiveService extends Object
Exports the approved assertions as a portable RDF document.
  • Constructor Details

    • ArchiveService

      public ArchiveService(org.apache.jena.query.Dataset assertions)
      Creates the service.
      Parameters:
      assertions - the dataset holding the approved assertions and the staged branches
  • Method Details

    • exportAssertions

      public String exportAssertions()
      Exports the approved assertions.

      Reads the default graph only, so staged branches and the provenance graph — which live in named graphs — are excluded. The default graph's prefixes are seeded from the ontology when the store is opened, so the Turtle comes out abbreviated the same way the ontology is.

      This is not a backup: see BackupService.backup() for that.

      Returns:
      the approved assertions serialized in Turtle syntax