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, setFilter
protected 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
SAXException
IOException
public void export(TopicMapIF tm, ContentHandler dh) throws SAXException
SAXException
protected void writeTopic(TopicIF topic, ContentHandler dh) throws SAXException
SAXException
protected void writeInstanceOf(TopicIF topic, ContentHandler dh) throws SAXException
SAXException
protected void writeInstanceOf(TypedIF typed, ContentHandler dh) throws SAXException
SAXException
protected void writeTopicNames(Collection names, ContentHandler dh) throws SAXException
SAXException
protected void writeTopicRef(TopicIF topic, ContentHandler dh) throws SAXException
SAXException
protected 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
SAXException
protected void writeVariants(Collection variants, ContentHandler dh) throws SAXException
SAXException
protected void writeVariantName(VariantNameIF variant, ContentHandler dh) throws SAXException
SAXException
protected void writeParameters(VariantNameIF variant, ContentHandler dh) throws SAXException
SAXException
protected void writeScope(Collection scope, ContentHandler dh) throws SAXException
SAXException
protected void writeOccurrences(Collection occurrences, ContentHandler dh) throws SAXException
SAXException
protected void writeAssociation(AssociationIF assoc, ContentHandler dh) throws SAXException
SAXException
protected void writeMembers(Collection roles, ContentHandler dh) throws SAXException
SAXException
protected void writeRoleSpec(TopicIF topic, ContentHandler dh) throws SAXException
SAXException
protected void reportInvalidLocator(LocatorIF locator)