org.annotation.wordfreak.io
Class AbstractAnnotatedFileFormat

java.lang.Object
  extended byorg.annotation.wordfreak.io.AbstractAnnotatedFileFormat
All Implemented Interfaces:
AnnotatedFileFormat, FileFormat, Plugin
Direct Known Subclasses:
TextColumnsFileFormat, TreebankFileFormat, WordFreakFileFormat

public abstract class AbstractAnnotatedFileFormat
extends java.lang.Object
implements AnnotatedFileFormat

Author:
Tom Morton

Field Summary
protected static int DOCUMENT
           
protected static int GOLD
           
protected  java.lang.String[] iconPaths
           
protected  javax.swing.Icon[] icons
           
protected static int LOADED
           
protected static int LOADED_GOLD
           
protected static int LOADING
           
 
Constructor Summary
AbstractAnnotatedFileFormat()
           
 
Method Summary
 javax.swing.Icon getIcon(boolean gold, boolean loaded, boolean loading)
          Returns an icon to be displayed with files of this type.
 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.
 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.
protected  void initIcons()
           
protected  void setIconPaths(java.lang.String[] iconPaths)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.annotation.wordfreak.io.AnnotatedFileFormat
getAnnotatedFile, getSourceFile, getSourceFileFormat, read, write
 
Methods inherited from interface org.annotation.wordfreak.io.FileFormat
addProgressListener, getExtension, getFileFilter, getFormatName, handlesFile, removeProgressListener
 

Field Detail

iconPaths

protected java.lang.String[] iconPaths

icons

protected javax.swing.Icon[] icons

DOCUMENT

protected static final int DOCUMENT
See Also:
Constant Field Values

GOLD

protected static final int GOLD
See Also:
Constant Field Values

LOADING

protected static final int LOADING
See Also:
Constant Field Values

LOADED

protected static final int LOADED
See Also:
Constant Field Values

LOADED_GOLD

protected static final int LOADED_GOLD
See Also:
Constant Field Values
Constructor Detail

AbstractAnnotatedFileFormat

public AbstractAnnotatedFileFormat()
Method Detail

initIcons

protected void initIcons()

setIconPaths

protected void setIconPaths(java.lang.String[] iconPaths)

getIcon

public javax.swing.Icon getIcon(boolean gold,
                                boolean loaded,
                                boolean loading)
Description copied from interface: FileFormat
Returns an icon to be displayed with files of this type.

Specified by:
getIcon in interface FileFormat
Parameters:
gold - true if this is a gold file.
loaded - true if this file has been loaded.
loading - true if this file is loading.
Returns:
the icon to be display with files of this type.

getSettings

public void getSettings()
Description copied from interface: AnnotatedFileFormat
Used to prompt user for file format settings.

Specified by:
getSettings in interface AnnotatedFileFormat

hasNextChunk

public boolean hasNextChunk(AnnotationFile af)
Description copied from interface: AnnotatedFileFormat
Returns true if the specified annotation file has only been partially loaded and a subsequent portion remains can be loaded.

Specified by:
hasNextChunk in interface AnnotatedFileFormat
Parameters:
af - The annoation file to be loaded.
Returns:
True is if the specified annotation file has only been partially loaded and a subsequent portion can be loaded, false otherwise.

hasPrevChunk

public boolean hasPrevChunk(AnnotationFile af)
Description copied from interface: AnnotatedFileFormat
Returns true if the specified annotation file has only been partially loaded and a prior portion remains can be loaded.

Specified by:
hasPrevChunk in interface AnnotatedFileFormat
Parameters:
af - The annoation file to be loaded.
Returns:
True is if the specified annotation file has only been partially loaded and a prior portion can be loaded, false otherwise.

getNextChunk

public void getNextChunk(AnnotationFile af)
Description copied from interface: AnnotatedFileFormat
Indicates that a subsequent portion of the specified file should be read into memory.

Specified by:
getNextChunk in interface AnnotatedFileFormat
Parameters:
af - The annotation file to be appended.

getPrevChunk

public void getPrevChunk(AnnotationFile af)
Description copied from interface: AnnotatedFileFormat
Indicates that a previous portion of the specified file should be read into memory.

Specified by:
getPrevChunk in interface AnnotatedFileFormat
Parameters:
af - The annotation file to be prepended.


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