|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.annotation.wordfreak.project.Project
Projects contain sets of associations between text files and annotation files. Projects can be opened, and saved, and modified.
Field Summary | |
static java.lang.String |
ANNOTATOR
|
static java.lang.String |
DATA_DIRECTORY
|
static java.lang.String |
ENCODING
|
static java.lang.String |
FONT_TYPE
|
static java.lang.String |
SCHEME
|
static java.lang.String |
TAG_SET
|
static java.lang.String |
VIEWER
|
Constructor Summary | |
Project()
|
|
Project(java.lang.String path,
FileRequestListener frl)
Initialize the project, set's it's default path used when saving the file, and parse the config file specified. |
Method Summary | |
ProjectItem |
addFile(java.lang.String annotationName,
java.lang.String sourceName,
AnnotatedFileFormat ff)
Adds an annotation file to the project. |
java.lang.String[] |
getAnnotatedFilePaths()
Provides array of all paths to annotated files. |
AnnotationFilter |
getAnnotationFilter()
Returns the filter used to determine whether an annotation is displayed to the user. |
java.lang.String |
getDataDirectory()
Gets the dataDirectory attribute of the Project object |
java.lang.String |
getDefaultAnnotationScheme()
Gets the defaultAnnotationScheme attribute of the Project object |
java.lang.String |
getDefaultAnnotator()
Gets the defaultAnnotator attribute of the Project object |
java.lang.String |
getDefaultEncoding()
Gets the defaultEncoding attribute of the Project object |
java.lang.String |
getDefaultFontSize()
Gets the defaultFontSize attribute of the Project object |
java.lang.String |
getDefaultFontType()
Gets the defaultFontType attribute of the Project object |
java.lang.String |
getDefaultTagSet()
Gets the defaultTagSet attribute of the Project object |
java.lang.String |
getDefaultViewer()
Gets the defaultViewer attribute of the Project object |
java.lang.String[] |
getFilePaths()
Provides source and annotation files for all files in the project. |
javax.swing.tree.TreeModel |
getItemsModel()
|
javax.swing.tree.TreeNode |
getNodeForPath(java.lang.String path)
|
javax.swing.Icon |
getNodeIcon(java.lang.String nodePath)
Returns the icon for the specfied path to a node. |
java.lang.String |
getPathForNode(javax.swing.tree.TreeNode node)
|
java.lang.String[] |
getPathsForChildren(javax.swing.tree.TreeNode node)
|
java.lang.String |
getProjectName()
Gets the projectName attribute of the Project object |
java.lang.String |
getProjectPath()
Gets the projectPath attribute of the Project object |
AnnotationFilter |
getSavingFilter()
Returns the filter used to determine whether an annotation should be saved. |
java.lang.String |
getSourceFilePath(java.lang.String annPath)
|
AnnotationFilter |
getTaggingFilter()
Gets the taggingFilter attribute of the Project object |
AnnotationFilter |
getTrainingFilter()
Gets the trainingFilter attribute of the Project object |
boolean |
isGold(java.lang.String path)
|
boolean |
isLoaded(java.lang.String path)
|
boolean |
isLoading(java.lang.String path)
|
boolean |
isSourcePath(java.lang.String path)
|
boolean |
readProjectFile(java.lang.String path)
Return true if the project file specified by the path could be loaded. |
void |
removeFile(java.lang.String pathName)
|
boolean |
save()
Saves the project to projectPath. |
boolean |
save(java.lang.String fileName)
Save the project to the file, fileName |
void |
setDataDirectory(java.lang.String dir)
Sets the dataDirectory attribute of the Project object |
void |
setDefaultAnnotationScheme(java.lang.String das)
Sets the defaultAnnotationScheme attribute of the Project object |
void |
setDefaultAnnotator(java.lang.String da)
Sets the defaultAnnotator attribute of the Project object |
void |
setDefaultEncoding(java.lang.String ts)
Sets the defaultEncoding attribute of the Project object |
void |
setDefaultFontSize(java.lang.String ts)
Sets the defaultFontSize attribute of the Project object |
void |
setDefaultFontType(java.lang.String ts)
Sets the defaultFontType attribute of the Project object |
void |
setDefaultTagSet(java.lang.String ts)
Sets the defaultTagSet attribute of the Project object |
void |
setDefaultViewer(java.lang.String dv)
Sets the defaultViewer attribute of the Project object |
void |
setFileRequestListener(FileRequestListener frl)
|
void |
setGold(java.lang.String path,
boolean gold)
|
void |
setLoaded(java.lang.String path,
boolean loaded)
Allows a file with the specified path to be loaded (loaded=true) or unloaded (loaded=false). |
void |
setLoading(java.lang.String path,
boolean loaded)
|
void |
setProjectPath(java.lang.String path)
Sets the projectPath attribute of the Project object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String VIEWER
public static java.lang.String SCHEME
public static java.lang.String ANNOTATOR
public static java.lang.String TAG_SET
public static java.lang.String FONT_TYPE
public static java.lang.String ENCODING
public static java.lang.String DATA_DIRECTORY
Constructor Detail |
public Project()
public Project(java.lang.String path, FileRequestListener frl)
path
- Name of the file where the project file should be saved.Method Detail |
public void setFileRequestListener(FileRequestListener frl)
public boolean readProjectFile(java.lang.String path)
path
- file path of the project file.
public javax.swing.tree.TreeNode getNodeForPath(java.lang.String path)
public java.lang.String getPathForNode(javax.swing.tree.TreeNode node)
public java.lang.String[] getPathsForChildren(javax.swing.tree.TreeNode node)
public boolean isSourcePath(java.lang.String path)
public ProjectItem addFile(java.lang.String annotationName, java.lang.String sourceName, AnnotatedFileFormat ff)
annotationName
- The name/path of the annotation file or null.sourceName
- The name/path of the source file or null.
public boolean isLoaded(java.lang.String path)
public boolean isLoading(java.lang.String path)
public boolean isGold(java.lang.String path)
public void setLoaded(java.lang.String path, boolean loaded)
path
- The file to be loaded or unloaded.loaded
- The loade/unloaded state.public void setGold(java.lang.String path, boolean gold)
public void setLoading(java.lang.String path, boolean loaded)
public javax.swing.tree.TreeModel getItemsModel()
public void removeFile(java.lang.String pathName)
public java.lang.String getProjectPath()
public void setProjectPath(java.lang.String path)
path
- The new projectPath valuepublic void setDefaultAnnotationScheme(java.lang.String das)
das
- The new defaultAnnotationScheme valuepublic java.lang.String getDefaultAnnotationScheme()
public void setDefaultViewer(java.lang.String dv)
dv
- The new defaultViewer valuepublic java.lang.String getDefaultViewer()
public void setDefaultAnnotator(java.lang.String da)
da
- The new defaultAnnotator valuepublic java.lang.String getDefaultAnnotator()
public void setDefaultTagSet(java.lang.String ts)
ts
- The new defaultTagSet valuepublic java.lang.String getDefaultTagSet()
public void setDefaultFontType(java.lang.String ts)
ts
- The new defaultFontType valuepublic java.lang.String getDefaultFontType()
public void setDefaultFontSize(java.lang.String ts)
ts
- The new defaultFontSize valuepublic java.lang.String getDefaultFontSize()
public void setDefaultEncoding(java.lang.String ts)
ts
- The new defaultEncoding valuepublic java.lang.String getDefaultEncoding()
public AnnotationFilter getTaggingFilter()
public AnnotationFilter getTrainingFilter()
public AnnotationFilter getAnnotationFilter()
public AnnotationFilter getSavingFilter()
public boolean save()
public boolean save(java.lang.String fileName)
fileName
fileName
- the name of the file to which the project is saved.
public java.lang.String getProjectName()
public java.lang.String[] getFilePaths()
public javax.swing.Icon getNodeIcon(java.lang.String nodePath)
nodePath
- The path to a tree node.
public java.lang.String[] getAnnotatedFilePaths()
public java.lang.String getSourceFilePath(java.lang.String annPath)
public java.lang.String getDataDirectory()
public void setDataDirectory(java.lang.String dir)
dir
- The new dataDirectory value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |