Package ai.chatur.cortex
Record Class IngestResult
java.lang.Object
java.lang.Record
ai.chatur.cortex.IngestResult
- Record Components:
valid- whether the assertions pass the lint check against the ontology and conform to the configured SHACL shapesbranch- the name of the branch the assertions were staged on, ornullif validation failed or every assertion was already approved and nothing remained to stageerrors- the lint violations or the SHACL validation report, ornullif validation passed
The outcome of
ingesting assertions into the knowledge graph.
Exactly three combinations of the two nullable components occur: valid=true,
branch!=null when at least one novel statement was staged for review; valid=true,
branch=null when validation passed but every assertion already existed in the graph, so nothing
was staged; and valid=false, errors!=null when validation failed. branch == null
is therefore ambiguous on its own between "validation failed" and "nothing novel to stage" —
always read it together with valid. No type here enforces this; a sealed interface with
one case per outcome would, at the cost of a larger API surface for callers to switch over.
-
Constructor Summary
ConstructorsConstructorDescriptionIngestResult(boolean valid, String branch, String errors) Creates an instance of aIngestResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbranch()Returns the value of thebranchrecord component.final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanvalid()Returns the value of thevalidrecord component.
-
Constructor Details
-
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 '=='. -
valid
public boolean valid()Returns the value of thevalidrecord component.- Returns:
- the value of the
validrecord component
-
branch
Returns the value of thebranchrecord component.- Returns:
- the value of the
branchrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-