@classmethod
def from_node(cls, node: BaseNode, store: PropertyGraphStore):
triple_str = node.node.text.split(" -> ")
source_id = triple_str[0].strip()
target_id = triple_str[2].strip()
relation = triple_str[1].strip()
source_node_type, source_node_id = from_global_id(source_id)
target_node_type, target_node_id = from_global_id(target_id)
source_node = store.get(properties={'id': source_id})[0]
target_node = store.get(properties={'id': target_id})[0]
debug_text = f'{source_node_type}:{json.dumps(source_node.properties)} -> {relation} -> {target_node_type}:{json.dumps(target_node.properties)}'
return cls(source_node=source_node,
target_node=target_node,
text=debug_text)
where the IDs in question are encoded
datatype:model_id
strings