net.ontopia.topicmaps.classify
Class FormatModule

java.lang.Object
  extended by net.ontopia.topicmaps.classify.FormatModule
All Implemented Interfaces:
FormatModuleIF

public class FormatModule
extends Object
implements FormatModuleIF

INTERNAL:


Field Summary
protected  FormatModuleIF fallout_module
           
protected  List modules
           
 
Constructor Summary
FormatModule()
           
 
Method Summary
static int detectCharSet(byte[] content)
           
 FormatModuleIF detectFormat(ClassifiableContentIF cc)
           
static byte[] getBytes(String s)
           
static byte[][] getBytes(String[] s)
           
static String getCharSetName(int charSet)
           
static int getOffset(int charSet)
           
 boolean matchesContent(ClassifiableContentIF cc)
          INTERNAL: Returns true if the content of the classifiable content is considered to be of the supported format.
static boolean matchesExtension(String uri, String[] extensions)
           
 boolean matchesIdentifier(ClassifiableContentIF cc)
          INTERNAL: Returns true if the identifier of the classifiable content is considered to be indicating the supported format.
 void readContent(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 boolean startsWith(byte[] content, byte[] s)
           
static boolean startsWithSkipWhitespace(byte[] content, byte[] s)
           
static boolean startsWithSkipWhitespace(byte[] content, byte[][] ss)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modules

protected List modules

fallout_module

protected FormatModuleIF fallout_module
Constructor Detail

FormatModule

public FormatModule()
Method Detail

matchesContent

public boolean matchesContent(ClassifiableContentIF cc)
Description copied from interface: FormatModuleIF
INTERNAL: Returns true if the content of the classifiable content is considered to be of the supported format.

Specified by:
matchesContent in interface FormatModuleIF

matchesIdentifier

public boolean matchesIdentifier(ClassifiableContentIF cc)
Description copied from interface: FormatModuleIF
INTERNAL: Returns true if the identifier of the classifiable content is considered to be indicating the supported format.

Specified by:
matchesIdentifier in interface FormatModuleIF

readContent

public void readContent(ClassifiableContentIF cc,
                        TextHandlerIF handler)
Description copied from interface: FormatModuleIF
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.

Specified by:
readContent in interface FormatModuleIF

detectFormat

public FormatModuleIF detectFormat(ClassifiableContentIF cc)

matchesExtension

public static boolean matchesExtension(String uri,
                                       String[] extensions)

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)


Copyright © 2000-2012 Ontopia.