Record Class CortexProperties

java.lang.Object
java.lang.Record
ai.chatur.cortex.spring.CortexProperties
Record Components:
persistent - whether the approved assertions are persisted to a TDB2 store on disk; when false (the default) they are held in memory. Either way, the inference closure and the full-text index built over it are always an in-memory cache, rebuilt from the assertions on every startup.
assertionsLocation - the directory of the TDB2 store for assertions, used when persistent
ontologies - the ontologies the knowledge graph is built on, in Turtle syntax, merged in order
shapes - the SHACL shapes ingested assertions are validated against, in Turtle syntax, merged in order
rules - the Jena rules used for inference, concatenated in order
search - the full-text search settings
web - the web UI settings
mcp - the MCP server settings
s3 - the S3 client settings
backup - the scheduled backup settings
restore - the restore-on-startup settings

@ConfigurationProperties(prefix="cortex") public record CortexProperties(boolean persistent, String assertionsLocation, List<org.springframework.core.io.Resource> ontologies, List<org.springframework.core.io.Resource> shapes, List<org.springframework.core.io.Resource> rules, CortexProperties.Search search, CortexProperties.Web web, CortexProperties.Mcp mcp, CortexProperties.S3 s3, CortexProperties.Backup backup, CortexProperties.Restore restore) extends Record
Configuration properties for Cortex, bound to the cortex.* prefix.
  • Constructor Details

    • CortexProperties

      public CortexProperties(@DefaultValue("false") boolean persistent, @DefaultValue(".cortex/db") String assertionsLocation, @DefaultValue("classpath:ontology.ttl") List<org.springframework.core.io.Resource> ontologies, @DefaultValue("classpath:ontology.shapes") List<org.springframework.core.io.Resource> shapes, @DefaultValue("classpath:ontology.rules") List<org.springframework.core.io.Resource> rules, @DefaultValue CortexProperties.Search search, @DefaultValue CortexProperties.Web web, @DefaultValue CortexProperties.Mcp mcp, @DefaultValue CortexProperties.S3 s3, @DefaultValue CortexProperties.Backup backup, @DefaultValue CortexProperties.Restore restore)
      Creates an instance of a CortexProperties record class.
      Parameters:
      persistent - the value for the persistent record component
      assertionsLocation - the value for the assertionsLocation record component
      ontologies - the value for the ontologies record component
      shapes - the value for the shapes record component
      rules - the value for the rules record component
      search - the value for the search record component
      web - the value for the web record component
      mcp - the value for the mcp record component
      s3 - the value for the s3 record component
      backup - the value for the backup record component
      restore - the value for the restore record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • persistent

      public boolean persistent()
      Returns the value of the persistent record component.
      Returns:
      the value of the persistent record component
    • assertionsLocation

      public String assertionsLocation()
      Returns the value of the assertionsLocation record component.
      Returns:
      the value of the assertionsLocation record component
    • ontologies

      public List<org.springframework.core.io.Resource> ontologies()
      Returns the value of the ontologies record component.
      Returns:
      the value of the ontologies record component
    • shapes

      public List<org.springframework.core.io.Resource> shapes()
      Returns the value of the shapes record component.
      Returns:
      the value of the shapes record component
    • rules

      public List<org.springframework.core.io.Resource> rules()
      Returns the value of the rules record component.
      Returns:
      the value of the rules record component
    • search

      public CortexProperties.Search search()
      Returns the value of the search record component.
      Returns:
      the value of the search record component
    • web

      public CortexProperties.Web web()
      Returns the value of the web record component.
      Returns:
      the value of the web record component
    • mcp

      public CortexProperties.Mcp mcp()
      Returns the value of the mcp record component.
      Returns:
      the value of the mcp record component
    • s3

      public CortexProperties.S3 s3()
      Returns the value of the s3 record component.
      Returns:
      the value of the s3 record component
    • backup

      public CortexProperties.Backup backup()
      Returns the value of the backup record component.
      Returns:
      the value of the backup record component
    • restore

      public CortexProperties.Restore restore()
      Returns the value of the restore record component.
      Returns:
      the value of the restore record component