Package net.ontopia.topicmaps.classify
Class XMLFormatModule
- java.lang.Object
-
- net.ontopia.topicmaps.classify.XMLFormatModule
-
- All Implemented Interfaces:
FormatModuleIF
- Direct Known Subclasses:
HTMLFormatModule
public class XMLFormatModule extends Object implements FormatModuleIF
INTERNAL:
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]extensionsprotected byte[]magicBytesprotected Collection<String>skipElements
-
Constructor Summary
Constructors Constructor Description XMLFormatModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLReadercreateXMLReader()protected ContentHandlergetContentHandler(TextHandlerIF handler)booleanmatchesContent(ClassifiableContentIF cc)INTERNAL: Returns true if the content of the classifiable content is considered to be of the supported format.booleanmatchesIdentifier(ClassifiableContentIF cc)INTERNAL: Returns true if the identifier of the classifiable content is considered to be indicating the supported format.voidreadContent(ClassifiableContentIF cc, TextHandlerIF handler)INTERNAL: Reads and analyzes the classifiable content and triggers callbacks on the text handler to identify the text and the structure of the classifiable content.voidsetSkipElements(Collection<String> skipElements)
-
-
-
Field Detail
-
skipElements
protected Collection<String> skipElements
-
extensions
protected String[] extensions
-
magicBytes
protected byte[] magicBytes
-
-
Method Detail
-
setSkipElements
public void setSkipElements(Collection<String> skipElements)
-
createXMLReader
protected XMLReader createXMLReader() throws SAXException
- Throws:
SAXException
-
getContentHandler
protected ContentHandler getContentHandler(TextHandlerIF handler)
-
matchesContent
public boolean matchesContent(ClassifiableContentIF cc)
Description copied from interface:FormatModuleIFINTERNAL: Returns true if the content of the classifiable content is considered to be of the supported format.- Specified by:
matchesContentin interfaceFormatModuleIF
-
matchesIdentifier
public boolean matchesIdentifier(ClassifiableContentIF cc)
Description copied from interface:FormatModuleIFINTERNAL: Returns true if the identifier of the classifiable content is considered to be indicating the supported format.- Specified by:
matchesIdentifierin interfaceFormatModuleIF
-
readContent
public void readContent(ClassifiableContentIF cc, TextHandlerIF handler)
Description copied from interface:FormatModuleIFINTERNAL: Reads and analyzes the classifiable content and triggers callbacks on the text handler to identify the text and the structure of the classifiable content.- Specified by:
readContentin interfaceFormatModuleIF
-
-