Skip to content
This repository

Include tm.js or tm.min.js into an (X)HTML page or a JavaScript file (the last option applies to server-side JavaScript implementations).

Creating a TopicMap object

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.

Until the documentation for tmjs is finished you may refer to the TMAPI 2.0 -docs. Most of the time, the JavaScript API is identical to the Java API.

Something went wrong with that request. Please try again.