Class CortexNamespace

java.lang.Object
ai.chatur.cortex.core.CortexNamespace

public final class CortexNamespace extends Object
Creates resource names in the cortex:// namespace used by the knowledge graph.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The URI namespace of all resources managed by Cortex.
    static final org.apache.jena.rdf.model.Resource
    The named graph holding per-statement provenance within the assertions dataset.
    static final org.apache.jena.rdf.model.Resource
    The named graph holding per-resource view counts within the assertions dataset.
    static final org.apache.jena.rdf.model.Property
    The property recording a resource's time-decayed view score, within USAGE.
    static final org.apache.jena.rdf.model.Property
    The instant VIEW_COUNT was last recomputed, within USAGE.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.rdf.model.Resource
    Returns a fresh, randomly named branch resource.
    static org.apache.jena.rdf.model.Resource
    Returns the resource with the given name in the Cortex namespace.

    Methods inherited from class java.lang.Object

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

    • NS

      public static final String NS
      The URI namespace of all resources managed by Cortex.
      See Also:
    • PROVENANCE

      public static final org.apache.jena.rdf.model.Resource PROVENANCE
      The named graph holding per-statement provenance within the assertions dataset.
    • USAGE

      public static final org.apache.jena.rdf.model.Resource USAGE
      The named graph holding per-resource view counts within the assertions dataset.

      Like PROVENANCE this is a reserved graph, not a branch and not part of the approved assertions: it records how the graph is used rather than what it claims.

    • VIEW_COUNT

      public static final org.apache.jena.rdf.model.Property VIEW_COUNT
      The property recording a resource's time-decayed view score, within USAGE.

      Not a plain tally: the value is discounted towards zero as it ages, so it is only meaningful alongside VIEW_COUNT_UPDATED, which says when it was last brought up to date.

    • VIEW_COUNT_UPDATED

      public static final org.apache.jena.rdf.model.Property VIEW_COUNT_UPDATED
      The instant VIEW_COUNT was last recomputed, within USAGE.
  • Method Details

    • getResource

      public static org.apache.jena.rdf.model.Resource getResource(String name)
      Returns the resource with the given name in the Cortex namespace.
      Parameters:
      name - the local name of the resource
      Returns:
      the resource named cortex://<name>
    • getResource

      public static org.apache.jena.rdf.model.Resource getResource()
      Returns a fresh, randomly named branch resource.
      Returns:
      a resource named cortex://branch-<uuid>