|
||||||||||
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.XTMTopicMapExporter
public class XTMTopicMapExporter
INTERNAL: Exports topic maps to the XTM 1.0 interchange format.
Field Summary | |
---|---|
protected org.xml.sax.helpers.AttributeListImpl |
atts
|
protected static org.xml.sax.helpers.AttributeListImpl |
EMPTY_ATTR_LIST
|
protected boolean |
export_srclocs
|
Fields inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapExporter |
---|
add_ids, filter |
Constructor Summary | |
---|---|
XTMTopicMapExporter()
Used to initialize the XTM Exporter |
Method Summary | |
---|---|
void |
export(TopicMapIF tm)
INTERNAL: Default export method. |
void |
export(TopicMapIF tm,
org.xml.sax.DocumentHandler 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 java.lang.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,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeInstanceOf(TopicIF topic,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeInstanceOf(TypedIF typed,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeMembers(java.util.Collection roles,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeOccurrences(java.util.Collection occurrences,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeParameters(VariantNameIF variant,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeRoleSpec(TopicIF topic,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeScope(java.util.Collection scope,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeSubjectIdentity(TopicIF topic,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeTopic(TopicIF topic,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeTopicNames(java.util.Collection names,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeTopicRef(TopicIF topic,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeVariantName(VariantNameIF variant,
org.xml.sax.DocumentHandler dh)
|
protected void |
writeVariants(java.util.Collection variants,
org.xml.sax.DocumentHandler dh)
|
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 org.xml.sax.helpers.AttributeListImpl atts
protected static final org.xml.sax.helpers.AttributeListImpl EMPTY_ATTR_LIST
protected boolean export_srclocs
Constructor Detail |
---|
public XTMTopicMapExporter()
Method Detail |
---|
public boolean getExportSourceLocators()
public void setExportSourceLocators(boolean export_srclocs)
public boolean getAddIds()
public void setAddIds(boolean add_ids)
public void export(TopicMapIF tm) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
public void export(TopicMapIF tm, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeTopic(TopicIF topic, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeInstanceOf(TopicIF topic, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeInstanceOf(TypedIF typed, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeTopicNames(java.util.Collection names, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeTopicRef(TopicIF topic, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.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, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeVariants(java.util.Collection variants, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeVariantName(VariantNameIF variant, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeParameters(VariantNameIF variant, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeScope(java.util.Collection scope, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeOccurrences(java.util.Collection occurrences, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeAssociation(AssociationIF assoc, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeMembers(java.util.Collection roles, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void writeRoleSpec(TopicIF topic, org.xml.sax.DocumentHandler dh) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void reportInvalidLocator(LocatorIF locator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |