Package ai.chatur.cortex.core.branch
Record Class MergeResult
java.lang.Object
java.lang.Record
ai.chatur.cortex.core.branch.MergeResult
- Record Components:
added- the newly approved assertions, empty if every staged statement was already approvedretracted- whether the merge removed any statement from the knowledge graph
What approving a branch did to the knowledge graph.
retracted is what the caller needs to keep the inference closure honest: the closure
can be extended with newly approved statements incrementally, but it cannot be shrunk
that way, so a merge that removed anything has to be followed by a full recomputation.
-
Constructor Summary
ConstructorsConstructorDescriptionMergeResult(org.apache.jena.rdf.model.Model added, boolean retracted) Creates an instance of aMergeResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.rdf.model.Modeladded()Returns the value of theaddedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theretractedrecord component.final StringtoString()Returns a string representation of this record class.
-
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 '=='. -
added
public org.apache.jena.rdf.model.Model added()Returns the value of theaddedrecord component.- Returns:
- the value of the
addedrecord component
-
retracted
public boolean retracted()Returns the value of theretractedrecord component.- Returns:
- the value of the
retractedrecord component
-