se.lth.cs.nlp.nlputils.annotations
Class AnnotationType

java.lang.Object
  extended by se.lth.cs.nlp.nlputils.annotations.AnnotationType
Direct Known Subclasses:
ProcessedFNAnnotation, RawXMLAnnotation

public abstract class AnnotationType
extends Object

This class is inherited by factories of annotation types.

Author:
Richard Johansson (richard@cs.lth.se)

Constructor Summary
AnnotationType()
           
 
Method Summary
 AnnotatedText createLayers(InputStream in)
          Reads and parses an AnnotatedText from the given InputStream, using the format of the inheriting AnnotationType.
 AnnotatedText createLayers(String s)
          Reads and parses an AnnotatedText from a string, using the format of the inheriting AnnotationType.
 void printLayers(OutputStream out, AnnotatedText text)
          Prints an AnnotatedText to an OutputStream using the format of the inheriting AnnotationType.
 void printLayers(OutputStream out, String text, List<AnnotationLayer> l)
          Prints a list of layers on a text to an OutputStream using the format of the inheriting AnnotationType.
 void printLayers(PrintWriter out, AnnotatedText text)
          Prints an AnnotatedText to a PrintWriter using the format of the inheriting AnnotationType.
 void printLayers(PrintWriter out, String text, List<AnnotationLayer> l)
          Prints a list of layers on a text to a PrintWriter using the format of the inheriting AnnotationType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationType

public AnnotationType()
Method Detail

createLayers

public AnnotatedText createLayers(InputStream in)
                           throws IOException
Reads and parses an AnnotatedText from the given InputStream, using the format of the inheriting AnnotationType.

Parameters:
in - the input stream.
Returns:
the AnnotatedText.
Throws:
IOException

createLayers

public AnnotatedText createLayers(String s)
                           throws IOException
Reads and parses an AnnotatedText from a string, using the format of the inheriting AnnotationType.

Parameters:
s - the string.
Returns:
the AnnotatedText.
Throws:
IOException

printLayers

public void printLayers(PrintWriter out,
                        String text,
                        List<AnnotationLayer> l)
                 throws IOException
Prints a list of layers on a text to a PrintWriter using the format of the inheriting AnnotationType.

Parameters:
out - the writer.
text - the text.
l - the list of layers.
Throws:
IOException

printLayers

public void printLayers(PrintWriter out,
                        AnnotatedText text)
                 throws IOException
Prints an AnnotatedText to a PrintWriter using the format of the inheriting AnnotationType.

Parameters:
out - the writer.
text - the AnnotatedText.
Throws:
IOException

printLayers

public void printLayers(OutputStream out,
                        String text,
                        List<AnnotationLayer> l)
                 throws IOException
Prints a list of layers on a text to an OutputStream using the format of the inheriting AnnotationType.

Parameters:
out - the output stream.
text - the text.
l - the list of layers.
Throws:
IOException

printLayers

public void printLayers(OutputStream out,
                        AnnotatedText text)
                 throws IOException
Prints an AnnotatedText to an OutputStream using the format of the inheriting AnnotationType.

Parameters:
out - the output stream.
text - the AnnotatedText.
Throws:
IOException