Class StatsService

java.lang.Object
ai.chatur.cortex.core.stats.StatsService

public class StatsService extends Object
Computes statistics over the knowledge graph: ingestion activity derived from provenance, the size of the assertion and inference datasets, and the size of the ontology, shapes, and rules the graph is built on.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StatsService(org.apache.jena.query.Dataset assertions, org.apache.jena.query.Dataset inferences, org.apache.jena.ontapi.model.OntModel ontModel, org.apache.jena.shacl.Shapes shapes, List<org.apache.jena.reasoner.rulesys.Rule> rules)
    Creates the service.
  • Method Summary

    Modifier and Type
    Method
    Description
    ai.chatur.cortex.CortexStats
    Returns a snapshot of the size and activity of the knowledge graph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StatsService

      public StatsService(org.apache.jena.query.Dataset assertions, org.apache.jena.query.Dataset inferences, org.apache.jena.ontapi.model.OntModel ontModel, org.apache.jena.shacl.Shapes shapes, List<org.apache.jena.reasoner.rulesys.Rule> rules)
      Creates the service.
      Parameters:
      assertions - the dataset holding the approved assertions and the staged branches
      inferences - the dataset holding the assertions enriched by inference
      ontModel - the ontology model
      shapes - the SHACL shapes ingested assertions are validated against
      rules - the rules used for inference
  • Method Details

    • getStats

      public ai.chatur.cortex.CortexStats getStats()
      Returns a snapshot of the size and activity of the knowledge graph.
      Returns:
      the current statistics