|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.xml.XTMTopicMapWriter
public class XTMTopicMapWriter
PUBLIC: A topic map writer that can write topic maps out as either XTM 1.0, 2.0 or 2.1. The default is XTM 1.0.
Field Summary | |
---|---|
protected boolean |
add_ids
|
protected boolean |
export_srclocs
|
protected DeciderIF |
filter
|
protected org.xml.sax.DocumentHandler |
out
|
protected java.io.Writer |
writer
|
Constructor Summary | |
---|---|
XTMTopicMapWriter(java.io.File file)
PUBLIC: Creates a topic map writer bound to the file given in the arguments. |
|
XTMTopicMapWriter(java.io.File file,
java.lang.String encoding)
PUBLIC: Creates a topic map writer bound to the file given in the arguments. |
|
XTMTopicMapWriter(java.io.OutputStream stream,
java.lang.String encoding)
PUBLIC: Creates a topic map writer bound to the output stream given in the arguments. |
|
XTMTopicMapWriter(java.lang.String filename)
PUBLIC: Creates a topic map writer bound to the file given in the arguments. |
|
XTMTopicMapWriter(java.io.Writer writer,
java.lang.String encoding)
PUBLIC: Creates a topic map writer bound to the Writer given in the arguments; we do not recommend the use of this method. |
Method Summary | |
---|---|
boolean |
getAddIds()
PUBLIC: Returns true if configured to add IDs to all elements. |
boolean |
getExportSourceLocators()
INTERNAL: Returns true if source locators should be exported. |
void |
setAddIds(boolean add_ids)
PUBLIC: Tells the exporter whether or not to add IDs to all elements. |
void |
setExportSourceLocators(boolean export_srclocs)
INTERNAL: Set the flag that says whether source locators should be exported or not. |
void |
setFilter(DeciderIF filter)
PUBLIC: Sets a filter used to filter the topic map before export. |
void |
setVersion(int version)
Deprecated. |
void |
setVersion(XTMVersion version)
PUBLIC: Set XTM version to use on export. |
void |
write(TopicMapIF topicmap)
PUBLIC: Writes the given topic map to an implicit implementation dependent destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.xml.sax.DocumentHandler out
protected java.io.Writer writer
protected DeciderIF filter
protected boolean export_srclocs
protected boolean add_ids
Constructor Detail |
---|
public XTMTopicMapWriter(java.lang.String filename) throws java.io.IOException
filename
- The name of the file to which the topic map is to
be written.
java.io.IOException
public XTMTopicMapWriter(java.io.File file) throws java.io.IOException
file
- The file object to which the topic map is to be written.
java.io.IOException
public XTMTopicMapWriter(java.io.File file, java.lang.String encoding) throws java.io.IOException
file
- The file object to which the topic map is to be written.encoding
- The character encoding to write the topic map in.
java.io.IOException
public XTMTopicMapWriter(java.io.OutputStream stream, java.lang.String encoding) throws java.io.IOException, java.io.UnsupportedEncodingException
stream
- The output stream to which the topic map is to be
written.encoding
- The character encoding to write the topic map in.
java.io.UnsupportedEncodingException
- Thrown when the character
encoding is not supported by the Java environment.
java.io.IOException
public XTMTopicMapWriter(java.io.Writer writer, java.lang.String encoding) throws java.io.IOException
writer
- The Writer to which the topic map is to be
written.encoding
- The character encoding the Writer writes in.
Note that this must be set correctly, or the XML
document will not parse correctly.
java.io.IOException
Method Detail |
---|
public void setFilter(DeciderIF filter)
public boolean getAddIds()
public void setAddIds(boolean add_ids)
@Deprecated public void setVersion(int version)
setVersion(XTMVersion).
public void setVersion(XTMVersion version)
public void write(TopicMapIF topicmap) throws java.io.IOException
TopicMapWriterIF
write
in interface TopicMapWriterIF
topicmap
- The topic map to be exported/written;
an object implementing TopicMapIF
java.io.IOException
- Thrown if writing the topic map fails.public boolean getExportSourceLocators()
public void setExportSourceLocators(boolean export_srclocs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |