rtm-ontopia 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/DISCLAIMER +13 -0
  2. data/LICENSE +201 -0
  3. data/README +8 -0
  4. data/lib/rtm/ontopia.rb +117 -0
  5. data/lib/rtm/ontopia/create_ontopia_mysql.sql +170 -0
  6. data/lib/rtm/ontopia/io/to_cxtm.rb +25 -0
  7. data/lib/rtm/ontopia/javalibs/antlr-2.7.7.jar +0 -0
  8. data/lib/rtm/ontopia/javalibs/avalon-framework-4.1.3.jar +0 -0
  9. data/lib/rtm/ontopia/javalibs/backport-util-concurrent-3.1.jar +0 -0
  10. data/lib/rtm/ontopia/javalibs/bcmail-jdk14-136.jar +0 -0
  11. data/lib/rtm/ontopia/javalibs/bcprov-jdk14-136.jar +0 -0
  12. data/lib/rtm/ontopia/javalibs/commons-collections-3.2.1.jar +0 -0
  13. data/lib/rtm/ontopia/javalibs/commons-dbcp-1.2.2.jar +0 -0
  14. data/lib/rtm/ontopia/javalibs/commons-fileupload-1.1.jar +0 -0
  15. data/lib/rtm/ontopia/javalibs/commons-io-1.1.jar +0 -0
  16. data/lib/rtm/ontopia/javalibs/commons-logging-1.1.jar +0 -0
  17. data/lib/rtm/ontopia/javalibs/commons-pool-1.3.jar +0 -0
  18. data/lib/rtm/ontopia/javalibs/concurrent-1.3.4.jar +0 -0
  19. data/lib/rtm/ontopia/javalibs/crimson-1.1.3.jar +0 -0
  20. data/lib/rtm/ontopia/javalibs/fontbox-0.1.0.jar +0 -0
  21. data/lib/rtm/ontopia/javalibs/httpunit-1.6.1.jar +0 -0
  22. data/lib/rtm/ontopia/javalibs/icu4j-3.4.4.jar +0 -0
  23. data/lib/rtm/ontopia/javalibs/java-getopt-1.0.9.jar +0 -0
  24. data/lib/rtm/ontopia/javalibs/jcl-over-slf4j-1.5.8.jar +0 -0
  25. data/lib/rtm/ontopia/javalibs/jempbox-0.2.0.jar +0 -0
  26. data/lib/rtm/ontopia/javalibs/jena-2.3.jar +0 -0
  27. data/lib/rtm/ontopia/javalibs/jflex-1.4.3.jar +0 -0
  28. data/lib/rtm/ontopia/javalibs/jgroups-2.6.10.GA.jar +0 -0
  29. data/lib/rtm/ontopia/javalibs/joda-time-1.6.jar +0 -0
  30. data/lib/rtm/ontopia/javalibs/js-1.5R4.1.jar +0 -0
  31. data/lib/rtm/ontopia/javalibs/jsp-api-2.0.jar +0 -0
  32. data/lib/rtm/ontopia/javalibs/jstl-1.1.2.jar +0 -0
  33. data/lib/rtm/ontopia/javalibs/jtidy-4aug2000r7-dev.jar +0 -0
  34. data/lib/rtm/ontopia/javalibs/jtidy-r8-20060801.jar +0 -0
  35. data/lib/rtm/ontopia/javalibs/logkit-1.0.1.jar +0 -0
  36. data/lib/rtm/ontopia/javalibs/lucene-1.4.3.jar +0 -0
  37. data/lib/rtm/ontopia/javalibs/lucene-core-2.0.0.jar +0 -0
  38. data/lib/rtm/ontopia/javalibs/lucene-snowball-2.0.0.jar +0 -0
  39. data/lib/rtm/ontopia/javalibs/nekohtml-0.9.1.jar +0 -0
  40. data/lib/rtm/ontopia/javalibs/ontoboot.jar +0 -0
  41. data/lib/rtm/ontopia/javalibs/ontopia.jar +0 -0
  42. data/lib/rtm/ontopia/javalibs/opencsv-1.8.jar +0 -0
  43. data/lib/rtm/ontopia/javalibs/oro-2.0.8.jar +0 -0
  44. data/lib/rtm/ontopia/javalibs/saxon-6.5.3.jar +0 -0
  45. data/lib/rtm/ontopia/javalibs/servlet-api-2.4.jar +0 -0
  46. data/lib/rtm/ontopia/javalibs/standard-1.1.2.jar +0 -0
  47. data/lib/rtm/ontopia/javalibs/stax-1.1.1-dev.jar +0 -0
  48. data/lib/rtm/ontopia/javalibs/stax-api-1.0.jar +0 -0
  49. data/lib/rtm/ontopia/javalibs/tagsoup-1.2.jar +0 -0
  50. data/lib/rtm/ontopia/javalibs/touchgraph.jar +0 -0
  51. data/lib/rtm/ontopia/javalibs/velocity-1.3.jar +0 -0
  52. data/lib/rtm/ontopia/javalibs/wicket-1.4.5.jar +0 -0
  53. data/lib/rtm/ontopia/javalibs/wicket-datetime-1.4.5.jar +0 -0
  54. data/lib/rtm/ontopia/javalibs/wicket-extensions-1.4.5.jar +0 -0
  55. data/lib/rtm/ontopia/javalibs/xercesImpl-2.7.1.jar +0 -0
  56. data/lib/rtm/ontopia/javalibs/xml-apis-1.3.02.jar +0 -0
  57. data/lib/rtm/ontopia/javalibs/xmlParserAPIs-2.2.1.jar +0 -0
  58. data/lib/rtm/ontopia/ontopia_example.props +14 -0
  59. metadata +124 -0
data/DISCLAIMER ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2008-2010 Topic Maps Lab, University of Leipzig.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and limitations
13
+ under the License.
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README ADDED
@@ -0,0 +1,8 @@
1
+ Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
2
+ License: Apache License, Version 2.0
3
+
4
+ See http://rtm.topicmapslab.de/ for instructions.
5
+
6
+ This Gem is bundled with the following third party libraries:
7
+ * Ontopia - http://code.google.com/p/ontopia/ (Apache 2.0 License)
8
+ * several others, see lib/ontopia/javalibs/
@@ -0,0 +1,117 @@
1
+ # Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
2
+ # License: Apache License, Version 2.0
3
+
4
+ begin
5
+ require 'rtm/javatmapi'
6
+ rescue LoadError
7
+ javatmapi_path = File.expand_path(File.join(File.dirname(__FILE__), "../../../rtm-javatmapi/lib"))
8
+ if File.directory?(javatmapi_path)
9
+ $:.unshift javatmapi_path
10
+ require 'rtm/javatmapi'
11
+ end
12
+ end
13
+
14
+ Dir[File.join(File.dirname(__FILE__), 'ontopia/javalibs/*.jar')].each {|file| require file }
15
+ require (File.dirname(__FILE__) + '/ontopia/io/to_cxtm')
16
+
17
+ module RTM
18
+ class Ontopia < JavaTMAPI
19
+ identifier :ontopia
20
+
21
+ def initialize(*args)
22
+ super
23
+ set_tmsf(Java::NetOntopiaTopicmapsImplTmapi2::TopicMapSystemFactory.new)
24
+ set_properties(@params[:properties])
25
+ set_features(@params[:features])
26
+ create_system
27
+ end
28
+ end
29
+ end
30
+
31
+ module Java::OrgTmapiCore::TopicMap
32
+ include RTM::TopicMap
33
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.TopicMapImpl)
34
+ superize
35
+ end
36
+
37
+ module Java::OrgTmapiCore::Topic
38
+ include RTM::Topic
39
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.TopicImpl)
40
+ superize
41
+ end
42
+
43
+ module Java::OrgTmapiCore::Association
44
+ include RTM::Association
45
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.AssociationImpl)
46
+ superize
47
+ end
48
+
49
+ module Java::OrgTmapiCore::Name
50
+ include RTM::Name
51
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.NameImpl)
52
+ superize
53
+ end
54
+
55
+ # there is nothing superized in occurrence
56
+ # module Java::OrgTmapiCore::Occurrence
57
+ # include RTM::Occurrence
58
+ # JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.OccurrenceImpl)
59
+ # superize
60
+ # end
61
+
62
+ # ther is nothing superized in variant
63
+ # module Java::OrgTmapiCore::Variant
64
+ # include RTM::Variant
65
+ # JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.VariantImpl)
66
+ # superize
67
+ # end
68
+
69
+ module Java::OrgTmapiCore::Role
70
+ include RTM::Role
71
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.RoleImpl)
72
+ superize
73
+ end
74
+
75
+ module Java::OrgTmapiCore::Scoped
76
+ include RTM::Scoped
77
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.ScopedImpl)
78
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.AssociationImpl)
79
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.NameImpl)
80
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.OccurrenceImpl)
81
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.VariantImpl)
82
+ superize
83
+ end
84
+
85
+ module Java::OrgTmapiCore::Typed
86
+ include RTM::Typed
87
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.AssociationImpl)
88
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.NameImpl)
89
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.OccurrenceImpl)
90
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.RoleImpl)
91
+ superize
92
+ end
93
+
94
+ module Java::OrgTmapiCore::Construct
95
+ include RTM::Construct
96
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.ConstructImpl)
97
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.TopicMapImpl)
98
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.TopicImpl)
99
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.AssociationImpl)
100
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.NameImpl)
101
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.OccurrenceImpl)
102
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.VariantImpl)
103
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.RoleImpl)
104
+ superize
105
+ end
106
+
107
+ module Java::OrgTmapiCore::Reifiable
108
+ include RTM::Reifiable
109
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.ReifiableImpl)
110
+ superize
111
+ end
112
+
113
+ module Java::OrgTmapiCore::Locator
114
+ include RTM::Locator
115
+ JavaImplementations.add(self,net.ontopia.topicmaps.impl.tmapi2.LocatorImpl)
116
+ superize
117
+ end
@@ -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,25 @@
1
+ # Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
2
+ # License: Apache License, Version 2.0
3
+
4
+
5
+ module RTM::IO
6
+ # Import and Export of TMAPI Topic Maps
7
+ # Utilizing the Ontopia libary http://code.google.com/p/tmapix/
8
+ # Consequently the (de-) serializer provided here
9
+ # are only Wrapper
10
+
11
+ module Ontopia
12
+ module TopicMap
13
+ def to_cxtm(filename, base_iri = nil)
14
+ raise("Only supported for Ontopia.") unless self.kind_of?(net.ontopia.topicmaps.impl.tmapi2.TopicMapImpl)
15
+ out_file = java.io.FileOutputStream.new(filename)
16
+ writer = net.ontopia.topicmaps.xml.CanonicalXTMWriter.new(out_file)
17
+ writer.write(self.wrapped)
18
+ out_file.flush
19
+ out_file.close
20
+ end
21
+ end
22
+
23
+ RTM.register_extension(self)
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ net.ontopia.topicmaps.store=rdbms
2
+ net.ontopia.topicmaps.impl.rdbms.Database=mysql
3
+ net.ontopia.topicmaps.impl.rdbms.ConnectionString=jdbc:mysql://localhost/database_name?useUnicode=yes&characterEncoding=utf8&relaxAutoCommit=true
4
+ #net.ontopia.topicmaps.impl.rdbms.ConnectionString=jdbc:log4jdbc:mysql://localhost/database_name?useUnicode=yes&characterEncoding=utf8&relaxAutoCommit=true
5
+ net.ontopia.topicmaps.impl.rdbms.DriverClass=com.mysql.jdbc.Driver
6
+ #net.ontopia.topicmaps.impl.rdbms.DriverClass=net.sf.log4jdbc.DriverSpy
7
+
8
+ net.ontopia.topicmaps.impl.rdbms.UserName=username
9
+ net.ontopia.topicmaps.impl.rdbms.Password=password
10
+
11
+ # tuning
12
+ net.ontopia.topicmaps.impl.rdbms.ConnectionPool=true
13
+ net.ontopia.topicmaps.impl.rdbms.BatchUpdates=true
14
+ net.ontopia.topicmaps.impl.rdbms.StorePool.MinimumSize=2
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rtm-ontopia
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Benjamin Bock
8
+ - Arnim Bleier
9
+ - Uta Schulze
10
+ - Daniel Exner
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+
15
+ date: 2010-02-05 00:00:00 +01:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: rtm-javatmapi
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.0
27
+ version:
28
+ description: The Ontopia backend for Ruby Topic Maps. See http://code.google.com/p/ontopia/ for more information about Ontopia.
29
+ email: "#rtm+rtm-ontopia-gem-20100205@topicmapslab.de"
30
+ executables: []
31
+
32
+ extensions: []
33
+
34
+ extra_rdoc_files: []
35
+
36
+ files:
37
+ - lib/rtm/ontopia/io/to_cxtm.rb
38
+ - lib/rtm/ontopia.rb
39
+ - lib/rtm/ontopia/javalibs/antlr-2.7.7.jar
40
+ - lib/rtm/ontopia/javalibs/avalon-framework-4.1.3.jar
41
+ - lib/rtm/ontopia/javalibs/backport-util-concurrent-3.1.jar
42
+ - lib/rtm/ontopia/javalibs/bcmail-jdk14-136.jar
43
+ - lib/rtm/ontopia/javalibs/bcprov-jdk14-136.jar
44
+ - lib/rtm/ontopia/javalibs/commons-collections-3.2.1.jar
45
+ - lib/rtm/ontopia/javalibs/commons-dbcp-1.2.2.jar
46
+ - lib/rtm/ontopia/javalibs/commons-fileupload-1.1.jar
47
+ - lib/rtm/ontopia/javalibs/commons-io-1.1.jar
48
+ - lib/rtm/ontopia/javalibs/commons-logging-1.1.jar
49
+ - lib/rtm/ontopia/javalibs/commons-pool-1.3.jar
50
+ - lib/rtm/ontopia/javalibs/concurrent-1.3.4.jar
51
+ - lib/rtm/ontopia/javalibs/crimson-1.1.3.jar
52
+ - lib/rtm/ontopia/javalibs/fontbox-0.1.0.jar
53
+ - lib/rtm/ontopia/javalibs/httpunit-1.6.1.jar
54
+ - lib/rtm/ontopia/javalibs/icu4j-3.4.4.jar
55
+ - lib/rtm/ontopia/javalibs/java-getopt-1.0.9.jar
56
+ - lib/rtm/ontopia/javalibs/jcl-over-slf4j-1.5.8.jar
57
+ - lib/rtm/ontopia/javalibs/jempbox-0.2.0.jar
58
+ - lib/rtm/ontopia/javalibs/jena-2.3.jar
59
+ - lib/rtm/ontopia/javalibs/jflex-1.4.3.jar
60
+ - lib/rtm/ontopia/javalibs/jgroups-2.6.10.GA.jar
61
+ - lib/rtm/ontopia/javalibs/joda-time-1.6.jar
62
+ - lib/rtm/ontopia/javalibs/js-1.5R4.1.jar
63
+ - lib/rtm/ontopia/javalibs/jsp-api-2.0.jar
64
+ - lib/rtm/ontopia/javalibs/jstl-1.1.2.jar
65
+ - lib/rtm/ontopia/javalibs/jtidy-4aug2000r7-dev.jar
66
+ - lib/rtm/ontopia/javalibs/jtidy-r8-20060801.jar
67
+ - lib/rtm/ontopia/javalibs/logkit-1.0.1.jar
68
+ - lib/rtm/ontopia/javalibs/lucene-1.4.3.jar
69
+ - lib/rtm/ontopia/javalibs/lucene-core-2.0.0.jar
70
+ - lib/rtm/ontopia/javalibs/lucene-snowball-2.0.0.jar
71
+ - lib/rtm/ontopia/javalibs/nekohtml-0.9.1.jar
72
+ - lib/rtm/ontopia/javalibs/ontoboot.jar
73
+ - lib/rtm/ontopia/javalibs/ontopia.jar
74
+ - lib/rtm/ontopia/javalibs/opencsv-1.8.jar
75
+ - lib/rtm/ontopia/javalibs/oro-2.0.8.jar
76
+ - lib/rtm/ontopia/javalibs/saxon-6.5.3.jar
77
+ - lib/rtm/ontopia/javalibs/servlet-api-2.4.jar
78
+ - lib/rtm/ontopia/javalibs/standard-1.1.2.jar
79
+ - lib/rtm/ontopia/javalibs/stax-1.1.1-dev.jar
80
+ - lib/rtm/ontopia/javalibs/stax-api-1.0.jar
81
+ - lib/rtm/ontopia/javalibs/tagsoup-1.2.jar
82
+ - lib/rtm/ontopia/javalibs/touchgraph.jar
83
+ - lib/rtm/ontopia/javalibs/velocity-1.3.jar
84
+ - lib/rtm/ontopia/javalibs/wicket-1.4.5.jar
85
+ - lib/rtm/ontopia/javalibs/wicket-datetime-1.4.5.jar
86
+ - lib/rtm/ontopia/javalibs/wicket-extensions-1.4.5.jar
87
+ - lib/rtm/ontopia/javalibs/xercesImpl-2.7.1.jar
88
+ - lib/rtm/ontopia/javalibs/xml-apis-1.3.02.jar
89
+ - lib/rtm/ontopia/javalibs/xmlParserAPIs-2.2.1.jar
90
+ - lib/rtm/ontopia/create_ontopia_mysql.sql
91
+ - lib/rtm/ontopia/ontopia_example.props
92
+ - LICENSE
93
+ - DISCLAIMER
94
+ - README
95
+ has_rdoc: true
96
+ homepage: http://rtm.topicmapslab.de/
97
+ licenses: []
98
+
99
+ post_install_message: You have successfully installed rtm-ontopia.
100
+ rdoc_options: []
101
+
102
+ require_paths:
103
+ - lib
104
+ required_ruby_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: "0"
109
+ version:
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: "0"
115
+ version:
116
+ requirements: []
117
+
118
+ rubyforge_project: rtm
119
+ rubygems_version: 1.3.5
120
+ signing_key:
121
+ specification_version: 3
122
+ summary: "Ruby Topic Maps: Ontopia backend"
123
+ test_files: []
124
+