forked from adamwight/ores-diagrams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jade_entities.tex
84 lines (77 loc) · 2.94 KB
/
jade_entities.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
% Meta-ORES entities and their relationships.
\documentclass{article}
\usepackage{tikz}
\usepackage[strict]{changepage}
\usetikzlibrary{arrows,shapes}
% Disable page number for better SVG.
\pagenumbering{gobble}
\begin{document}
\begin{adjustwidth}{-7em}{}
\begin{tikzpicture}[
font=\sffamily,
every matrix/.style={ampersand replacement=\&, column sep=1cm, row sep=1.5cm, fill=white},
entity/.style={draw, ellipse, thick, inner sep=1em},
other-entity/.style={draw, ellipse, thick, inner sep=1em, dashed},
arrow/.style={->, >=stealth', shorten >=1pt, semithick, font=\sffamily\footnotesize},
line/.style={-, semithick, font=\sffamily\footnotesize},
every node/.style={align=center}]
% TODO: dashed boxes for regions: wiki entity, judgment, discussion
% Position the nodes using a matrix layout
\matrix{
\node[other-entity] (previous) {previous revision};
\& \node[entity] (artifact) {Wiki page \\ at revision \\ or diff};
\& \node[other-entity] (next) {next revision}; \\
\node[entity] (ores-scores) {ORES score \\ article quality, \\ edit quality};
\& \& \node[entity] (judgment) {JADE judgment \\ \{author: Awight \\ visibility: all \\ rank: normal\}}; \\
\node[entity] (score1) {Score \\ \{good-faith: no\}};
\& \node[entity] (score2) {Score \\ \{damaging: yes\}};
\& \node[entity] (comment) {Flow post}; \\
\node[entity] (schema1) {Schema: good-faith};
\& \node[entity] (schema2) {Schema: damaging}; \\
};
% Draw the lines between the nodes and label them.
\draw[line] (ores-scores) --
node[very near start, left] {0..*}
node[very near start, right] {scores}
node[very near end, left] {1}
node[very near end, below] {regarding}
(artifact);
\draw[line] (judgment) --
node[very near start, left] {0..*}
node[very near start, right] {judgments}
node[very near end, right] {1}
node[very near end, below] {regarding}
(artifact);
\draw[line] (previous) -- (artifact);
\draw[line] (artifact) -- (next);
\draw[line] (score1) --
node[very near start, left] {0..*}
node[very near start, right] {scores}
node[very near end, left] {1}
node[very near end, right] {judgment}
(judgment);
\draw[line] (score2) --
node[very near start, left] {0..*}
node[very near end, left] {1}
(judgment);
\draw[line] (comment) --
node[very near start, left] {0..1}
node[very near start, right] {comment}
node[very near end, left] {1}
node[very near end, right] {judgment}
(judgment);
\draw[line] (schema1) --
node[very near start, left] {1}
node[very near start, right] {schema}
node[very near end, left] {0..*}
node[very near end, right] {scores}
(score1);
\draw[line] (schema2) --
node[very near start, left] {1}
node[very near end, left] {0..*}
(score2);
\node [below=1cm, align=flush center] at (schema2)
{\Large JADE \\ \normalsize object graph};
\end{tikzpicture}
\end{adjustwidth}
\end{document}