tmjs is meant to be a lightweight engine that makes it possible to implement
Topic Maps based applications in Web browsers. It can be used to create
as jQuery or prototype.js, but it can be used in combination with them.
For more details check out the project's homepage.
- TMAPI 2.0-like API with an in-memory backend
- JTM 1.0 import/export (experimental)
See the file TODO for a list of missing features.
Features to be implemented in the near future
- Full CXTM support
- More tests
- JTM 1.1 import/export
- XTM 2.0 import/export (requires DOM)
More planned features (feedback welcome)
- More backends: HTML 5 Web SQL Database, persistent backend for node.js
- More import/export-formats: CTM
To build the library from the source code you need Java 1.6. The build
the code and extracts API documentation from the source code. In addition,
you need the
make utility. A
build.xml file for
ant is planned for a
To build the whole package run
If you want to build the minified version of tm.js run
To run JSLint enter
The API documentation can be build with
To remove the files in the dist- and doc-directories run
This is how to create a TopicMap object:
var factory, sys, tmid, tm; factory = TopicMapSystemFactory.newInstance(); factory.setProperty('com.semanticheadache.tmjs.backend', 'memory'); sys = factory.newTopicMapSystem(); tmid = sys.createLocator("http://example.org/mytm"); tm = sys.createTopicMap(tmid);
By default newTopicMapSystem() returns an in-memory implementation.
See these topics for more information:
Normally, you will only need the files in the dist- and doc-directory. If you want to make changes to the source code, take a look at the src-directory.
All other files are needed to build the distribution file, to minify the source code and to run the unit tests.
build/*Software needed for the build process
src/*The source code of tm.js
doc/*The API documentation (available after the build process)
For feedback or if you find any bugs or have comments or feature request please use the issue tracker at
Copyright and License
tmjs has been written by Jan Schreiber (jans [at] ravn.no). It is licensed
under the MIT license. See the file MIT-LICENSE.txt for details.