/ doc / views /
/doc/views/actor_actees_w_baboons.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
3 "http://www.oasis-open.org/docbook/xml/5.0/dtd/docbook.dtd" [
4 <!-- Use symbols for repeating text. -->
5 <!ENTITY % entities SYSTEM "../entities">
6 %entities;
7 <!ENTITY % constants SYSTEM "../constants">
8 %constants;
9 ]>
10 <!-- Copyright (C) 2013, 2018 The Meme Factory, Inc. http://www.meme.com
11 - Copyright (C) 2005, 2007, 2010 Karl O. Pinc <kop@meme.com> and others
12 - See document output for full copyright information. -->
13
14 <!-- Core documentation on the ACTOR_ACTEES_W_BABOONS view.
15
16 - This is indeed the query that makes the view, so don't break it!
17
18 - The "code" element must have a 'role="view"' attribute
19 - so that Gombe-MI code generation can get the code
20 - and actually make the view!
21 -->
22
23 <para xmlns="http://docbook.org/ns/docbook"
24 version="5.0">
25
26 <figure xml:id="actor_actees_w_baboons-code-part1">
27 <title>Query Defining the ACTOR_ACTEES_W_BABOONS View: Part I</title>
28 <literallayout>
29 <code role="view">SELECT events.eid AS eid
30 , events.intid AS intid
31 , actors.pid AS actorpid
32 , actees.pid AS acteepid
33 , events.behavior AS behavior
34 , events.position AS position
35 , events.uncertain AS uncertain
36 , followrole(intervals.followid, actors.participant) AS actorrole
37 , FALSE AS baboonactor
38 , actors.participant AS actor
39 , followrole(intervals.followid, actees.participant) AS acteerole
40 , FALSE AS baboonactee
41 , actees.participant AS actee
42 , events.comment AS comment
43 FROM events
44 JOIN intervals
45 ON (intervals.intid = events.intid)
46 JOIN parts AS actors
47 ON (actors.eid = events.eid)
48 JOIN parts AS actees
49 ON (actees.eid = events.eid)
50 WHERE actors.part = 'gmi_actor'
51 AND actees.part = 'gmi_actee'
52 UNION
53 SELECT events.eid AS eid
54 , events.intid AS intid
55 , actors.pid AS actorpid
56 , NULL AS acteepid
57 , events.behavior AS behavior
58 , events.position AS position
59 , events.uncertain AS uncertain
60 , followrole(intervals.followid, actors.participant) AS actorrole
61 , FALSE AS baboonactor
62 , actors.participant AS actor
63 , 'NF' AS acteerole
64 , TRUE AS baboonactee
65 , NULL::VARCHAR(gmi_animid_len) AS actee
66 , events.comment AS comment
67 FROM events
68 JOIN intervals
69 ON (intervals.intid = events.intid)
70 JOIN parts AS actors
71 ON (actors.eid = events.eid)
72 WHERE actors.part = 'gmi_actor'
73 AND events.baboon
74 </code></literallayout>
75 </figure>
76 <figure xml:id="actor_actees_w_baboons-code-part2">
77 <title>Query Defining the ACTOR_ACTEES_W_BABOONS View: Part II</title>
78 <literallayout><code role="view">UNION
79 SELECT events.eid AS eid
80 , events.intid AS intid
81 , NULL AS actorpid
82 , actees.pid AS acteepid
83 , events.behavior AS behavior
84 , events.position AS position
85 , events.uncertain AS uncertain
86 , 'NF' AS actorrole
87 , TRUE AS baboonactor
88 , NULL::VARCHAR(gmi_animid_len) AS actor
89 , followrole(intervals.followid, actees.participant) AS acteerole
90 , FALSE AS baboonactee
91 , actees.participant AS actee
92 , events.comment AS comment
93 FROM events
94 JOIN intervals
95 ON (intervals.intid = events.intid)
96 JOIN parts AS actees
97 ON (actees.eid = events.eid)
98 WHERE actees.part = 'gmi_actee'
99 AND events.baboon</code><code>;</code></literallayout>
100 </figure>
101
102 <!-- Figure containing ACTOR_ACTEES_W_BABOONS view diagram. -->
103
104 <!-- Use mediaobject role attribute to select either xhtml (html)
105 or pdf (dblatex) file paths. -->
106
107 <figure xml:id="actor_actees_w_baboons-erd">
108 <title>Entity Relationship Diagram of the ACTOR_ACTEES_W_BABOONS View</title>
109 <mediaobject>
110 <imageobject role="html">
111 <imagedata scalefit="1" width="6in"
112 fileref="/doc/diagrams/actor_actees_w_baboons.png" format="PNG" />
113 </imageobject>
114 <imageobject role="dblatex">
115 <imagedata scalefit="1" width="6in"
116 fileref="/diagrams/actor_actees_w_baboons.eps" format="EPS" />
117 </imageobject>
118
119 <textobject> <phrase>If we could we would display here the
120 diagram showing how the ACTOR_ACTEES_W_BABOONS view is constructed.</phrase>
121 </textobject>
122 </mediaobject>
123 </figure>
124 </para>
125 <!--
126 Local Variables:
127 mode: xml
128 End:
129 -->