Edge

org.llm4s.knowledgegraph.Edge
case class Edge(source: String, target: String, relationship: String, properties: Map[String, Value])

Represents an edge (relationship) between two nodes.

Value parameters

properties

Additional attributes of the relationship (preserves JSON types)

relationship

The type of relationship (e.g., "WORKS_FOR", "LOCATED_IN")

source

The ID of the source node

target

The ID of the target node

Attributes

Example
val worksFor = Edge("alice", "acme", "WORKS_FOR")
val located = Edge("acme", "sf", "LOCATED_IN", Map("since" -> ujson.Str("2020")))
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product