org.tm4j.topicmap.TopicMapProviderBase .readTopicMap(java.lang.String publicId,java.lang.String systemId)

Description

Reads a topic map provided with both a public and system identifier. Resolution relies on the availability of the catalog resolver.

If both the public and system identifers are provided, which has priority depends on the settings of the XML catalog file. If the public identifier is null or no mapping is found, the system will use the system identifier as if no public identifier had been provided.

Parameters
java.lang.String publicId The Public ID which identifies the topic map. This may be null.
java.lang.String systemId The System ID which identifies the topic map. Note that the following considerations apply when this is null:
  • If srcStream represents an XML document that does not contain a !DOCTYPE declaration, setting systemId to null will not create any additional problems. Remember, however, that there is no way for the parser to validate the document if it can't find that declaration, so you should generally ensure that it's there if you want acceptable results.
  • If srcStream represents an XML document that does contain a !DOCTYPE declaration, you should make sure that its SYSTEM identifier points to an absolute URI if you really want to invoke this method with systemId set to null. Otherwise, the parser will attempt to validate the document, but will fail to find the DTD as it is unable to correctly resolve the !DOCTYPE declaration.
    • : @return A {@link TopicMap} created from the InputStream. The System ID which identifies the topic map. This is required.

Throws

Returns

A {@link TopicMap} created by parsing the external document.

Other Resources