3 (defun triples-given-beginning (node)
4 "Get triples outbound from the given NODE."
7 (and (equal (get-content (get-source id
)) node
)
8 (ground-p (get-source (get-source id
)))
9 (ground-p (get-source (get-sink id
)))
10 (ground-p (get-sink (get-source id
)))
11 (ground-p (get-sink (get-sink id
)))))))
13 (defun triples-given-end (node)
14 "Get triples inbound into NODE."
17 (and (equal (get-content (get-sink id
)) node
)
18 (ground-p (get-source (get-source id
)))
19 (ground-p (get-source (get-sink id
)))
20 (ground-p (get-sink (get-source id
)))
21 (ground-p (get-sink (get-sink id
)))))))
23 (defun triples-given-middle (edge)
24 "Get the triples that run along EDGE."
27 (and (equal (get-content id
) edge
)
28 (ground-p (get-source (get-source id
)))
29 (ground-p (get-source (get-sink id
)))
30 (ground-p (get-sink (get-source id
)))
31 (ground-p (get-sink (get-sink id
)))))))
33 (defun triples-given-middle-and-end (edge node
)
34 "Get the triples that run along EDGE into NODE."
37 (and (equal (get-content id
) edge
)
38 (equal (get-content (get-sink id
) node
))
39 (ground-p (get-source (get-source id
)))
40 (ground-p (get-source (get-sink id
)))
41 (ground-p (get-sink (get-source id
)))
42 (ground-p (get-sink (get-sink id
)))))))
44 (defun triples-given-beginning-and-middle (node edge
)
45 "Get the triples that run from NODE along EDGE."
48 (and (equal (get-content (get-source id
)) node
)
49 (equal (get-content id
) edge
)
50 (ground-p (get-source (get-source id
)))
51 (ground-p (get-source (get-sink id
)))
52 (ground-p (get-sink (get-source id
)))
53 (ground-p (get-sink (get-sink id
)))))))
55 (defun triples-given-beginning-and-end (node1 node2
)
56 "Get the triples that run from NODE1 to NODE2. Optional
57 argument VIEW causes the results to be selected
58 into a view with that name."
61 (and (equal (get-content (get-source id
)) node1
)
62 (equal (get-content (get-sink id
) node2
))
63 (ground-p (get-source (get-source id
)))
64 (ground-p (get-source (get-sink id
)))
65 (ground-p (get-sink (get-source id
)))
66 (ground-p (get-sink (get-sink id
)))))))
68 (defun triple-exact-match (node1 edge node2
)
69 "Get the triples that run from NODE1 along EDGE to
73 (and (equal (get-content (get-source id
)) node1
)
74 (equal (get-content id
) edge
)
75 (equal (get-content (get-sink id
)) node2
)
76 (ground-p (get-source (get-source id
)))
77 (ground-p (get-source (get-sink id
)))
78 (ground-p (get-sink (get-source id
)))
79 (ground-p (get-sink (get-sink id
)))))))