org.tm4j.topicmap.TopicMapProviderBase .readTopicMap(java.io.InputStream srcStream,java.lang.String systemId)

Description

Reads a topic map from the given input stream using the specified system ID.

Parameters
java.io.InputStream srcStream The input stream to load the topic map from. This input stream must represent a well-formed XML document or the underlying SAX parser will fail.
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

Other Resources

Related Topics