1 | -- |
---|
2 | -- Copyright (C) 2013 DASISH |
---|
3 | -- |
---|
4 | -- This program is free software; you can redistribute it and/or |
---|
5 | -- |
---|
6 | -- Copyright (C) 2013 DASISH |
---|
7 | -- |
---|
8 | -- This program is free software; you can redistribute it and/or |
---|
9 | -- modify it under the terms of the GNU General Public License |
---|
10 | -- as published by the Free Software Foundation; either version 2 |
---|
11 | -- of the License, or (at your option) any later version. |
---|
12 | -- |
---|
13 | -- This program is distributed in the hope that it will be useful, |
---|
14 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | -- GNU General Public License for more details. |
---|
17 | -- |
---|
18 | -- You should have received a copy of the GNU General Public License |
---|
19 | -- along with this program; if not, write to the Free Software |
---|
20 | -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
21 | -- |
---|
22 | |
---|
23 | |
---|
24 | INSERT INTO access(access_mode) VALUES ('write'); |
---|
25 | INSERT INTO access(access_mode) VALUES ('read'); |
---|
26 | INSERT INTO access(access_mode) VALUES ('none'); |
---|
27 | INSERT INTO access(access_mode) VALUES ('all'); |
---|
28 | |
---|
29 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Twan', '00000000-0000-0000-0000-000000000111', 'twagoo@mpi.nl', 'Twan.Goosen@mpi.nl', 'developer'); --1 |
---|
30 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Peter', '00000000-0000-0000-0000-000000000112', 'petwit@mpi.nl', 'Peter.Withers@mpi.nl', 'developer'); -- 2 |
---|
31 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Olha', '00000000-0000-0000-0000-000000000113', 'olhsha@mpi.nl', 'Olha.Shakaravska@mpi.nl', 'admin'); -- 3 |
---|
32 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Eric', '00000000-0000-0000-0000-000000000114', 'ericaprincipal@mpi.nl', 'Eric.Auer@mpi.nl', 'developer'); -- 4 |
---|
33 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Daan', '00000000-0000-0000-0000-000000000115', 'broeder@mpi.ml', 'Daan.Broeder@mpi.nl', 'developer'); --5 |
---|
34 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Menzo', '00000000-0000-0000-0000-000000000116', 'menwin@mpi.nl', 'Menzo.Windhouwer@mpi.nl', 'developer'); -- 6 |
---|
35 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Przemek', '00000000-0000-0000-0000-000000000117', 'przlen@mpi,nl', 'Przemek.Lenkiewicz@mpi.nl', 'principal'); -- 7 |
---|
36 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Stephanie', '00000000-0000-0000-0000-000000000118', 'gusrotst@gu.se', 'stephanie.roth@gu.se', 'developer'); -- 8 |
---|
37 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Olof', '00000000-0000-0000-0000-000000000119', 'gusolsol@gu.se', 'olof.olsson.2@gu.se', 'developer'); -- 9 |
---|
38 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Willem', '00000000-0000-0000-0000-000000000220', 'wilelb@mpi.nl', 'Willem.Elbers@mpi.nl', 'developer'); -- 10 |
---|
39 | INSERT INTO principal (principal_name, external_id, remote_id, e_mail, account) VALUES ('Olaf', '00000000-0000-0000-0000-000000000221', 'olasei@mpi.nl', 'Olaf.Seibert@mpi.nl', 'developer'); -- 11 |
---|
40 | |
---|
41 | |
---|
42 | INSERT INTO notebook (title, owner_id, external_id, last_modified) VALUES ('Notebook 1', 1, '00000000-0000-0000-0000-000000000011', '2013-08-12 09:25:00.383'); -- 1 |
---|
43 | INSERT INTO notebook (title, owner_id, external_id) VALUES ('Notebook 2', 2, '00000000-0000-0000-0000-000000000012'); --2 |
---|
44 | INSERT INTO notebook (title, owner_id, external_id) VALUES ('Notebook 3', 3, '00000000-0000-0000-0000-000000000013'); --3 |
---|
45 | INSERT INTO notebook (title, owner_id, external_id) VALUES ('Notebook 4', 3, '00000000-0000-0000-0000-000000000014'); --4 |
---|
46 | |
---|
47 | INSERT INTO annotation (owner_id, headline,body_text, body_mimetype, external_id, last_modified, is_xml, public_) VALUES (1, 'Sagrada Famiglia','<html><body>some html 1</body></html>', 'text/html' , '00000000-0000-0000-0000-000000000021', '2013-08-12 09:25:00.383', false, 'write'); --1 |
---|
48 | INSERT INTO annotation (owner_id, headline,body_text, body_mimetype, external_id, last_modified, is_xml, public_) VALUES (2, 'Gaudi','<html><body>some html 2</body></html>', 'text/html' , '00000000-0000-0000-0000-000000000022', '2013-08-12 10:30:00.383', false, 'read'); --2 |
---|
49 | INSERT INTO annotation (owner_id, headline,body_text, body_mimetype, external_id, last_modified, is_xml, public_) VALUES (3, 'Art Nuveau','some plain text', 'text/plain' , '00000000-0000-0000-0000-000000000023', '2013-08-12 11:30:00.383', false, 'all'); --3 |
---|
50 | INSERT INTO annotation (owner_id, headline,body_text, body_mimetype, external_id, is_xml) VALUES (3, 'Annotation to delete','<html><body>some html 4</body></html>', 'text/html' , '00000000-0000-0000-0000-000000000024',false); --4 |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | INSERT INTO notebooks_annotations (notebook_id,annotation_id) VALUES (1,1); |
---|
55 | INSERT INTO notebooks_annotations (notebook_id,annotation_id) VALUES (1,2); |
---|
56 | INSERT INTO notebooks_annotations (notebook_id,annotation_id) VALUES (2,3); |
---|
57 | INSERT INTO notebooks_annotations (notebook_id,annotation_id) VALUES (4,3); |
---|
58 | |
---|
59 | |
---|
60 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000031', 'http://nl.wikipedia.org/wiki/Sagrada_Fam%C3%ADlia', 'version 1.0', 'de_Opdracht'); -- 1 |
---|
61 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000032', 'http://nl.wikipedia.org/wiki/Antoni_Gaud%C3%AD', 'version 1.1', 'Vroege_werk'); --2 |
---|
62 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000033', 'http://en.wikipedia.org/wiki/Art_Nouveau', 'june 1013', 'Spain'); --3 |
---|
63 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000034', '???', 'back up', '1111'); --4 |
---|
64 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000035', '???', 'back up', '111111'); --5 |
---|
65 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000036', '???', 'version 2.0', '1111111'); --6 not used by any annotation |
---|
66 | INSERT INTO target (external_id, link_uri, version, fragment_descriptor) VALUES ('00000000-0000-0000-0000-000000000037', '???', 'version 2.0', '11111111'); --7 |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (1, 1); |
---|
71 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (1, 2); |
---|
72 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (2, 2); |
---|
73 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (3, 3); |
---|
74 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (4, 3); -- Target 3 should not be deleted when annot 4 is deleted |
---|
75 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (4, 4); -- Target 4 to be deleted when annot 4 is deleted |
---|
76 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (3, 5); |
---|
77 | INSERT INTO annotations_targets (annotation_id, target_id) VALUES (3, 7); |
---|
78 | |
---|
79 | -- HSQL --- |
---|
80 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000051', 'image/png', 'screen-shot', 'image', NULL); --1 |
---|
81 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000052', 'text/html', 'vi', 'text', X'1002'); -- 2 |
---|
82 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000053', 'image/png', 'screenshooter', 'image', NULL); -- 3 |
---|
83 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000054', 'image/png', 'screen-shot', 'image', NULL); --4 |
---|
84 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000055', 'image/jpg', 'photomaster', 'image', X'1005'); --5 |
---|
85 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000056', 'text/plain', 'some tool', 'text', X'1006'); --6 not used |
---|
86 | INSERT INTO cached_representation (external_id, mime_type, tool, type_, file_) VALUES ('00000000-0000-0000-0000-000000000057', 'text/html', 'some tool 2', 'text', X'3132'); --7 |
---|
87 | |
---|
88 | -- PostgreSQL -- |
---|
89 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000051', 'image/png', 'some tool 1', 'image'); --1 |
---|
90 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000052', 'image/png', 'some tool 2', 'image'); -- 2 |
---|
91 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000053', 'image/png', 'some tool 3', 'image'); -- 3 |
---|
92 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000054', 'image/png', 'some tool 4', 'image'); --4 |
---|
93 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000055', 'image/png', 'some tool 5', 'image'); --5 |
---|
94 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000056', 'image/png', 'some tool 6', 'image'); --6 not used |
---|
95 | -- INSERT INTO cached_representation (external_id, mime_type, tool, type_) VALUES ('00000000-0000-0000-0000-000000000057', 'image/png', 'some tool 7', 'image'); --7 |
---|
96 | |
---|
97 | |
---|
98 | |
---|
99 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (1, 1, 'De Opdracht'); |
---|
100 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (1, 2, '(0,0)'); |
---|
101 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (2, 3, 'Vroeger Werk'); |
---|
102 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (3, 4, 'Spain'); |
---|
103 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (4, 5, '(1,1)'); |
---|
104 | INSERT INTO targets_cached_representations (target_id, cached_representation_id, fragment_descriptor_in_cached) VALUES (5, 7, '(0,1)'); |
---|
105 | |
---|
106 | |
---|
107 | ---- ACCESS-------------------------------------------------------------------------------------------- |
---|
108 | |
---|
109 | |
---|
110 | |
---|
111 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (1, 2, 'write'); |
---|
112 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (1, 3, 'read'); |
---|
113 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (1, 11, 'read'); |
---|
114 | |
---|
115 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (2, 1, 'read'); |
---|
116 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (2, 3, 'write'); |
---|
117 | |
---|
118 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (3, 1, 'read'); |
---|
119 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (3, 2, 'read'); |
---|
120 | |
---|
121 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (4, 2, 'write'); |
---|
122 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (4, 1, 'all'); |
---|
123 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (4, 3, 'none'); |
---|
124 | INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (4, 11, 'none'); |
---|
125 | -- checking integrity control: |
---|
126 | -- INSERT INTO annotations_principals_accesses (annotation_id, principal_id, access_) VALUES (5, 5, 'read'); |
---|
127 | |
---|
128 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (1, 2, 'write'); |
---|
129 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (1, 3, 'read'); |
---|
130 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (1, 4, 'write'); |
---|
131 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (1, 5, 'read'); |
---|
132 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (1, 11, 'read'); |
---|
133 | |
---|
134 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (2, 1, 'read'); |
---|
135 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (2, 3, 'write'); |
---|
136 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (2, 11, 'read'); |
---|
137 | |
---|
138 | |
---|
139 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (4, 2, 'write'); |
---|
140 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (4, 1, 'write'); |
---|
141 | INSERT INTO notebooks_principals_accesses (notebook_id, principal_id, access_) VALUES (4, 11, 'read'); |
---|