Package net.ontopia.topicmaps.classify
Class FormatModule
- java.lang.Object
-
- net.ontopia.topicmaps.classify.FormatModule
-
- All Implemented Interfaces:
FormatModuleIF
public class FormatModule extends Object implements FormatModuleIF
INTERNAL:
-
-
Field Summary
Fields Modifier and Type Field Description protected FormatModuleIFfallout_moduleprotected List<FormatModuleIF>modules
-
Constructor Summary
Constructors Constructor Description FormatModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intdetectCharSet(byte[] content)FormatModuleIFdetectFormat(ClassifiableContentIF cc)static byte[]getBytes(String s)static byte[][]getBytes(String[] s)static StringgetCharSetName(int charSet)static intgetOffset(int charSet)booleanmatchesContent(ClassifiableContentIF cc)INTERNAL: Returns true if the content of the classifiable content is considered to be of the supported format.static booleanmatchesExtension(String uri, String[] extensions)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.static booleanstartsWith(byte[] content, byte[] s)static booleanstartsWithSkipWhitespace(byte[] content, byte[] s)static booleanstartsWithSkipWhitespace(byte[] content, byte[][] ss)
-
-
-
Field Detail
-
modules
protected List<FormatModuleIF> modules
-
fallout_module
protected FormatModuleIF fallout_module
-
-
Method Detail
-
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
-
detectFormat
public FormatModuleIF detectFormat(ClassifiableContentIF cc)
-
getCharSetName
public static String getCharSetName(int charSet)
-
getOffset
public static int getOffset(int charSet)
-
detectCharSet
public static int detectCharSet(byte[] content)
-
getBytes
public static byte[] getBytes(String s)
-
getBytes
public static byte[][] getBytes(String[] s)
-
startsWith
public static boolean startsWith(byte[] content, byte[] s)
-
startsWithSkipWhitespace
public static boolean startsWithSkipWhitespace(byte[] content, byte[][] ss)
-
startsWithSkipWhitespace
public static boolean startsWithSkipWhitespace(byte[] content, byte[] s)
-
-