rtm-ontopia 0.3.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/DISCLAIMER +15 -0
- data/LICENSE +201 -0
- data/README +8 -0
- data/lib/rtm-ontopia.rb +4 -0
- data/lib/rtm/ontopia.rb +271 -0
- data/lib/rtm/ontopia/io/to_cxtm.rb +40 -0
- data/lib/rtm/ontopia/javalibs/antlr-2.7.7.jar +0 -0
- data/lib/rtm/ontopia/javalibs/avalon-framework-4.1.3.jar +0 -0
- data/lib/rtm/ontopia/javalibs/backport-util-concurrent-3.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/commons-dbcp-1.3.jar +0 -0
- data/lib/rtm/ontopia/javalibs/commons-fileupload-1.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/commons-io-1.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/commons-pool-1.5.4.jar +0 -0
- data/lib/rtm/ontopia/javalibs/concurrent-1.3.4.jar +0 -0
- data/lib/rtm/ontopia/javalibs/dom4j-1.6.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/fontbox-1.1.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/geronimo-stax-api_1.0_spec-1.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/icu4j-3.4.4.jar +0 -0
- data/lib/rtm/ontopia/javalibs/iri-0.8.jar +0 -0
- data/lib/rtm/ontopia/javalibs/java-getopt-1.0.9.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jempbox-1.1.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jena-2.6.2.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jflex-1.4.3.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jgroups-2.6.10.GA.jar +0 -0
- data/lib/rtm/ontopia/javalibs/joda-time-1.6.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jsp-api-2.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jstl-1.1.2.jar +0 -0
- data/lib/rtm/ontopia/javalibs/jtidy-r8-20060801.jar +0 -0
- data/lib/rtm/ontopia/javalibs/logkit-1.0.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/ontopia-engine-5.1.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/ontopia-mio-0.1.0-SNAPSHOT.jar +0 -0
- data/lib/rtm/ontopia/javalibs/opencsv-1.8.jar +0 -0
- data/lib/rtm/ontopia/javalibs/pdfbox-1.1.0.jar +0 -0
- data/lib/rtm/ontopia/javalibs/poi-3.6.jar +0 -0
- data/lib/rtm/ontopia/javalibs/poi-ooxml-3.6.jar +0 -0
- data/lib/rtm/ontopia/javalibs/poi-ooxml-schemas-3.6.jar +0 -0
- data/lib/rtm/ontopia/javalibs/poi-scratchpad-3.6.jar +0 -0
- data/lib/rtm/ontopia/javalibs/saxon-6.5.3.jar +0 -0
- data/lib/rtm/ontopia/javalibs/servlet-api-2.4.jar +0 -0
- data/lib/rtm/ontopia/javalibs/standard-1.1.2.jar +0 -0
- data/lib/rtm/ontopia/javalibs/stax-api-1.0.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/tagsoup-1.2.jar +0 -0
- data/lib/rtm/ontopia/javalibs/velocity-1.3.jar +0 -0
- data/lib/rtm/ontopia/javalibs/wicket-1.4.8.jar +0 -0
- data/lib/rtm/ontopia/javalibs/wicket-datetime-1.4.8.jar +0 -0
- data/lib/rtm/ontopia/javalibs/wicket-extensions-1.4.8.jar +0 -0
- data/lib/rtm/ontopia/javalibs/xercesImpl-2.7.1.jar +0 -0
- data/lib/rtm/ontopia/javalibs/xml-apis-1.0.b2.jar +0 -0
- data/lib/rtm/ontopia/javalibs/xmlbeans-2.3.0.jar +0 -0
- data/lib/rtm/ontopia/ontopia_example.props +14 -0
- data/lib/rtm/ontopia/rdbms/properties.rb +149 -0
- data/lib/rtm/ontopia/rdbms/store.rb +39 -0
- data/res/rdbms/config/db.h2.props +8 -0
- data/res/rdbms/config/db.mysql.props +8 -0
- data/res/rdbms/config/db.oracle8.props +8 -0
- data/res/rdbms/config/db.oracle9i.props +8 -0
- data/res/rdbms/config/db.postgresql.props +8 -0
- data/res/rdbms/config/db.sqlserver.props +8 -0
- data/res/rdbms/setup/generic.create.sql +154 -0
- data/res/rdbms/setup/generic.drop.sql +16 -0
- data/res/rdbms/setup/h2.create.sql +154 -0
- data/res/rdbms/setup/h2.drop.sql +16 -0
- data/res/rdbms/setup/mysql.create.sql +170 -0
- data/res/rdbms/setup/mysql.drop.sql +16 -0
- data/res/rdbms/setup/mysql.force_drop.sql +16 -0
- data/res/rdbms/setup/oracle10g.create.sql +202 -0
- data/res/rdbms/setup/oracle10g.drop.sql +59 -0
- data/res/rdbms/setup/oracle8.create.sql +202 -0
- data/res/rdbms/setup/oracle8.drop.sql +59 -0
- data/res/rdbms/setup/oracle9i.create.sql +202 -0
- data/res/rdbms/setup/oracle9i.drop.sql +59 -0
- data/res/rdbms/setup/postgresql.create.sql +191 -0
- data/res/rdbms/setup/postgresql.drop.sql +53 -0
- data/res/rdbms/setup/sqlserver.create.sql +154 -0
- data/res/rdbms/setup/sqlserver.drop.sql +16 -0
- metadata +152 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
drop table TM_SUBJECT_LOCATORS;
|
2
|
+
drop table TM_VARIANT_NAME_SCOPE;
|
3
|
+
drop table TM_SUBJECT_IDENTIFIERS;
|
4
|
+
drop table TM_TOPIC_MAP;
|
5
|
+
drop table TM_TOPIC_NAME_SCOPE;
|
6
|
+
drop table TM_TOPIC_NAME;
|
7
|
+
drop table TM_OCCURRENCE;
|
8
|
+
drop table TM_ASSOCIATION_SCOPE;
|
9
|
+
drop table TM_ITEM_IDENTIFIERS;
|
10
|
+
drop table TM_ADMIN_SEQUENCE;
|
11
|
+
drop table TM_TOPIC;
|
12
|
+
drop table TM_OCCURRENCE_SCOPE;
|
13
|
+
drop table TM_VARIANT_NAME;
|
14
|
+
drop table TM_ASSOCIATION;
|
15
|
+
drop table TM_ASSOCIATION_ROLE;
|
16
|
+
drop table TM_TOPIC_TYPES;
|
@@ -0,0 +1,154 @@
|
|
1
|
+
create table TM_SUBJECT_LOCATORS (
|
2
|
+
topic_id integer not null,
|
3
|
+
address varchar(512) not null
|
4
|
+
);
|
5
|
+
|
6
|
+
create table TM_VARIANT_NAME_SCOPE (
|
7
|
+
scoped_id integer not null,
|
8
|
+
theme_id integer not null,
|
9
|
+
constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
10
|
+
);
|
11
|
+
|
12
|
+
create table TM_SUBJECT_IDENTIFIERS (
|
13
|
+
topic_id integer not null,
|
14
|
+
address varchar(512) not null
|
15
|
+
);
|
16
|
+
|
17
|
+
create table TM_TOPIC_MAP (
|
18
|
+
id integer not null,
|
19
|
+
reifier_id integer null,
|
20
|
+
title varchar(128) null,
|
21
|
+
base_address varchar(512) null,
|
22
|
+
comments varchar(2048) null,
|
23
|
+
constraint TM_TOPIC_MAP_pkey primary key (id)
|
24
|
+
);
|
25
|
+
|
26
|
+
create table TM_TOPIC_NAME_SCOPE (
|
27
|
+
scoped_id integer not null,
|
28
|
+
theme_id integer not null,
|
29
|
+
constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
30
|
+
);
|
31
|
+
|
32
|
+
create table TM_TOPIC_NAME (
|
33
|
+
id integer not null,
|
34
|
+
topic_id integer not null,
|
35
|
+
topicmap_id integer not null,
|
36
|
+
reifier_id integer null,
|
37
|
+
type_id integer null,
|
38
|
+
content varchar(2048) null,
|
39
|
+
constraint TM_TOPIC_NAME_pkey primary key (id)
|
40
|
+
);
|
41
|
+
|
42
|
+
create table TM_OCCURRENCE (
|
43
|
+
id integer not null,
|
44
|
+
topic_id integer not null,
|
45
|
+
topicmap_id integer not null,
|
46
|
+
reifier_id integer null,
|
47
|
+
type_id integer null,
|
48
|
+
datatype_address varchar(512) null,
|
49
|
+
length integer null,
|
50
|
+
hashcode integer null,
|
51
|
+
content clob null,
|
52
|
+
constraint TM_OCCURRENCE_pkey primary key (id)
|
53
|
+
);
|
54
|
+
|
55
|
+
create table TM_ASSOCIATION_SCOPE (
|
56
|
+
scoped_id integer not null,
|
57
|
+
theme_id integer not null,
|
58
|
+
constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
|
59
|
+
);
|
60
|
+
|
61
|
+
create table TM_ITEM_IDENTIFIERS (
|
62
|
+
class varchar(1) not null,
|
63
|
+
tmobject_id integer not null,
|
64
|
+
topicmap_id integer not null,
|
65
|
+
address varchar(512) not null
|
66
|
+
);
|
67
|
+
|
68
|
+
create table TM_ADMIN_SEQUENCE (
|
69
|
+
seq_name varchar(32) not null,
|
70
|
+
seq_count integer not null,
|
71
|
+
constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
|
72
|
+
);
|
73
|
+
|
74
|
+
create table TM_TOPIC (
|
75
|
+
id integer not null,
|
76
|
+
topicmap_id integer not null,
|
77
|
+
reified_id varchar(32) null,
|
78
|
+
constraint TM_TOPIC_pkey primary key (id)
|
79
|
+
);
|
80
|
+
|
81
|
+
create table TM_OCCURRENCE_SCOPE (
|
82
|
+
scoped_id integer not null,
|
83
|
+
theme_id integer not null,
|
84
|
+
constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
|
85
|
+
);
|
86
|
+
|
87
|
+
create table TM_VARIANT_NAME (
|
88
|
+
id integer not null,
|
89
|
+
name_id integer not null,
|
90
|
+
topicmap_id integer not null,
|
91
|
+
reifier_id integer null,
|
92
|
+
datatype_address varchar(512) null,
|
93
|
+
length integer null,
|
94
|
+
hashcode integer null,
|
95
|
+
content clob null,
|
96
|
+
constraint TM_VARIANT_NAME_pkey primary key (id)
|
97
|
+
);
|
98
|
+
|
99
|
+
create table TM_ASSOCIATION (
|
100
|
+
id integer not null,
|
101
|
+
topicmap_id integer not null,
|
102
|
+
reifier_id integer null,
|
103
|
+
type_id integer null,
|
104
|
+
constraint TM_ASSOCIATION_pkey primary key (id)
|
105
|
+
);
|
106
|
+
|
107
|
+
create table TM_ASSOCIATION_ROLE (
|
108
|
+
id integer not null,
|
109
|
+
assoc_id integer not null,
|
110
|
+
topicmap_id integer not null,
|
111
|
+
reifier_id integer null,
|
112
|
+
type_id integer null,
|
113
|
+
player_id integer null,
|
114
|
+
constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
|
115
|
+
);
|
116
|
+
|
117
|
+
create table TM_TOPIC_TYPES (
|
118
|
+
topic_id integer not null,
|
119
|
+
type_id integer not null,
|
120
|
+
constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
|
121
|
+
);
|
122
|
+
|
123
|
+
|
124
|
+
create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
|
125
|
+
create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
|
126
|
+
create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
|
127
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
|
128
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
|
129
|
+
create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
|
130
|
+
create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
|
131
|
+
create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
|
132
|
+
create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
|
133
|
+
create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content, id);
|
134
|
+
create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
|
135
|
+
create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
|
136
|
+
create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
|
137
|
+
create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
|
138
|
+
create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
|
139
|
+
create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
|
140
|
+
create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
|
141
|
+
create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
|
142
|
+
create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
|
143
|
+
create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
|
144
|
+
create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
|
145
|
+
create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
|
146
|
+
create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
|
147
|
+
create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
|
148
|
+
create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
|
149
|
+
create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
|
150
|
+
create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
|
151
|
+
create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
|
152
|
+
|
153
|
+
insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
|
154
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
drop table TM_SUBJECT_LOCATORS;
|
2
|
+
drop table TM_VARIANT_NAME_SCOPE;
|
3
|
+
drop table TM_SUBJECT_IDENTIFIERS;
|
4
|
+
drop table TM_TOPIC_MAP;
|
5
|
+
drop table TM_TOPIC_NAME_SCOPE;
|
6
|
+
drop table TM_TOPIC_NAME;
|
7
|
+
drop table TM_OCCURRENCE;
|
8
|
+
drop table TM_ASSOCIATION_SCOPE;
|
9
|
+
drop table TM_ITEM_IDENTIFIERS;
|
10
|
+
drop table TM_ADMIN_SEQUENCE;
|
11
|
+
drop table TM_TOPIC;
|
12
|
+
drop table TM_OCCURRENCE_SCOPE;
|
13
|
+
drop table TM_VARIANT_NAME;
|
14
|
+
drop table TM_ASSOCIATION;
|
15
|
+
drop table TM_ASSOCIATION_ROLE;
|
16
|
+
drop table TM_TOPIC_TYPES;
|
@@ -0,0 +1,170 @@
|
|
1
|
+
create table TM_SUBJECT_LOCATORS (
|
2
|
+
topic_id integer not null,
|
3
|
+
address varchar(255) not null
|
4
|
+
) TYPE = InnoDB
|
5
|
+
;
|
6
|
+
|
7
|
+
create table TM_VARIANT_NAME_SCOPE (
|
8
|
+
scoped_id integer not null,
|
9
|
+
theme_id integer not null,
|
10
|
+
constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
11
|
+
) TYPE = InnoDB
|
12
|
+
;
|
13
|
+
|
14
|
+
create table TM_SUBJECT_IDENTIFIERS (
|
15
|
+
topic_id integer not null,
|
16
|
+
address varchar(255) not null
|
17
|
+
) TYPE = InnoDB
|
18
|
+
;
|
19
|
+
|
20
|
+
create table TM_TOPIC_MAP (
|
21
|
+
id integer not null,
|
22
|
+
reifier_id integer,
|
23
|
+
title varchar(128),
|
24
|
+
base_address varchar(255),
|
25
|
+
comments text,
|
26
|
+
constraint TM_TOPIC_MAP_pkey primary key (id)
|
27
|
+
) TYPE = InnoDB
|
28
|
+
;
|
29
|
+
|
30
|
+
create table TM_TOPIC_NAME_SCOPE (
|
31
|
+
scoped_id integer not null,
|
32
|
+
theme_id integer not null,
|
33
|
+
constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
34
|
+
) TYPE = InnoDB
|
35
|
+
;
|
36
|
+
|
37
|
+
create table TM_TOPIC_NAME (
|
38
|
+
id integer not null,
|
39
|
+
topic_id integer not null,
|
40
|
+
topicmap_id integer not null,
|
41
|
+
reifier_id integer,
|
42
|
+
type_id integer,
|
43
|
+
content text,
|
44
|
+
constraint TM_TOPIC_NAME_pkey primary key (id)
|
45
|
+
) TYPE = InnoDB
|
46
|
+
;
|
47
|
+
|
48
|
+
create table TM_OCCURRENCE (
|
49
|
+
id integer not null,
|
50
|
+
topic_id integer not null,
|
51
|
+
topicmap_id integer not null,
|
52
|
+
reifier_id integer,
|
53
|
+
type_id integer,
|
54
|
+
datatype_address varchar(255),
|
55
|
+
length integer,
|
56
|
+
hashcode integer,
|
57
|
+
content text,
|
58
|
+
constraint TM_OCCURRENCE_pkey primary key (id)
|
59
|
+
) TYPE = InnoDB
|
60
|
+
;
|
61
|
+
|
62
|
+
create table TM_ASSOCIATION_SCOPE (
|
63
|
+
scoped_id integer not null,
|
64
|
+
theme_id integer not null,
|
65
|
+
constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
|
66
|
+
) TYPE = InnoDB
|
67
|
+
;
|
68
|
+
|
69
|
+
create table TM_ITEM_IDENTIFIERS (
|
70
|
+
class varchar(1) not null,
|
71
|
+
tmobject_id integer not null,
|
72
|
+
topicmap_id integer not null,
|
73
|
+
address varchar(255) not null
|
74
|
+
) TYPE = InnoDB
|
75
|
+
;
|
76
|
+
|
77
|
+
create table TM_ADMIN_SEQUENCE (
|
78
|
+
seq_name varchar(32) not null,
|
79
|
+
seq_count integer not null,
|
80
|
+
constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
|
81
|
+
) TYPE = InnoDB
|
82
|
+
;
|
83
|
+
|
84
|
+
create table TM_TOPIC (
|
85
|
+
id integer not null,
|
86
|
+
topicmap_id integer not null,
|
87
|
+
reified_id varchar(32),
|
88
|
+
constraint TM_TOPIC_pkey primary key (id)
|
89
|
+
) TYPE = InnoDB
|
90
|
+
;
|
91
|
+
|
92
|
+
create table TM_OCCURRENCE_SCOPE (
|
93
|
+
scoped_id integer not null,
|
94
|
+
theme_id integer not null,
|
95
|
+
constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
|
96
|
+
) TYPE = InnoDB
|
97
|
+
;
|
98
|
+
|
99
|
+
create table TM_VARIANT_NAME (
|
100
|
+
id integer not null,
|
101
|
+
name_id integer not null,
|
102
|
+
topicmap_id integer not null,
|
103
|
+
reifier_id integer,
|
104
|
+
datatype_address varchar(255),
|
105
|
+
length integer,
|
106
|
+
hashcode integer,
|
107
|
+
content text,
|
108
|
+
constraint TM_VARIANT_NAME_pkey primary key (id)
|
109
|
+
) TYPE = InnoDB
|
110
|
+
;
|
111
|
+
|
112
|
+
create table TM_ASSOCIATION (
|
113
|
+
id integer not null,
|
114
|
+
topicmap_id integer not null,
|
115
|
+
reifier_id integer,
|
116
|
+
type_id integer,
|
117
|
+
constraint TM_ASSOCIATION_pkey primary key (id)
|
118
|
+
) TYPE = InnoDB
|
119
|
+
;
|
120
|
+
|
121
|
+
create table TM_ASSOCIATION_ROLE (
|
122
|
+
id integer not null,
|
123
|
+
assoc_id integer not null,
|
124
|
+
topicmap_id integer not null,
|
125
|
+
reifier_id integer,
|
126
|
+
type_id integer,
|
127
|
+
player_id integer,
|
128
|
+
constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
|
129
|
+
) TYPE = InnoDB
|
130
|
+
;
|
131
|
+
|
132
|
+
create table TM_TOPIC_TYPES (
|
133
|
+
topic_id integer not null,
|
134
|
+
type_id integer not null,
|
135
|
+
constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
|
136
|
+
) TYPE = InnoDB
|
137
|
+
;
|
138
|
+
|
139
|
+
|
140
|
+
create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
|
141
|
+
create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
|
142
|
+
create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
|
143
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
|
144
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
|
145
|
+
create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
|
146
|
+
create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
|
147
|
+
create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
|
148
|
+
create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
|
149
|
+
create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content(255), id);
|
150
|
+
create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
|
151
|
+
create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
|
152
|
+
create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
|
153
|
+
create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
|
154
|
+
create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
|
155
|
+
create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
|
156
|
+
create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
|
157
|
+
create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
|
158
|
+
create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
|
159
|
+
create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
|
160
|
+
create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
|
161
|
+
create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
|
162
|
+
create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
|
163
|
+
create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
|
164
|
+
create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
|
165
|
+
create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
|
166
|
+
create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
|
167
|
+
create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
|
168
|
+
|
169
|
+
insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
|
170
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
drop table TM_SUBJECT_LOCATORS;
|
2
|
+
drop table TM_VARIANT_NAME_SCOPE;
|
3
|
+
drop table TM_SUBJECT_IDENTIFIERS;
|
4
|
+
drop table TM_TOPIC_MAP;
|
5
|
+
drop table TM_TOPIC_NAME_SCOPE;
|
6
|
+
drop table TM_TOPIC_NAME;
|
7
|
+
drop table TM_OCCURRENCE;
|
8
|
+
drop table TM_ASSOCIATION_SCOPE;
|
9
|
+
drop table TM_ITEM_IDENTIFIERS;
|
10
|
+
drop table TM_ADMIN_SEQUENCE;
|
11
|
+
drop table TM_TOPIC;
|
12
|
+
drop table TM_OCCURRENCE_SCOPE;
|
13
|
+
drop table TM_VARIANT_NAME;
|
14
|
+
drop table TM_ASSOCIATION;
|
15
|
+
drop table TM_ASSOCIATION_ROLE;
|
16
|
+
drop table TM_TOPIC_TYPES;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
drop table if exists TM_SUBJECT_LOCATORS;
|
2
|
+
drop table if exists TM_VARIANT_NAME_SCOPE;
|
3
|
+
drop table if exists TM_SUBJECT_IDENTIFIERS;
|
4
|
+
drop table if exists TM_TOPIC_MAP;
|
5
|
+
drop table if exists TM_TOPIC_NAME_SCOPE;
|
6
|
+
drop table if exists TM_TOPIC_NAME;
|
7
|
+
drop table if exists TM_OCCURRENCE;
|
8
|
+
drop table if exists TM_ASSOCIATION_SCOPE;
|
9
|
+
drop table if exists TM_ITEM_IDENTIFIERS;
|
10
|
+
drop table if exists TM_ADMIN_SEQUENCE;
|
11
|
+
drop table if exists TM_TOPIC;
|
12
|
+
drop table if exists TM_OCCURRENCE_SCOPE;
|
13
|
+
drop table if exists TM_VARIANT_NAME;
|
14
|
+
drop table if exists TM_ASSOCIATION;
|
15
|
+
drop table if exists TM_ASSOCIATION_ROLE;
|
16
|
+
drop table if exists TM_TOPIC_TYPES;
|
@@ -0,0 +1,202 @@
|
|
1
|
+
create table TM_SUBJECT_LOCATORS (
|
2
|
+
topic_id integer not null,
|
3
|
+
address varchar2(512) not null
|
4
|
+
);
|
5
|
+
|
6
|
+
create table TM_VARIANT_NAME_SCOPE (
|
7
|
+
scoped_id integer not null,
|
8
|
+
theme_id integer not null,
|
9
|
+
constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
10
|
+
);
|
11
|
+
|
12
|
+
create table TM_SUBJECT_IDENTIFIERS (
|
13
|
+
topic_id integer not null,
|
14
|
+
address varchar2(512) not null
|
15
|
+
);
|
16
|
+
|
17
|
+
create table TM_TOPIC_MAP (
|
18
|
+
id integer not null,
|
19
|
+
reifier_id integer,
|
20
|
+
title varchar2(128),
|
21
|
+
base_address varchar2(512),
|
22
|
+
comments varchar2(4000),
|
23
|
+
constraint TM_TOPIC_MAP_pkey primary key (id)
|
24
|
+
);
|
25
|
+
|
26
|
+
create table TM_TOPIC_NAME_SCOPE (
|
27
|
+
scoped_id integer not null,
|
28
|
+
theme_id integer not null,
|
29
|
+
constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
|
30
|
+
);
|
31
|
+
|
32
|
+
create table TM_TOPIC_NAME (
|
33
|
+
id integer not null,
|
34
|
+
topic_id integer not null,
|
35
|
+
topicmap_id integer not null,
|
36
|
+
reifier_id integer,
|
37
|
+
type_id integer,
|
38
|
+
content varchar2(4000),
|
39
|
+
constraint TM_TOPIC_NAME_pkey primary key (id)
|
40
|
+
);
|
41
|
+
|
42
|
+
create table TM_OCCURRENCE (
|
43
|
+
id integer not null,
|
44
|
+
topic_id integer not null,
|
45
|
+
topicmap_id integer not null,
|
46
|
+
reifier_id integer,
|
47
|
+
type_id integer,
|
48
|
+
datatype_address varchar2(512),
|
49
|
+
length integer,
|
50
|
+
hashcode integer,
|
51
|
+
content clob,
|
52
|
+
constraint TM_OCCURRENCE_pkey primary key (id)
|
53
|
+
);
|
54
|
+
|
55
|
+
create table TM_ASSOCIATION_SCOPE (
|
56
|
+
scoped_id integer not null,
|
57
|
+
theme_id integer not null,
|
58
|
+
constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
|
59
|
+
);
|
60
|
+
|
61
|
+
create table TM_ITEM_IDENTIFIERS (
|
62
|
+
class varchar2(1) not null,
|
63
|
+
tmobject_id integer not null,
|
64
|
+
topicmap_id integer not null,
|
65
|
+
address varchar2(512) not null
|
66
|
+
);
|
67
|
+
|
68
|
+
create table TM_ADMIN_SEQUENCE (
|
69
|
+
seq_name varchar2(32) not null,
|
70
|
+
seq_count integer not null,
|
71
|
+
constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
|
72
|
+
);
|
73
|
+
|
74
|
+
create table TM_TOPIC (
|
75
|
+
id integer not null,
|
76
|
+
topicmap_id integer not null,
|
77
|
+
reified_id varchar2(32),
|
78
|
+
constraint TM_TOPIC_pkey primary key (id)
|
79
|
+
);
|
80
|
+
|
81
|
+
create table TM_OCCURRENCE_SCOPE (
|
82
|
+
scoped_id integer not null,
|
83
|
+
theme_id integer not null,
|
84
|
+
constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
|
85
|
+
);
|
86
|
+
|
87
|
+
create table TM_VARIANT_NAME (
|
88
|
+
id integer not null,
|
89
|
+
name_id integer not null,
|
90
|
+
topicmap_id integer not null,
|
91
|
+
reifier_id integer,
|
92
|
+
datatype_address varchar2(512),
|
93
|
+
length integer,
|
94
|
+
hashcode integer,
|
95
|
+
content clob,
|
96
|
+
constraint TM_VARIANT_NAME_pkey primary key (id)
|
97
|
+
);
|
98
|
+
|
99
|
+
create table TM_ASSOCIATION (
|
100
|
+
id integer not null,
|
101
|
+
topicmap_id integer not null,
|
102
|
+
reifier_id integer,
|
103
|
+
type_id integer,
|
104
|
+
constraint TM_ASSOCIATION_pkey primary key (id)
|
105
|
+
);
|
106
|
+
|
107
|
+
create table TM_ASSOCIATION_ROLE (
|
108
|
+
id integer not null,
|
109
|
+
assoc_id integer not null,
|
110
|
+
topicmap_id integer not null,
|
111
|
+
reifier_id integer,
|
112
|
+
type_id integer,
|
113
|
+
player_id integer,
|
114
|
+
constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
|
115
|
+
);
|
116
|
+
|
117
|
+
create table TM_TOPIC_TYPES (
|
118
|
+
topic_id integer not null,
|
119
|
+
type_id integer not null,
|
120
|
+
constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
|
121
|
+
);
|
122
|
+
|
123
|
+
|
124
|
+
/*
|
125
|
+
alter table TM_SUBJECT_LOCATORS add constraint FK_TM_SUBJECT_LOCATORS_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
|
126
|
+
alter table TM_VARIANT_NAME_SCOPE add constraint FK_TM_VARIANT_NAME_SCOPE_1 foreign key (scoped_id) references TM_VARIANT_NAME (id) deferrable initially deferred;
|
127
|
+
alter table TM_VARIANT_NAME_SCOPE add constraint FK_TM_VARIANT_NAME_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
|
128
|
+
alter table TM_SUBJECT_IDENTIFIERS add constraint FK_TM_SUBJECT_IDENTIFIERS_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
|
129
|
+
alter table TM_TOPIC_MAP add constraint FK_TM_TOPIC_MAP_1 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
130
|
+
alter table TM_TOPIC_NAME_SCOPE add constraint FK_TM_TOPIC_NAME_SCOPE_1 foreign key (scoped_id) references TM_TOPIC_NAME (id) deferrable initially deferred;
|
131
|
+
alter table TM_TOPIC_NAME_SCOPE add constraint FK_TM_TOPIC_NAME_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
|
132
|
+
alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
|
133
|
+
alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
134
|
+
alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
135
|
+
alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
|
136
|
+
alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
|
137
|
+
alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
138
|
+
alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
139
|
+
alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
|
140
|
+
alter table TM_ASSOCIATION_SCOPE add constraint FK_TM_ASSOCIATION_SCOPE_1 foreign key (scoped_id) references TM_ASSOCIATION (id) deferrable initially deferred;
|
141
|
+
alter table TM_ASSOCIATION_SCOPE add constraint FK_TM_ASSOCIATION_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
|
142
|
+
alter table TM_ITEM_IDENTIFIERS add constraint FK_TM_ITEM_IDENTIFIERS_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
143
|
+
alter table TM_TOPIC add constraint FK_TM_TOPIC_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
144
|
+
alter table TM_OCCURRENCE_SCOPE add constraint FK_TM_OCCURRENCE_SCOPE_1 foreign key (scoped_id) references TM_OCCURRENCE (id) deferrable initially deferred;
|
145
|
+
alter table TM_OCCURRENCE_SCOPE add constraint FK_TM_OCCURRENCE_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
|
146
|
+
alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_1 foreign key (name_id) references TM_TOPIC_NAME (id) deferrable initially deferred;
|
147
|
+
alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
148
|
+
alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
149
|
+
alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
150
|
+
alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_2 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
151
|
+
alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_3 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
|
152
|
+
alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_1 foreign key (assoc_id) references TM_ASSOCIATION (id) deferrable initially deferred;
|
153
|
+
alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
|
154
|
+
alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
|
155
|
+
alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
|
156
|
+
alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_5 foreign key (player_id) references TM_TOPIC (id) deferrable initially deferred;
|
157
|
+
alter table TM_TOPIC_TYPES add constraint FK_TM_TOPIC_TYPES_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
|
158
|
+
alter table TM_TOPIC_TYPES add constraint FK_TM_TOPIC_TYPES_2 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
|
159
|
+
*/
|
160
|
+
|
161
|
+
create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
|
162
|
+
create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
|
163
|
+
create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
|
164
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
|
165
|
+
create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
|
166
|
+
create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
|
167
|
+
create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
|
168
|
+
create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
|
169
|
+
create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
|
170
|
+
create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content, id);
|
171
|
+
create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
|
172
|
+
create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
|
173
|
+
create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
|
174
|
+
create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
|
175
|
+
create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
|
176
|
+
create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
|
177
|
+
create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
|
178
|
+
create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
|
179
|
+
create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
|
180
|
+
create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
|
181
|
+
create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
|
182
|
+
create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
|
183
|
+
create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
|
184
|
+
create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
|
185
|
+
create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
|
186
|
+
create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
|
187
|
+
create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
|
188
|
+
create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
|
189
|
+
|
190
|
+
insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
|
191
|
+
|
192
|
+
create or replace function tm_clob_value(val clob)
|
193
|
+
return varchar2 deterministic as
|
194
|
+
retval varchar2(4000);
|
195
|
+
begin
|
196
|
+
retval := dbms_lob.substr(val, 4000, 1);
|
197
|
+
return retval;
|
198
|
+
end;
|
199
|
+
/
|
200
|
+
create index CLOB_TM_OCCURRENCE on TM_OCCURRENCE(tm_clob_value(content));
|
201
|
+
create index CLOB_TM_VARIANT_NAME on TM_VARIANT_NAME(tm_clob_value(content));
|
202
|
+
|