public class XTMTopicMapExporter extends AbstractTopicMapExporter
| Modifier and Type | Field and Description |
|---|---|
protected AttributesImpl |
atts |
protected static AttributesImpl |
EMPTY_ATTR_LIST |
protected static String |
EMPTY_LOCALNAME |
protected static String |
EMPTY_NAMESPACE |
protected boolean |
export_srclocs |
add_ids, filter| Constructor and Description |
|---|
XTMTopicMapExporter()
Used to initialize the XTM Exporter
|
| Modifier and Type | Method and Description |
|---|---|
void |
export(TopicMapIF tm)
INTERNAL: Default export method.
|
void |
export(TopicMapIF tm,
ContentHandler dh)
INTERNAL: Traverses a Topic Map and emits SAX document handler events
according to the Topic Map interchange format to the given document
handler.
|
boolean |
getAddIds()
INTERNAL: Returns true if configured to add IDs to all elements.
|
boolean |
getExportSourceLocators()
INTERNAL: Returns true if source locators should be exported.
|
protected String |
getSubjectIndicatorRef(TopicIF topic,
LocatorIF indicator)
INTERNAL: This method is used to get the string form of the
subject indicator of a topic.
|
protected void |
reportInvalidLocator(LocatorIF locator) |
void |
setAddIds(boolean add_ids)
INTERNAL: 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.
|
protected void |
writeAssociation(AssociationIF assoc,
ContentHandler dh) |
protected void |
writeInstanceOf(TopicIF topic,
ContentHandler dh) |
protected void |
writeInstanceOf(TypedIF typed,
ContentHandler dh) |
protected void |
writeMembers(Collection roles,
ContentHandler dh) |
protected void |
writeOccurrences(Collection occurrences,
ContentHandler dh) |
protected void |
writeParameters(VariantNameIF variant,
ContentHandler dh) |
protected void |
writeRoleSpec(TopicIF topic,
ContentHandler dh) |
protected void |
writeScope(Collection scope,
ContentHandler dh) |
protected void |
writeSubjectIdentity(TopicIF topic,
ContentHandler dh) |
protected void |
writeTopic(TopicIF topic,
ContentHandler dh) |
protected void |
writeTopicNames(Collection names,
ContentHandler dh) |
protected void |
writeTopicRef(TopicIF topic,
ContentHandler dh) |
protected void |
writeVariantName(VariantNameIF variant,
ContentHandler dh) |
protected void |
writeVariants(Collection variants,
ContentHandler dh) |
addId, filterCollection, filterOk, getElementId, isValidXMLId, mayCollide, setFilterprotected AttributesImpl atts
protected static final AttributesImpl EMPTY_ATTR_LIST
protected static final String EMPTY_NAMESPACE
protected static final String EMPTY_LOCALNAME
protected boolean export_srclocs
public XTMTopicMapExporter()
public boolean getExportSourceLocators()
public void setExportSourceLocators(boolean export_srclocs)
public boolean getAddIds()
public void setAddIds(boolean add_ids)
public void export(TopicMapIF tm) throws SAXException, IOException
SAXExceptionIOExceptionpublic void export(TopicMapIF tm, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeTopic(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeInstanceOf(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeInstanceOf(TypedIF typed, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeTopicNames(Collection names, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeTopicRef(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected String getSubjectIndicatorRef(TopicIF topic, LocatorIF indicator)
If the subject indicator is of the form "base#fragment", where base is the base address of the topic map store, the returned address is "#fragment". If not, but the indicator is used for reification, the returned address is "id" + the object ID of the reified object.
This procedure is employed to ensure that this method produces the same results as AbstractTopicMapExporter.getElementId, which is necessary to avoid breaking reification of local objects on export.
protected void writeSubjectIdentity(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeVariants(Collection variants, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeVariantName(VariantNameIF variant, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeParameters(VariantNameIF variant, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeScope(Collection scope, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeOccurrences(Collection occurrences, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeAssociation(AssociationIF assoc, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeMembers(Collection roles, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeRoleSpec(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected void reportInvalidLocator(LocatorIF locator)