Package ai.chatur.cortex.spring
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; whenfalse(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 persistentontologies- the ontologies the knowledge graph is built on, in Turtle syntax, merged in ordershapes- the SHACL shapes ingested assertions are validated against, in Turtle syntax, merged in orderrules- the Jena rules used for inference, concatenated in ordersearch- the full-text search settingsweb- the web UI settingsmcp- the MCP server settingss3- the S3 client settingsbackup- the scheduled backup settingsrestore- 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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordSettings for the scheduled backup job auto-configured byCortexBackupAutoConfiguration.static final recordSettings for the MCP server auto-configured byCortexMcpAutoConfiguration.static final recordSettings for the restore-on-startup step auto-configured byCortexRestoreAutoConfiguration.static final recordSettings for the S3 client auto-configured byCortexBackupAutoConfiguration, used to upload backups.static final recordSettings for full-text search ranking.static final recordSettings for the web UI auto-configured byCortexWebAutoConfiguration. -
Constructor Summary
ConstructorsConstructorDescriptionCortexProperties(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) Creates an instance of aCortexPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassertionsLocationrecord component.backup()Returns the value of thebackuprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mcp()Returns the value of themcprecord component.List<org.springframework.core.io.Resource> Returns the value of theontologiesrecord component.booleanReturns the value of thepersistentrecord component.restore()Returns the value of therestorerecord component.List<org.springframework.core.io.Resource> rules()Returns the value of therulesrecord component.s3()Returns the value of thes3record component.search()Returns the value of thesearchrecord component.List<org.springframework.core.io.Resource> shapes()Returns the value of theshapesrecord component.final StringtoString()Returns a string representation of this record class.web()Returns the value of thewebrecord component.
-
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 aCortexPropertiesrecord class.- Parameters:
persistent- the value for thepersistentrecord componentassertionsLocation- the value for theassertionsLocationrecord componentontologies- the value for theontologiesrecord componentshapes- the value for theshapesrecord componentrules- the value for therulesrecord componentsearch- the value for thesearchrecord componentweb- the value for thewebrecord componentmcp- the value for themcprecord components3- the value for thes3record componentbackup- the value for thebackuprecord componentrestore- the value for therestorerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
persistent
public boolean persistent()Returns the value of thepersistentrecord component.- Returns:
- the value of the
persistentrecord component
-
assertionsLocation
Returns the value of theassertionsLocationrecord component.- Returns:
- the value of the
assertionsLocationrecord component
-
ontologies
Returns the value of theontologiesrecord component.- Returns:
- the value of the
ontologiesrecord component
-
shapes
Returns the value of theshapesrecord component.- Returns:
- the value of the
shapesrecord component
-
rules
Returns the value of therulesrecord component.- Returns:
- the value of the
rulesrecord component
-
search
Returns the value of thesearchrecord component.- Returns:
- the value of the
searchrecord component
-
web
Returns the value of thewebrecord component.- Returns:
- the value of the
webrecord component
-
mcp
Returns the value of themcprecord component.- Returns:
- the value of the
mcprecord component
-
s3
Returns the value of thes3record component.- Returns:
- the value of the
s3record component
-
backup
Returns the value of thebackuprecord component.- Returns:
- the value of the
backuprecord component
-
restore
Returns the value of therestorerecord component.- Returns:
- the value of the
restorerecord component
-