Changes for page TopicMap Engine

Last modified by christoph_lechleitner@iteg_at on 2013-02-02 07.31:25

From version 2.1
edited by 5fbc055b7cc103006957e1ae
on 2012-06-15 03.36:43
Change comment: There is no comment for this version
To version 5.1
edited by christoph_lechleitner@iteg_at
on 2013-02-02 07.31:25
Change comment: Migrated to Confluence 5.3

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -TopicMap Engine Home
1 +TopicMap Engine
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.5fbc055b7cc103006957e1ae
1 +XWiki.christoph_lechleitner@iteg_at
Content
... ... @@ -1,19 +2,16 @@
1 -(% style="" %)
2 2  //**TM2JDBC** is a implementation of the TopicMaps API ([[TMAPI 2.0.2>>url:http://www.tmapi.org/2.0/||shape="rect"]]). It is a fast, production-grade Topic Maps Engine with a small dependency footprint. TM2JDBC uses a relational database to store its data, and is verified to operate with Apache Derby, MySQL, MSSQL Server and Oracle databases.//
3 3  
4 -(% style="" %)
5 5  TM2JDBC is released in version 1.0.1. This release features some dependency updates and minor corrections of inconsistencies within the code, but is fully compatible to version 0.9.0.
6 6  
7 -(% style="" %)
8 8  * Updated TMAPI dependency to version 2.0.2 (the prior version already was compliant with TMAPI 2.0.2, but still referenced a snapshot as the final library was not released)
9 9  * OSGi support – The library now comes packaged as an OSGi-bundle, which allows it to be deployed to your OSGi container of choice. This has no side-effencts on non-OSGi projects
10 10  * Updated clazzes.org-dependencies to the current version
11 11  
12 -(% style="" %)
13 13  If you are using maven, you can use the new version by adding the following snippets to your {{code language="none"}}pom.xml{{/code}} file:
14 14  
15 -(% style="" %)
16 16  (((
12 +
13 +
17 17  {{code language="none"}}
18 18  <dependency>
19 19   <groupId>org.clazzes</groupId>
... ... @@ -30,9 +30,10 @@
30 30   <url>http://maven.clazzes.org</url>
31 31  </repository>
32 32  {{/code}}
30 +
31 +
33 33  )))
34 34  
35 -(% style="" %)
36 36  If you do not use maven, you can download the .jar files manually from our repository at [[http:~~/~~/maven.clazzes.org/org/clazzes/tm2jdbc>>url:http://maven.clazzes.org/org/clazzes/tm2jdbc||shape="rect"]].
37 37  Alternatively, you can check out the sources directly from our SVN Repository:
38 38  
... ... @@ -41,20 +41,17 @@
41 41  
42 42  {{/code}}
43 43  
44 -(% style="" %)
45 45  = {{id name="TopicMapEngineHome-SetupandUsageNotes"/}}Setup and Usage Notes =
46 46  
47 -(% style="" %)
48 48  TM2JDBC needs a relational database and the appropriate JDBC 4.0 compatible driver to function. However it does not have any direct dependencies to a specific JDBC connector. Instead, it expects a {{code language="none"}}javax.sql.DataSource{{/code}} to be set as a property (see below), which it will use to obtain database connections. Although the engine should function with any DataSource implementation, we strongly recommend to use the [[Apache Commons DBCP>>url:http://commons.apache.org/dbcp/||shape="rect"]] library. A rudimentary set-up for a {{code language="none"}}BasicDataSource{{/code}} can be found in the class {{code language="none"}}org.clazzes.tm2jdbc.util.test.DataSourceProvider{{/code}}.
49 49  
50 -(% style="" %)
51 51  === {{id name="TopicMapEngineHome-ProvidingaDataSource"/}}Providing a DataSource ===
52 52  
53 -(% style="" %)
54 54  To handle database connectivity, the TM2JDBC engine relies on a{{code language="none"}}javax.sql.DataSource{{/code}} to be set for the property ##(% class="nolink" %)http:~/~/psi.clazzes.org/topicmaps/db-connection/datatsource(%%)## in the Factory (attempting to call {{code language="none"}}newTopicMapSystem(){{/code}} without the property being set causes an{{code language="none"}}IllegalStateException{{/code}} to be thrown. The property string can also be accessed directly via the Enum object{{code language="none"}}org.clazzes.tm2jdbc.voc.PropertyKey.CONNECTION_DATASOURCE{{/code}}. The most basic setup could look like this:
55 55  
56 -(% style="" %)
57 57  (((
51 +
52 +
58 58  {{code language="java"}}
59 59  BasicDataSource datasource = new BasicDataSource();
60 60  datasource.setDefaultAutoCommit(false);
... ... @@ -80,24 +80,23 @@
80 80  
81 81  )))
82 82  
83 -(% style="" %)
84 84  === {{id name="TopicMapEngineHome-RunningtheDBSetupUtilityincommandline"/}}Running the DBSetup Utility in commandline ===
85 85  
86 -(% style="" %)
87 87  The engine provides a setup-utility to create the tables it needs in a provided database schema. This utility can either be run as a standalone java executable (in the command line, via a shell script etc.) or instanciated as a Java Object by your own code (see below). The class name is {{code language="none"}}org.clazzes.tm2jdbc.jdbc.setup.DBSetup{{/code}}. For testing and development, it may be useful to run the setup utility in commandline or the development evironment of your choice. The standard use-case is to set up the database schema, but you can also use it to drop all tables in the schema.
88 88  Making sure that the appropriate database drivers are added to the classpath, the accepts arguments like this:
89 89  
90 -(% style="" %)
91 91  (((
84 +
85 +
92 92  {{code language="none"}}
93 93  DBSetup {derby|mssql|mysql|oracle} {{ [-h <HOSTNAME>] [-t <PORT>] [-n <SCHEMA NAME>] } | {--url <DATABASE-URL>}} -u <USER> -p <PASSWORD> [-d <DRIVER-CLASSNAME> ] [--debug] [--drop|--force-drop] [--nosetup]
94 94  {{/code}}
89 +
90 +
95 95  )))
96 96  
97 -(% style="" %)
98 98  Below is a listing of all argument flags and the default values:
99 99  
100 -(% style="" %)
101 101  |=(((
102 102  Flag
103 103  )))|=(((
... ... @@ -205,21 +205,18 @@
205 205  Skip setting up the schema.
206 206  )))
207 207  
208 -(% style="" %)
209 209  === {{id name="TopicMapEngineHome-RunningtheDBSetupUtilityinJava"/}}Running the DBSetup Utility in Java ===
210 210  
211 -(% style="" %)
212 212  The database setup-utility also can be run in java. For this case it provides a constructor which takes a {{code language="none"}}javax.sql.DataSource{{/code}}, and provides the methods {{code language="none"}}setUpDB(boolean debug){{/code}} and {{code language="none"}}dropAllTables(boolean supressErrors){{/code}}. It is recommended to use these instead of running the {{code language="none"}}main(String[] args){{/code}} method with the appropriate arguments.
213 213  
214 -(% style="" %)
215 215  === {{id name="TopicMapEngineHome-JUnittesting"/}}JUnit testing ===
216 216  
217 -(% style="" %)
218 218  TMAPI provides an extensive suite of Testcases to assure compliancy, which is also included in the TM2JDBC package. As the original tests were not conceived for engines which are based on an RDBMS, the {{code language="none"}}setUp(){{/code}} and {{code language="none"}}tearDown(){{/code}} methods where modified to initialize and drop the database schema between every test. You are welcome to subject the engine to additional tests (we would especially appreciate you to share the results with us), and for this purpose TM2JDBC provides the utility class{{code language="none"}}org.clazzes.tm2jdbc.util.test.DataSourceProvider{{/code}} (depends on Apache commons DBCP).
219 219  It is recommended to use this utility in all test cases as follows:
220 220  
221 -(% style="" %)
222 222  (((
212 +
213 +
223 223  {{code language="java"}}
224 224  protected DataSourceProvider dsProvider;
225 225  
... ... @@ -239,4 +239,10 @@
239 239  dsProvider.dropDB();
240 240  }
241 241  {{/code}}
233 +
234 += {{id name="TopicMapEngineHome-Sourcecodeandissuetracker"/}}Source code and issue tracker =
235 +
236 +Subversion: [[http:~~/~~/svn.clazzes.org/svn/topicmaps>>url:http://svn.clazzes.org/svn/topicmaps||shape="rect"]]
237 +
238 +Jira: [[TME>>url:https://jira.clazzes.org/browse/TME||shape="rect"]]
242 242  )))
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -689686
1 +689675
URL
... ... @@ -1,1 +1,1 @@
1 -https://clazzes.atlassian.net/wiki/spaces/TME/pages/689686/TopicMap Engine Home
1 +https://clazzes.atlassian.net/wiki/spaces/TME