public class CanonicalTopicMapWriter extends Object implements TopicMapWriterIF
Note: this is the format defined in an Ontopia technical report, not the upcoming standard format. For new code, please use the standard format.
Modifier and Type | Class and Description |
---|---|
class |
CanonicalTopicMapWriter.CanonicalXTMPrinter |
Modifier and Type | Field and Description |
---|---|
protected LocatorIF |
baseloc |
protected ContentHandler |
out |
Constructor and Description |
---|
CanonicalTopicMapWriter(File file)
Creates a topic map writer bound to the file given in the arguments.
|
CanonicalTopicMapWriter(OutputStream stream)
Creates a topic map writer bound to the output stream given in
the arguments.
|
Modifier and Type | Method and Description |
---|---|
void |
export(TopicMapIF topicmap,
ContentHandler dh)
PUBLIC: Exports the topic map to the given ContentHandler.
|
LocatorIF |
getBaseLocator()
INTERNAL: Gets the base locator used to resolve relative locators.
|
void |
setAdditionalProperties(Map<String,Object> properties)
CanonicalTopicMapWriter has no additional properties.
|
void |
setBaseLocator(LocatorIF baseloc)
INTERNAL: Sets the base locator used to resolve relative locators.
|
void |
write(TopicMapIF topicmap)
PUBLIC: Writes the given topic map to an implicit implementation
dependent destination.
|
protected ContentHandler out
protected LocatorIF baseloc
public CanonicalTopicMapWriter(File file) throws IOException
file
- The file object to which the topic map is to be written.IOException
public CanonicalTopicMapWriter(OutputStream stream)
stream
- The output stream to which the topic map is to be
written.public void write(TopicMapIF topicmap) throws IOException
TopicMapWriterIF
write
in interface TopicMapWriterIF
topicmap
- The topic map to be exported/written;
an object implementing TopicMapIFIOException
- Thrown if writing the topic map fails.public LocatorIF getBaseLocator()
public void setBaseLocator(LocatorIF baseloc)
public void export(TopicMapIF topicmap, ContentHandler dh) throws IOException, SAXException
IOException
SAXException
public void setAdditionalProperties(Map<String,Object> properties)
setAdditionalProperties
in interface TopicMapWriterIF
properties
-