org.annotation.wordfreak
Class AnnotationFile

java.lang.Object
  extended byorg.annotation.util.FeatureMap
      extended byorg.annotation.wordfreak.AnnotationFile
All Implemented Interfaces:
java.lang.Comparable, Property

public class AnnotationFile
extends FeatureMap
implements Property, java.lang.Comparable


Field Summary
static java.lang.String ANNOTATORS
           
static java.lang.String FEATURES
           
 
Fields inherited from class org.annotation.util.FeatureMap
DEFAULT_SET_DELIMITER, properties
 
Constructor Summary
AnnotationFile(java.lang.String annotationFileName, AnnotatedFileFormat ff)
          Create new annotation file object.
AnnotationFile(java.lang.String text, java.lang.String annotationFileName)
          Creates a new annotation file object.
 
Method Summary
 void add(Annotation a)
           
 void addAnnotation(Annotation a)
           
 void addAnnotator(java.lang.String a)
           
 void addFeature(java.lang.String f)
           
 void clear()
           
 void clearObjects(java.lang.String type)
           
 int compareTo(java.lang.Object o)
           
 boolean contains(Annotation a)
           
 Annotation createAnnotation(java.lang.String type, java.util.List children)
           
 Annotation[] getAnnotations()
           
 java.util.Iterator getAnnotationsIterator()
           
 AnnotationTree getAnnotationTree()
           
 java.lang.String getEncoding()
           
 AnnotatedFileFormat getFileFormat()
           
 AnnotationFilter getFilter()
           
 boolean getGold()
           
 java.lang.String getName()
          Return the name of the annotated file.
 void getNextChunk()
           
 java.util.Iterator getNonAnnotativeObjectKeys()
           
 java.util.List getObjects(java.lang.String type)
           
 void getPrevChunk()
           
 Annotation getRoot()
           
 boolean getSaved()
           
 Span getSpan()
           
 java.lang.String getText()
           
 java.lang.String getText(int s, int e)
           
 java.lang.String getTextFileName()
           
 boolean getTextSaved()
           
 boolean hasNextChunk()
           
 boolean hasPrevChunk()
           
 boolean hasProperty(java.lang.String p)
           
 java.util.Iterator iterator()
           
 void loadText(java.lang.String path)
           
 void loadText(java.lang.String path, java.lang.String enc)
           
 void print(java.io.PrintWriter out)
           
 void print(java.io.Writer out)
           
 void print(java.io.Writer out, FileFormat format)
           
 void printText()
           
 void printText(java.lang.String fileName)
           
 AnnotationFile readAnnotationFile(java.lang.String textFile, java.lang.String annFile)
           
 AnnotationFile readAnnotationFile(java.lang.String textFile, java.lang.String annFile, java.lang.String enc)
           
 void remove(Annotation a)
           
 void removeAnnotation(Annotation a)
           
 void setEncoding(java.lang.String enc)
           
 void setFileFormat(AnnotatedFileFormat ff)
           
 void setFilter(AnnotationFilter f)
           
 void setGold(boolean g)
           
 void setName(java.lang.String n)
           
 void setObjects(java.lang.String type, java.util.List objs)
           
 void setSaved(boolean s)
           
 void setText(java.lang.String t)
           
 void setText(java.lang.String t, java.lang.String enc)
           
 void setTextFileName(java.lang.String n)
           
 void setTextSaved(boolean s)
           
 int size()
           
 
Methods inherited from class org.annotation.util.FeatureMap
addFeatureValue, addFeatureValue, existsFeature, getFeature, getFeatureAsSet, getFeatureAsSet, getFeatureSet, removeFeature, removeFeatureValue, removeFeatureValue, setFeature, setFeatures, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FEATURES

public static final java.lang.String FEATURES
See Also:
Constant Field Values

ANNOTATORS

public static final java.lang.String ANNOTATORS
See Also:
Constant Field Values
Constructor Detail

AnnotationFile

public AnnotationFile(java.lang.String text,
                      java.lang.String annotationFileName)
Creates a new annotation file object.

Parameters:
text - The text which underlies this annotation file.
annotationFileName - The name of the file containing the annotations for this file.

AnnotationFile

public AnnotationFile(java.lang.String annotationFileName,
                      AnnotatedFileFormat ff)
Create new annotation file object.

Parameters:
annotationFileName - The name of the file which contains the annotations for this file.
ff - The file format in which the annotationFileName is stored.
Method Detail

setFilter

public void setFilter(AnnotationFilter f)

getFilter

public AnnotationFilter getFilter()

setFileFormat

public void setFileFormat(AnnotatedFileFormat ff)

getFileFormat

public AnnotatedFileFormat getFileFormat()

hasNextChunk

public boolean hasNextChunk()

hasPrevChunk

public boolean hasPrevChunk()

getNextChunk

public void getNextChunk()

getPrevChunk

public void getPrevChunk()

clear

public void clear()

getRoot

public Annotation getRoot()

createAnnotation

public Annotation createAnnotation(java.lang.String type,
                                   java.util.List children)

add

public void add(Annotation a)

remove

public void remove(Annotation a)

addAnnotation

public void addAnnotation(Annotation a)

removeAnnotation

public void removeAnnotation(Annotation a)

getSaved

public boolean getSaved()

setSaved

public void setSaved(boolean s)

getTextSaved

public boolean getTextSaved()

setTextSaved

public void setTextSaved(boolean s)

getAnnotationTree

public AnnotationTree getAnnotationTree()

getAnnotationsIterator

public java.util.Iterator getAnnotationsIterator()

iterator

public java.util.Iterator iterator()

size

public int size()

getAnnotations

public Annotation[] getAnnotations()

contains

public boolean contains(Annotation a)

setGold

public void setGold(boolean g)

getGold

public boolean getGold()

getNonAnnotativeObjectKeys

public java.util.Iterator getNonAnnotativeObjectKeys()

getObjects

public java.util.List getObjects(java.lang.String type)

setObjects

public void setObjects(java.lang.String type,
                       java.util.List objs)

clearObjects

public void clearObjects(java.lang.String type)

addFeature

public void addFeature(java.lang.String f)

addAnnotator

public void addAnnotator(java.lang.String a)

setText

public void setText(java.lang.String t)

setText

public void setText(java.lang.String t,
                    java.lang.String enc)

getText

public java.lang.String getText()

getText

public java.lang.String getText(int s,
                                int e)

getEncoding

public java.lang.String getEncoding()

setEncoding

public void setEncoding(java.lang.String enc)

getSpan

public Span getSpan()

setName

public void setName(java.lang.String n)

getName

public java.lang.String getName()
Return the name of the annotated file.

Returns:
the name of the annotated file.

setTextFileName

public void setTextFileName(java.lang.String n)

getTextFileName

public java.lang.String getTextFileName()

loadText

public void loadText(java.lang.String path)

loadText

public void loadText(java.lang.String path,
                     java.lang.String enc)

readAnnotationFile

public AnnotationFile readAnnotationFile(java.lang.String textFile,
                                         java.lang.String annFile)
                                  throws java.io.IOException
Throws:
java.io.IOException

readAnnotationFile

public AnnotationFile readAnnotationFile(java.lang.String textFile,
                                         java.lang.String annFile,
                                         java.lang.String enc)
                                  throws java.io.IOException
Throws:
java.io.IOException

printText

public void printText()

printText

public void printText(java.lang.String fileName)

print

public void print(java.io.PrintWriter out)
           throws java.io.IOException
Throws:
java.io.IOException

print

public void print(java.io.Writer out)
           throws java.io.IOException
Throws:
java.io.IOException

print

public void print(java.io.Writer out,
                  FileFormat format)
           throws java.io.IOException
Throws:
java.io.IOException

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

hasProperty

public boolean hasProperty(java.lang.String p)
Specified by:
hasProperty in interface Property


Copyright © 2004 Thomas Morton and Jeremy LaCivita. All Rights Reserved.