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 LocatorIF
map_uri
protected TopicMapStoreFactoryIF
stores
-
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 void
addItemIdentifier(TopicIF topic, LocatorIF locator)
protected void
addSubjectIdentifier(TopicIF topic, LocatorIF locator)
void
characters(char[] ch, int start, int length)
protected LocatorIF
createLocator(String address)
protected LocatorIF
createURILocator(String address)
void
endDocument()
void
endElement(String uri, String name, String qName)
protected LocatorIF
getBaseAddress()
TopicMapIF
getTopicMap()
INTERNAL: Gets the topic map found after having parsed the input source.protected void
registerSourceLocator(TMObjectIF tmobject, String id)
protected void
registerSourceLocator(TopicIF tmobject, String id)
protected TopicIF
resolveTopicRef(String address)
void
startDocument()
void
startElement(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:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
-
endDocument
public void endDocument()
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
-
startElement
public void startElement(String uri, String name, String qName, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
endElement
public void endElement(String uri, String name, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in 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)
-
-