|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmesquite.lib.MenuOwner
mesquite.lib.EmployerEmployee
mesquite.lib.MesquiteModule
mesquite.lib.duties.FileInterpreter
public abstract class FileInterpreter
Superclass of file interpreting modules (e.g., NEXUS file reader/writer). Different subclasses are expected to read different data file formats. Example module: "Interpret NEXUS files" (class InterpretNexus). Example of use: see BasicFileCoordinator.
| Field Summary | |
|---|---|
static int |
CURRENTDELIMITER
|
int |
lineDelimiter
|
static int |
MACOSDELIMITER
|
static int |
UNIXDELIMITER
|
static int |
WINDOWSDELIMITER
|
boolean |
writeOnlySelectedData
|
boolean |
writeOnlySelectedTaxa
|
| Fields inherited from class mesquite.lib.MesquiteModule |
|---|
author, browserString, checkMethodsAtStartup, hiredAsDefaultInScripting, lastResult, lastResultString, logWindow, mesquiteDirectory, mesquiteDirectoryPath, mesquiteTrunk, moduleInfo, prefsDirectory, proj, textEdgeCompensationHeight, textEdgeCompensationWidth, totalFinalized, userDirectory |
| Fields inherited from class mesquite.lib.EmployerEmployee |
|---|
employees, employer, startupBailOut, stringPos, suppressHireQueries, totalCreated, totalDisposed, useOtherChoices |
| Fields inherited from interface mesquite.lib.MesquiteListener |
|---|
ANNOTATION_ADDED, ANNOTATION_CHANGED, ANNOTATION_DELETED, ASSOCIATED_CHANGED, BRANCHES_REARRANGED, BRANCHLENGTHS_CHANGED, COMMAND_CANCELLED, DATA_CHANGED, ELEMENT_CHANGED, ITEMS_ADDED, NAMES_CHANGED, OBJECT_DESTROYED, PARTS_ADDED, PARTS_CHANGED, PARTS_DELETED, PARTS_MOVED, SELECTION_CHANGED, TAXA_SUBSTITUTED, TEXTFIELD_EDITED, UNKNOWN, VALUE_CHANGED |
| Fields inherited from interface mesquite.lib.HNode |
|---|
MOUSEDOWN, MOUSEEXIT, MOUSEMOVE |
| Constructor Summary | |
|---|---|
FileInterpreter()
|
|
| Method Summary | |
|---|---|
boolean |
canExport()
This is deprecated and should not be overridden. |
boolean |
canExportData(java.lang.Class dataClass)
returns whether module can export a character data matrix of the given type. |
boolean |
canExportEver()
returns whether module is able ever to export. |
boolean |
canExportProject(MesquiteProject project)
returns whether module has something it can export in the project. |
boolean |
canImport()
Returns whether the module can read (import) files |
boolean |
canImport(java.lang.Class dataClass)
Returns whether the module can read (import) files with data of class dataClass |
boolean |
canImport(java.lang.String arguments)
Returns whether the module can read (import) files considering the passed argument string (e.g., fuse) |
boolean |
canImport(java.lang.String arguments,
java.lang.Class dataClass)
Returns whether the module can read (import) files considering the passed argument string (e.g., fuse) |
void |
finishImport(ProgressIndicator progIndicator,
MesquiteFile file,
boolean abort)
|
java.lang.Class |
getDutyClass()
Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty |
java.lang.String |
getDutyName()
Returns the name of the duty; set by the duty-defining library classes. |
java.lang.String |
getFunctionIconPath()
returns an icon to accompany the explanation of what the module does. |
java.lang.String |
getLineEnding()
|
java.lang.String |
getPathForExport(java.lang.String arguments,
java.lang.String suggestedFileName,
MesquiteString dir,
MesquiteString fn)
|
boolean |
isSubstantive()
returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module |
java.lang.String |
preferredDataFileExtension()
|
abstract void |
readFile(MesquiteProject mf,
MesquiteFile mNF,
java.lang.String arguments)
reads a file using the methods of MesquiteFile and places its data into the given MesquiteProject which will already have been instantiated. |
boolean |
requestPrimaryChoice()
returns whether this module is requesting to appear as a primary choice |
void |
saveExportedFile(java.lang.String output,
java.lang.String arguments,
java.lang.String suggestedFileName)
|
void |
saveExportedFileWithExtension(java.lang.StringBuffer outputBuffer,
java.lang.String arguments,
java.lang.String suggestedFileEnding)
|
void |
setLineDelimiter(int newDelimiter)
|
protected java.lang.String |
stripNex(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CURRENTDELIMITER
public static final int MACOSDELIMITER
public static final int WINDOWSDELIMITER
public static final int UNIXDELIMITER
public int lineDelimiter
public boolean writeOnlySelectedData
public boolean writeOnlySelectedTaxa
| Constructor Detail |
|---|
public FileInterpreter()
| Method Detail |
|---|
public java.lang.Class getDutyClass()
MesquiteModule
getDutyClass in class MesquiteModulepublic java.lang.String getFunctionIconPath()
MesquiteModule
getFunctionIconPath in interface FunctionExplainablegetFunctionIconPath in class MesquiteModulepublic boolean requestPrimaryChoice()
requestPrimaryChoice in class MesquiteModulepublic boolean canExport()
public boolean canExportEver()
public boolean canExportProject(MesquiteProject project)
public boolean canExportData(java.lang.Class dataClass)
public boolean canImport(java.lang.Class dataClass)
public boolean canImport()
public boolean canImport(java.lang.String arguments,
java.lang.Class dataClass)
public boolean canImport(java.lang.String arguments)
public abstract void readFile(MesquiteProject mf,
MesquiteFile mNF,
java.lang.String arguments)
public java.lang.String getDutyName()
MesquiteModule
getDutyName in class MesquiteModulepublic java.lang.String getLineEnding()
public java.lang.String preferredDataFileExtension()
protected java.lang.String stripNex(java.lang.String name)
public void setLineDelimiter(int newDelimiter)
public boolean isSubstantive()
MesquiteModule
isSubstantive in class MesquiteModule
public void finishImport(ProgressIndicator progIndicator,
MesquiteFile file,
boolean abort)
public void saveExportedFileWithExtension(java.lang.StringBuffer outputBuffer,
java.lang.String arguments,
java.lang.String suggestedFileEnding)
public java.lang.String getPathForExport(java.lang.String arguments,
java.lang.String suggestedFileName,
MesquiteString dir,
MesquiteString fn)
public void saveExportedFile(java.lang.String output,
java.lang.String arguments,
java.lang.String suggestedFileName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||