Package net.ontopia.topicmaps.utils.xfml
Class XFMLContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- net.ontopia.topicmaps.xml.AbstractTopicMapContentHandler
-
- net.ontopia.topicmaps.utils.xfml.XFMLContentHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class XFMLContentHandler extends AbstractTopicMapContentHandler
INTERNAL: SAX2 content handler used for importing XFML documents. The content handler builds a topic map object based on a SAX event stream conforming to the XFML interchange syntax.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocatorIFmap_uriprotected TopicMapStoreFactoryIFstores-
Fields inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapContentHandler
doc_address, ehandler, info, locator, parents, processed_documents_accumulated, processed_documents_current, processed_documents_from_parent, propagated_themes
-
-
Constructor Summary
Constructors Constructor Description XFMLContentHandler(TopicMapStoreFactoryIF stores, LocatorIF base_address)XFMLContentHandler(TopicMapStoreFactoryIF stores, LocatorIF base_address, Collection processed_documents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddItemIdentifier(TopicIF topic, LocatorIF locator)protected voidaddSubjectIdentifier(TopicIF topic, LocatorIF locator)voidcharacters(char[] ch, int start, int length)protected LocatorIFcreateLocator(String address)protected LocatorIFcreateURILocator(String address)voidendDocument()voidendElement(String uri, String name, String qName)protected LocatorIFgetBaseAddress()TopicMapIFgetTopicMap()INTERNAL: Gets the topic map found after having parsed the input source.protected voidregisterSourceLocator(TMObjectIF tmobject, String id)protected voidregisterSourceLocator(TopicIF tmobject, String id)protected TopicIFresolveTopicRef(String address)voidstartDocument()voidstartElement(String uri, String name, String qName, Attributes atts)-
Methods inherited from class net.ontopia.topicmaps.xml.AbstractTopicMapContentHandler
getDefaultErrorHandler, getLocationInfo, getPropagatedThemes, propagateThemes, register, setDocumentLocator, setPropagatedThemes
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
stores
protected TopicMapStoreFactoryIF stores
-
map_uri
protected LocatorIF map_uri
-
-
Constructor Detail
-
XFMLContentHandler
public XFMLContentHandler(TopicMapStoreFactoryIF stores, LocatorIF base_address)
-
XFMLContentHandler
public XFMLContentHandler(TopicMapStoreFactoryIF stores, LocatorIF base_address, Collection processed_documents)
-
-
Method Detail
-
getTopicMap
public TopicMapIF getTopicMap()
INTERNAL: Gets the topic map found after having parsed the input source.
-
startDocument
public void startDocument()
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler
-
endDocument
public void endDocument()
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler
-
startElement
public void startElement(String uri, String name, String qName, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length)- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler
-
endElement
public void endElement(String uri, String name, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
getBaseAddress
protected LocatorIF getBaseAddress()
-
resolveTopicRef
protected TopicIF resolveTopicRef(String address) throws SAXException
- Throws:
SAXException
-
registerSourceLocator
protected void registerSourceLocator(TMObjectIF tmobject, String id)
-
-