org.annotation.wordfreak
Class AnnotationFile
java.lang.Object
org.annotation.util.FeatureMap
org.annotation.wordfreak.AnnotationFile
- All Implemented Interfaces:
- java.lang.Comparable, Property
- public class AnnotationFile
- extends FeatureMap
- implements Property, java.lang.Comparable
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. |
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 |
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
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.
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.