Record Class BranchStatement

java.lang.Object
java.lang.Record
ai.chatur.cortex.BranchStatement
Record Components:
predicate - the predicate in prefixed short form, for display
predicateUri - the full predicate IRI
object - the object: the full IRI of a resource, or the lexical form of a literal
literal - whether the object is a literal
datatype - the datatype IRI of a literal object, or null for a resource

public record BranchStatement(String predicate, String predicateUri, String object, boolean literal, String datatype) extends Record
A statement staged on a branch, carrying the raw node values needed to round-trip edits back to the staged graph.
  • Constructor Details

    • BranchStatement

      public BranchStatement(String predicate, String predicateUri, String object, boolean literal, String datatype)
      Creates an instance of a BranchStatement record class.
      Parameters:
      predicate - the value for the predicate record component
      predicateUri - the value for the predicateUri record component
      object - the value for the object record component
      literal - the value for the literal record component
      datatype - the value for the datatype 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.
    • predicate

      public String predicate()
      Returns the value of the predicate record component.
      Returns:
      the value of the predicate record component
    • predicateUri

      public String predicateUri()
      Returns the value of the predicateUri record component.
      Returns:
      the value of the predicateUri record component
    • object

      public String object()
      Returns the value of the object record component.
      Returns:
      the value of the object record component
    • literal

      public boolean literal()
      Returns the value of the literal record component.
      Returns:
      the value of the literal record component
    • datatype

      public String datatype()
      Returns the value of the datatype record component.
      Returns:
      the value of the datatype record component