org.tm4j.topicmap.TopicMapProviderBase .addTopicMap(java.io.InputStream srcStream,org.tm4j.net.Locator baseLocator,org.tm4j.topicmap.TopicMap existingTopicMap,org.tm4j.topicmap.Topic[] addedThemes,org.tm4j.topicmap.utils.TopicMapBuilder builder)

Description

Imports a topic map in XTM or LTM syntax into the data store managed by this TopicMapProvider.

Parameters
org.tm4j.topicmap.Topic addedThemes Optional themes to be added to the resulting TopicMap.
org.tm4j.net.Locator baseLocator The base URL to assign to the generated topic map only if the parsed topic map does not have an xml:base attribute on its root element.
org.tm4j.topicmap.utils.TopicMapBuilder builder Optional TopicMapBuilder; if not provided, then the type of builder used will depend on the file extension of the baseLocator address. If the file extension is ".ltm" or ".txt", an LTMBuilder will be used, otherwise an XTMBuilder will be used.
org.tm4j.topicmap.TopicMap existingTopicMap If this parameter is not null, then the TopicMap object passed in must be a TopicMap which is provided by this TopicMapProvider. The topic map parsed from srcStream will be merged with existingTopicMap and no new TopicMap object will be created.
java.io.InputStream srcStream The InputStream of the data to be read.

Returns

The new TopicMap object managed by the TopicMapProvider. If existingTopicMap is not null, then the return value from the function will be the same object as is passed in existingTopicMap. If existingTopicMap is null, then a new TopicMap object will be returned.

Other Resources