|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.xml.AbstractTopicMapExporter net.ontopia.topicmaps.xml.TMXMLWriter
public class TMXMLWriter
PUBLIC: A writer exporting topic maps (or fragments) to the TM/XML syntax.
Field Summary | |
---|---|
protected static org.xml.sax.helpers.AttributeListImpl |
EMPTY_ATTR_LIST
|
static java.lang.String |
NS_ISO
|
static java.lang.String |
NS_TM
|
static java.lang.String |
NS_XTM
|
static java.lang.String |
XSD_ANYURI
|
static java.lang.String |
XSD_STRING
|
Fields inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter |
---|
add_ids, filter |
Constructor Summary | |
---|---|
TMXMLWriter(org.xml.sax.DocumentHandler out)
INTERNAL: Creates a writer writing to the given DocumentHandler. |
|
TMXMLWriter(java.io.File out)
PUBLIC: Creates a writer writing to the given file in UTF-8. |
|
TMXMLWriter(java.lang.String filename)
PUBLIC: Creates a writer writing to the given file in the utf-8 character encoding. |
|
TMXMLWriter(java.lang.String filename,
java.lang.String encoding)
PUBLIC: Creates a writer writing to the given file in the given character encoding. |
|
TMXMLWriter(java.io.Writer out)
PUBLIC: Creates a writer writing to the given writer in the utf-8 character encoding. |
|
TMXMLWriter(java.io.Writer out,
java.lang.String encoding)
PUBLIC: Creates a writer writing to the given writer in the given character encoding. |
Method Summary | |
---|---|
void |
close()
PUBLIC: Closes the Writer created for internal use. |
void |
endTopicMap()
PUBLIC: Write the end tag of the document element (fragment mode only). |
void |
gatherPrefixes(java.util.Collection topics)
PUBLIC: Gets the namespace prefixes to be used (to be used in fragment exporting mode only). |
void |
gatherPrefixes(TopicIF topic)
PUBLIC: Gets the namespace prefixes to be used (to be used in fragment exporting mode only). |
java.lang.String |
getDocumentElement()
PUBLIC: Returns the element type name of the document element. |
java.util.Map |
getNamespaceURIMapping()
PRIVATE: Returns the namespace URI to prefix mapping maintained internally by the writer. |
protected java.lang.String |
getSubjectIndicatorRef(TopicIF topic,
LocatorIF indicator)
|
void |
setDocumentElement(java.lang.String docelem)
PUBLIC: Sets the document element type name to use. |
void |
startTopicMap(TopicMapIF topicmap)
PUBLIC: Writes the start tag of the document element (to be used in fragment exporting only). |
void |
write(TopicMapIF topicmap)
PUBLIC: Writes the given topic map to the underlying writer. |
void |
writeTopic(TopicIF topic)
PUBLIC: Writes a single topic (fragment exporting mode only). |
void |
writeTopics(java.util.Collection topics)
PUBLIC: Writes a set of topics (fragment exporting mode only). |
Methods inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter |
---|
addId, filterCollection, filterOk, getElementId, isValidXMLId, mayCollide, setFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.xml.sax.helpers.AttributeListImpl EMPTY_ATTR_LIST
public static final java.lang.String NS_ISO
public static final java.lang.String NS_XTM
public static final java.lang.String NS_TM
public static final java.lang.String XSD_ANYURI
public static final java.lang.String XSD_STRING
Constructor Detail |
---|
public TMXMLWriter(java.lang.String filename) throws java.io.IOException
java.io.IOException
public TMXMLWriter(java.lang.String filename, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public TMXMLWriter(java.io.Writer out) throws java.io.IOException
java.io.IOException
public TMXMLWriter(java.io.Writer out, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public TMXMLWriter(java.io.File out) throws java.io.IOException
java.io.IOException
public TMXMLWriter(org.xml.sax.DocumentHandler out)
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public java.lang.String getDocumentElement()
public void setDocumentElement(java.lang.String docelem)
public void write(TopicMapIF topicmap) throws java.io.IOException
write
in interface TopicMapWriterIF
topicmap
- The topic map to be exported.
java.io.IOException
- Thrown if writing the topic map fails.public void startTopicMap(TopicMapIF topicmap) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void gatherPrefixes(java.util.Collection topics)
public void writeTopics(java.util.Collection topics) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void writeTopic(TopicIF topic) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endTopicMap() throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void gatherPrefixes(TopicIF topic)
public java.util.Map getNamespaceURIMapping()
protected java.lang.String getSubjectIndicatorRef(TopicIF topic, LocatorIF indicator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |