|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.annotation.wordfreak.io.AbstractAnnotatedFileFormat
org.annotation.wordfreak.io.WordFreakFileFormat
Implements the native WordFreak file format.
Field Summary | |
static java.lang.String |
ANNOTATION_XML_TYPE
the type used to create the Annotations in an XML file |
static java.lang.String |
EXTENSION
|
static java.lang.String |
FILE_XML_TYPE
|
static java.lang.String |
OLD_FILE_XML_TYPE
|
Fields inherited from class org.annotation.wordfreak.io.AbstractAnnotatedFileFormat |
DOCUMENT, GOLD, iconPaths, icons, LOADED, LOADED_GOLD, LOADING |
Constructor Summary | |
WordFreakFileFormat()
|
Method Summary | |
void |
addProgressListener(ProgressListener pl)
|
java.io.File |
getAnnotatedFile(java.lang.String sourceFileName)
Computes the expected annotation file name for this format from the specified source file name. |
java.lang.String |
getExtension()
Returns the default file extension for files in this format. |
javax.swing.filechooser.FileFilter |
getFileFilter()
Returns the file filter for this file format. |
java.lang.String |
getFormatName()
Returns the name of the file format. |
static AnnotatedFileFormat |
getInstance()
|
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 |
handlesFile(java.lang.String af)
Returns true if this can open the file specified by af . |
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 |
removeProgressListener(ProgressListener pl)
|
void |
write(AnnotationFile af,
java.io.Writer out)
Writes the contents of the AnnotationFile to the Writer specified by out . |
Methods inherited from class org.annotation.wordfreak.io.AbstractAnnotatedFileFormat |
getIcon, getNextChunk, getPrevChunk, getSettings, hasNextChunk, hasPrevChunk, initIcons, setIconPaths |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EXTENSION
public static final java.lang.String FILE_XML_TYPE
public static final java.lang.String OLD_FILE_XML_TYPE
public static final java.lang.String ANNOTATION_XML_TYPE
Constructor Detail |
public WordFreakFileFormat()
Method Detail |
public static AnnotatedFileFormat getInstance()
public AnnotationFile read(java.lang.String source, java.lang.String ann, java.lang.String encoding) throws java.io.IOException
AnnotatedFileFormat
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
AnnotatedFileFormat
out
. Also writes the source, if the source has changed
This method should not close the Writer.
af
- the annotation file.out
- the Writer to which the file should be written.
java.io.IOException
public javax.swing.filechooser.FileFilter getFileFilter()
FileFormat
public java.lang.String getFormatName()
FileFormat
public void addProgressListener(ProgressListener pl)
public void removeProgressListener(ProgressListener pl)
public java.lang.String getExtension()
FileFormat
public boolean handlesFile(java.lang.String af)
FileFormat
af
.
af
, false otherwise.public SourceFileFormat getSourceFileFormat()
AnnotatedFileFormat
public java.io.File getSourceFile(java.lang.String annotatedFileName)
AnnotatedFileFormat
annotatedFileName
- The name of the annotated file.
public java.io.File getAnnotatedFile(java.lang.String sourceFileName)
AnnotatedFileFormat
sourceFileName
- The name of the source file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |