public class XTMFragmentExporter extends XTMTopicMapExporter
Note that the TopicMapFragmentWriterIF implementation is not this class, but XTMTopicMapFragmentWriter.
WARNING: This class is not thread-safe.
XTMTopicMapFragmentWriter| Modifier and Type | Class and Description |
|---|---|
static interface |
XTMFragmentExporter.LocatorHandlerIF
EXPERIMENTAL: Handler class used for processing locators.
|
| Modifier and Type | Field and Description |
|---|---|
protected Set |
alreadyExported |
protected static String |
EMPTY_LOCALNAME |
protected static String |
EMPTY_NAMESPACE |
protected XTMFragmentExporter.LocatorHandlerIF |
locator_handler |
protected Collection |
reifiers |
protected boolean |
use_local_ids |
static String |
VIRTUAL_URN |
atts, EMPTY_ATTR_LIST, export_srclocsadd_ids, filter| Constructor and Description |
|---|
XTMFragmentExporter()
PUBLIC: Initializes the exporter.
|
XTMFragmentExporter(String tmid) |
| Modifier and Type | Method and Description |
|---|---|
void |
endTopicMap(ContentHandler dh)
PUBLIC: Outputs the end tag.
|
void |
exportAll(Iterator it,
ContentHandler dh)
PUBLIC: Exports an XTM Fragment (complete with root element) to
the given ContentHandler, containing all the topics retrieved
from the Iterator.
|
void |
exportTopicNames(Iterator it,
ContentHandler dh)
PUBLIC: Exports a set of topic names without any wrapping
element.
|
void |
exportTopics(Iterator it,
ContentHandler dh)
PUBLIC: Exports a set of topics without any wrapping element.
|
boolean |
getUseLocalIds()
PUBLIC: Whether or not internal references of the form '#id' will
be exported.
|
static boolean |
isVirtualReference(String address) |
protected String |
makeVirtualReference(TopicIF topic) |
static String |
makeVirtualReference(TopicIF topic,
String topicmap_id) |
static String |
resolveVirtualReference(String address,
String tmid) |
void |
setLocatorHandler(XTMFragmentExporter.LocatorHandlerIF locator_handler)
EXPERIMENTAL: Sets the locator handler.
|
void |
setUseLocalIds(boolean use_local_ids)
PUBLIC: Controls whether or not internal references of the
form '#id' will be used.
|
static String |
sourceTopicMapFromVirtualReference(String address) |
void |
startTopicMap(ContentHandler dh)
PUBLIC: Outputs the
|
protected void |
writeAssociation(AssociationIF assoc,
ContentHandler dh) |
protected void |
writeMembers(AssociationIF assoc,
ContentHandler dh) |
protected void |
writeOccurrences(Collection occurrences,
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 |
writeTopicNames(TopicIF topic,
ContentHandler dh) |
protected void |
writeTopicRef(TopicIF topic,
ContentHandler dh) |
protected void |
writeVariants(Collection variants,
ContentHandler dh) |
export, export, getAddIds, getExportSourceLocators, getSubjectIndicatorRef, reportInvalidLocator, setAddIds, setExportSourceLocators, writeInstanceOf, writeInstanceOf, writeMembers, writeParameters, writeRoleSpec, writeScope, writeVariantNameaddId, filterCollection, filterOk, getElementId, isValidXMLId, mayCollide, setFilterpublic static final String VIRTUAL_URN
protected static final String EMPTY_NAMESPACE
protected static final String EMPTY_LOCALNAME
protected XTMFragmentExporter.LocatorHandlerIF locator_handler
protected Collection reifiers
protected Set alreadyExported
protected boolean use_local_ids
public XTMFragmentExporter()
public XTMFragmentExporter(String tmid)
public void setLocatorHandler(XTMFragmentExporter.LocatorHandlerIF locator_handler)
public void setUseLocalIds(boolean use_local_ids)
public boolean getUseLocalIds()
public void exportAll(Iterator it, ContentHandler dh) throws SAXException
SAXExceptionpublic void exportTopics(Iterator it, ContentHandler dh) throws SAXException
SAXExceptionpublic void exportTopicNames(Iterator it, ContentHandler dh) throws SAXException
SAXExceptionpublic void startTopicMap(ContentHandler dh) throws SAXException
SAXExceptionpublic void endTopicMap(ContentHandler dh) throws SAXException
SAXExceptionprotected void writeTopic(TopicIF topic, ContentHandler dh) throws SAXException
writeTopic in class XTMTopicMapExporterSAXExceptionprotected void writeTopicNames(TopicIF topic, ContentHandler dh) throws SAXException
SAXExceptionprotected void writeTopicNames(Collection names, ContentHandler dh) throws SAXException
writeTopicNames in class XTMTopicMapExporterSAXExceptionprotected void writeTopicRef(TopicIF topic, ContentHandler dh) throws SAXException
writeTopicRef in class XTMTopicMapExporterSAXExceptionprotected void writeSubjectIdentity(TopicIF topic, ContentHandler dh) throws SAXException
writeSubjectIdentity in class XTMTopicMapExporterSAXExceptionprotected void writeVariants(Collection variants, ContentHandler dh) throws SAXException
writeVariants in class XTMTopicMapExporterSAXExceptionprotected void writeOccurrences(Collection occurrences, ContentHandler dh) throws SAXException
writeOccurrences in class XTMTopicMapExporterSAXExceptionprotected void writeAssociation(AssociationIF assoc, ContentHandler dh) throws SAXException
writeAssociation in class XTMTopicMapExporterSAXExceptionprotected void writeMembers(AssociationIF assoc, ContentHandler dh) throws SAXException
SAXExceptionpublic static boolean isVirtualReference(String address)
public static String sourceTopicMapFromVirtualReference(String address)