morfologik.fsa
Interface FSASerializer

All Known Implementing Classes:
CFSA2Serializer, FSA5Serializer

public interface FSASerializer

All FSA serializers to binary formats will implement this interface.


Method Summary
 java.util.Set<FSAFlags> getFlags()
          Returns the set of flags supported by the serializer (and the output automaton).
<T extends java.io.OutputStream>
T
serialize(FSA fsa, T os)
          Serialize a finite state automaton to an output stream.
 FSASerializer withAnnotationSeparator(byte annotationSeparator)
          Supports built-in annotation separator.
 FSASerializer withFiller(byte filler)
          Supports built-in filler separator.
 FSASerializer withLogger(IMessageLogger logger)
          Log extra messages during construction.
 FSASerializer withNumbers()
          Supports built-in right language count on nodes, speeding up perfect hash counts.
 

Method Detail

serialize

<T extends java.io.OutputStream> T serialize(FSA fsa,
                                             T os)
                                         throws java.io.IOException
Serialize a finite state automaton to an output stream.

Throws:
java.io.IOException

getFlags

java.util.Set<FSAFlags> getFlags()
Returns the set of flags supported by the serializer (and the output automaton).


withLogger

FSASerializer withLogger(IMessageLogger logger)
Log extra messages during construction.


withFiller

FSASerializer withFiller(byte filler)
Supports built-in filler separator. Only if getFlags() returns FSAFlags.SEPARATORS.


withAnnotationSeparator

FSASerializer withAnnotationSeparator(byte annotationSeparator)
Supports built-in annotation separator. Only if getFlags() returns FSAFlags.SEPARATORS.


withNumbers

FSASerializer withNumbers()
Supports built-in right language count on nodes, speeding up perfect hash counts. Only if getFlags() returns FSAFlags.NUMBERS.