org.tm4j.topicmap .TopicMapProviderBase

Description

Provides a skeleton implementation of a basic TopicMapProvider with the addTopicMap() method implemented. Back-end providers are free to derive their TopicMapProvider implementation from this class. The addTopicMap() method calls the getFactory() method to instantiate the TopicMapBuilder used during parsing of the file.

If the System property org.tm4j.useCatalogResolver is set to "true" or "yes", an org.apache.xml.resolver.tools.CatalogResolver will be created and attached to the SAXParser (as well as the embedded URILocatorResolver) for resolution of public and system identifiers. This also provides a utility method #resolveEntity(String,String) for this purpose.

The resolver understands OASIS TR9401 catalogs, XCatalogs, and the current working draft of the OASIS Entity Resolution Technical Committee. For more information on XML entity resolution using catalog files, see XML Entity and URI Resolvers (version 1.1) by Norm Walsh at Sun Microsystems.

Inheritance Hierarchy

Interfaces

Field Summary
defaultCatalogPath The default relative pathname for the XML Catalog file ("resource/tm4j.xcat").
m_catalogResolver Reusable XML catalog resolution service. XML catalog resolution service.
m_parser
Method Summary
TopicMap addTopicMap(java.io.InputStream srcStream,org.tm4j.net.Locator baseLocator)
A convenience method returning the added TopicMap.
TopicMap addTopicMap(java.io.InputStream srcStream,org.tm4j.net.Locator baseLocator,org.tm4j.topicmap.TopicMap existingTopicMap)
A convenience method returning the added TopicMap.
TopicMap addTopicMap(java.io.InputStream srcStream,org.tm4j.net.Locator baseLocator,org.tm4j.topicmap.TopicMap existingTopicMap,org.tm4j.topicmap.Topic[] addedThemes)
A convenience method returning the added TopicMap.
TopicMap 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)
Imports a topic map in XTM or LTM syntax into the data store managed by this TopicMapProvider.
TopicMap addTopicMap(java.io.InputStream srcStream,org.tm4j.net.Locator baseLocator,org.tm4j.topicmap.TopicMap existingTopicMap,org.tm4j.topicmap.utils.TopicMapBuilder builder)
A convenience method returning the added TopicMap.
void applyChangeListeners(org.tm4j.topicmap.TopicMap tm)
Applies a new instance of the default vetoable change listeners specified in the initialisation properties to tm.
void applyDefaultVetoListeners(org.tm4j.topicmap.TopicMap tm)
void attachCatalogResolver(java.lang.Object o)
A convenience method for attaching a CatalogResolver to an XML Parser.
org.apache.xml.resolver.tools.CatalogResolver getCatalogResolver()
Return the CatalogResolver used with this TopicMapProvider.
java.util.Properties getDefaultTopicMapProperties()
org.tm4j.topicmap.utils.TopicMapBuilder getTopicMapBuilder(java.lang.String notation)
void init(java.util.Properties props)
void initialiseBuilder(org.tm4j.topicmap.TopicMap existingTopicMap,org.tm4j.net.Locator srcLocator)
Sets up the XTMParser and XTMBuilder objects to be used in constructing a new TopicMap or in merging the contents of an XTM file into an existing TopicMap.
void isProvidedTopicMap(org.tm4j.topicmap.TopicMap tm)
Returns true if tm is provided by this TopicMapProvider
void mergeTopicMap(org.tm4j.topicmap.TopicMap baseTopicMap,org.tm4j.net.Locator externalTopicMap,org.tm4j.topicmap.Topic[] addedThemes)
TopicMap postProcess(org.tm4j.topicmap.TopicMap tm)
TopicMap readTopicMap(java.io.InputStream srcStream,java.lang.String systemId)
Reads a topic map from the given input stream using the specified system ID.
TopicMap readTopicMap(java.io.InputStream tmStream)
Reads a topic map from the given input stream.
TopicMap readTopicMap(java.lang.String publicId,java.lang.String systemId)
Reads a topic map provided with both a public and system identifier.
org.xml.sax.InputSource resolveEntity(java.lang.String publicId,java.lang.String systemId)
A utility method providing access to the CatalogResolver's resolution features.
void setCatalogResolver(org.apache.xml.resolver.tools.CatalogResolver catalogResolver)
Set the CatalogResolver used with this TopicMapProvider.
void setCatalogResolverDefaults()
A static method that sets each null (previously unset) CatalogResolver property to a default value.
void supportsTopicMapNotation(java.lang.String notation)

Related Topics

Is Contained By