org.annotation.wordfreak.project
Class ProjectItem

java.lang.Object
  extended byorg.annotation.wordfreak.project.ProjectItem
All Implemented Interfaces:
java.awt.datatransfer.Transferable

public class ProjectItem
extends java.lang.Object
implements java.awt.datatransfer.Transferable

Manages the association between data files and annotation files. Each instance is such an association and may be either open or closed. Upon opening, the relevant files are loaded into memory and the annotations and text may be retrieved.


Constructor Summary
ProjectItem(FileFormat fileFormat, java.lang.String path)
          Creates a new project item with the specified file format and path.
 
Method Summary
 void addAnnotatedFile(FileFormat ff, java.lang.String annPath)
           
 void addAnnotatedFile(ProjectItem pi)
           
 boolean contains(ProjectItem pi)
           
 java.util.List getAnnPaths()
          Provides a list of paths to annotated files for this item.
 ProjectItem getChildAt(int i)
           
 int getChildCount()
           
 int getChildrenSize()
           
 java.lang.String getDisplayPath()
          return the text path of the project item.
 java.lang.String getFilePath()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getPrimaryAnnPath()
           
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 java.lang.String getType()
           
 boolean isAnnotatedFile()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
           
 boolean isGold()
           
 boolean isLoaded()
           
 boolean isLoading()
           
 java.util.Iterator iterator()
          Returns an iterator over the annotation project items for this source file item.
static ProjectItem parseOldProjectItem(java.lang.String s, FileRequestListener frl)
           
 void removeAnnotatedFile(ProjectItem pi)
           
 void removeAnnotatedFile(java.lang.String annPath)
          remove the path ann_path from the set of annotation files
 void setDispayPath(java.lang.String d)
           
 void setFilePath(java.lang.String p)
           
 void setGold(boolean g)
           
 void setLoaded(boolean l)
           
 void setLoading(boolean l)
           
 java.lang.String toLine()
           
 java.lang.String toString()
           
 void updateIcon()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectItem

public ProjectItem(FileFormat fileFormat,
                   java.lang.String path)
Creates a new project item with the specified file format and path.

Parameters:
fileFormat -
path -
Method Detail

getIcon

public javax.swing.Icon getIcon()

updateIcon

public void updateIcon()

getType

public java.lang.String getType()

getChildrenSize

public int getChildrenSize()

addAnnotatedFile

public void addAnnotatedFile(FileFormat ff,
                             java.lang.String annPath)

contains

public boolean contains(ProjectItem pi)

addAnnotatedFile

public void addAnnotatedFile(ProjectItem pi)

removeAnnotatedFile

public void removeAnnotatedFile(java.lang.String annPath)
remove the path ann_path from the set of annotation files


removeAnnotatedFile

public void removeAnnotatedFile(ProjectItem pi)

getChildCount

public int getChildCount()

getChildAt

public ProjectItem getChildAt(int i)

getDisplayPath

public java.lang.String getDisplayPath()
return the text path of the project item.


setDispayPath

public void setDispayPath(java.lang.String d)

getFilePath

public java.lang.String getFilePath()

setFilePath

public void setFilePath(java.lang.String p)

getPrimaryAnnPath

public java.lang.String getPrimaryAnnPath()

getAnnPaths

public java.util.List getAnnPaths()
Provides a list of paths to annotated files for this item.

Returns:
a list of the annotated file paths for this project item.

iterator

public java.util.Iterator iterator()
Returns an iterator over the annotation project items for this source file item.

Returns:
an iterator over the annotation project items if this is a source file with associated annotation file, otherwise an empty iterator is returned.

setLoading

public void setLoading(boolean l)

isLoading

public boolean isLoading()

isLoaded

public boolean isLoaded()

setLoaded

public void setLoaded(boolean l)

setGold

public void setGold(boolean g)

isGold

public boolean isGold()

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable

toString

public java.lang.String toString()

toLine

public java.lang.String toLine()

parseOldProjectItem

public static ProjectItem parseOldProjectItem(java.lang.String s,
                                              FileRequestListener frl)

isAnnotatedFile

public boolean isAnnotatedFile()


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