|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This defines the interface for implementing new annotated file formats.
Method Summary | |
java.io.File |
getAnnotatedFile(java.lang.String sourceFileName)
Computes the expected annotation file name for this format from the specified source file name. |
void |
getNextChunk(AnnotationFile af)
Indicates that a subsequent portion of the specified file should be read into memory. |
void |
getPrevChunk(AnnotationFile af)
Indicates that a previous portion of the specified file should be read into memory. |
void |
getSettings()
Used to prompt user for file format settings. |
java.io.File |
getSourceFile(java.lang.String annotatedFileName)
Computes the expected source file name for this format from the specified annotated file name. |
SourceFileFormat |
getSourceFileFormat()
Returns the file format for the source used with this annotation file format. |
boolean |
hasNextChunk(AnnotationFile af)
Returns true if the specified annotation file has only been partially loaded and a subsequent portion remains can be loaded. |
boolean |
hasPrevChunk(AnnotationFile af)
Returns true if the specified annotation file has only been partially loaded and a prior portion remains can be loaded. |
AnnotationFile |
read(java.lang.String source,
java.lang.String ann,
java.lang.String encoding)
Reads an annotated file specified by ann and
returns an AnnotationFile object representing its contents. |
void |
write(AnnotationFile af,
java.io.Writer out)
Writes the contents of the AnnotationFile to the Writer specified by out . |
Methods inherited from interface org.annotation.wordfreak.io.FileFormat |
addProgressListener, getExtension, getFileFilter, getFormatName, getIcon, handlesFile, removeProgressListener |
Method Detail |
public AnnotationFile read(java.lang.String source, java.lang.String ann, java.lang.String encoding) throws java.io.IOException
ann
and
returns an AnnotationFile object representing its contents.
source
- the source file for the annotated file. This parameter
may not be required for non-statndoff annotation.ann
- the name of the annotated file.encoding
- the encoding which should be used to read the files.
java.io.IOException
public void write(AnnotationFile af, java.io.Writer out) throws java.io.IOException
out
. Also writes the source, if the source has changed
This method should not close the Writer.
write
in interface FileFormat
af
- the annotation file.out
- the Writer to which the file should be written.
java.io.IOException
public SourceFileFormat getSourceFileFormat()
public java.io.File getSourceFile(java.lang.String annotatedFileName)
annotatedFileName
- The name of the annotated file.
public java.io.File getAnnotatedFile(java.lang.String sourceFileName)
sourceFileName
- The name of the source file.
public void getSettings()
public boolean hasNextChunk(AnnotationFile af)
af
- The annoation file to be loaded.
public boolean hasPrevChunk(AnnotationFile af)
af
- The annoation file to be loaded.
public void getNextChunk(AnnotationFile af)
af
- The annotation file to be appended.public void getPrevChunk(AnnotationFile af)
af
- The annotation file to be prepended.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |