mesquite.lib.duties
Class FileCoordinator

java.lang.Object
  extended by mesquite.lib.MenuOwner
      extended by mesquite.lib.EmployerEmployee
          extended by mesquite.lib.MesquiteModule
              extended by mesquite.lib.duties.FileCoordinator
All Implemented Interfaces:
Commandable, Doomable, Explainable, FileDirtier, FunctionExplainable, HNode, Identifiable, Listable, Logger, MesquiteListener, Showable

public abstract class FileCoordinator
extends MesquiteModule

The defining superclass for file coordinating modules. A module of this class is the fundamental module second only to the MesquiteTrunk module itself. MesquiteTrunk hires a file coordinating module for each MesquiteProject. Example module: Basic File Coordinator


Field Summary
static int totalCreated
           
static int totalFinalized
           
 
Fields inherited from class mesquite.lib.MesquiteModule
author, browserString, checkMethodsAtStartup, hiredAsDefaultInScripting, lastResult, lastResultString, logWindow, mesquiteDirectory, mesquiteDirectoryPath, mesquiteTrunk, moduleInfo, prefsDirectory, proj, textEdgeCompensationHeight, textEdgeCompensationWidth, userDirectory
 
Fields inherited from class mesquite.lib.EmployerEmployee
employees, employer, startupBailOut, stringPos, suppressHireQueries, totalDisposed, useOtherChoices
 
Fields inherited from class mesquite.lib.MenuOwner
considerPriorities, doomed, MAXPRIORITY, menuCompositionTime, menuCompositionTime1, menuCompositionTime2, menuCompositionTime2a, menuCompositionTime2b, menuCompositionTime2c, menuCompositionTime3, menuCompositionTime4, menuCompositionTime5, menuCompositionTime6, menuCompositionTime7, menuCompositionTime8, menuCompositionTime9, menuTracing, module, parser
 
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
FileCoordinator()
           
 
Method Summary
abstract  boolean closeFile(MesquiteFile file)
          closes the given file; returns false if cancelled by user.
abstract  MesquiteFile createBlankProject()
          make a new blank MesquiteProject without user input.
abstract  MesquiteFile createProject(java.lang.String pathname, boolean createTaxaBlockIfNew)
          make a new blank MesquiteProject with user input.
abstract  TextDisplayer displayFile(MesquiteFile file, int maxCharacters)
          Displays a given text file, local or not;
abstract  TextDisplayer displayFile(java.lang.String pathName, int maxCharacters)
          Displays a given local text file;
abstract  TextDisplayer displayText(java.lang.String text, java.lang.String windowTitle)
          Displays a given text string;
abstract  void elementAdded(FileElement e)
           
abstract  void elementDisposed(FileElement e)
           
abstract  void export(FileInterpreterI exporter, MesquiteFile file, java.lang.String arguments)
          exports the given file;
 void finalize()
           
abstract  FileInterpreter findImporter(MesquiteFile f, int fileType, java.lang.String arguments)
           
abstract  FileInterpreter findImporter(java.lang.String fileContents, java.lang.String fileName, int fileType, java.lang.String arguments, boolean mustReadFromString, java.lang.Class stateClass)
           
abstract  ElementManager findManager(MesquiteModule m, java.lang.Class fileElementClass)
          Finds the first employee in the m's clade of employees that manages a particular subclass of file element
 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.
abstract  Snapshot getIDSnapshot(MesquiteFile file)
           
abstract  MesquiteFile getNEXUSFileForReading(java.lang.String arguments, java.lang.String message)
           
 boolean getSearchableAsModule()
           
abstract  MesquiteProject initiateProject(java.lang.String pathName, MesquiteFile homeFile)
           
 boolean isSubstantive()
          returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module
abstract  MesquiteFile readProject(boolean local, java.lang.String pathname, java.lang.String arguments)
          make a MesquiteProject, reading the information from the given path of a file (if local, interprets as file on disk; if not, as URL specification).
abstract  MesquiteFile readProjectGeneral(java.lang.String arguments)
          make a MesquiteProject, using a module.
abstract  void refreshProjectWindow()
           
abstract  void saveAllFiles()
          Saves all files in the project.
abstract  void saveFile(MesquiteFile file)
          Saves file.
abstract  void writeFile(MesquiteFile file)
          write the given file;
 
Methods inherited from class mesquite.lib.MesquiteModule
accumulateParameters, addNEXUSBlock, alert, alert, anySubstantivePrereleases, broadCastAssignedID, changed, classFieldChanged, clearLastResult, clearResultAndLastResult, compatibleWithSystem, containerOfModule, createSupportDirectory, deleteSupportDirectory, discreetAlert, discreetAlert, dispose, disposing, doCommand, echoStringToFile, employeeOutputInvalid, employeeParametersChanged, employeeQuit, employerWithWindow, endJob, fileAboutToBeWritten, fileDirtiedByCommand, fileElementAdded, fileReadIn, findNEXUSBlock, getAppletInfo, getAuthors, getAutoSaveMacros, getBrowserManualPath, getBrowserPanel, getBuildDate, getBuildVersion, getCitation, getCommandPagePath, getCompatibilityTest, getDateReleased, getDefaultModule, getDocsPath, getExpectedPath, getExplanation, getFunctionIconPath, getHireSubchoice, getHTMLExplanation, getID, getIfLastEmployee, getKeywords, getManualPath, getMesquiteVersion, getModuleInfo, getName, getNameAndParameters, getNameForMenuItem, getNexusBlockTest, getNexusCommands, getNexusCommandTest, getPackageImagesPath, getPackageIntroModule, getPackagePath, getParameters, getParametersChangedNotifier, getPath, getPermanentIDString, getProject, getRootImageDirectoryPath, getRootPath, getShortClassName, getShortClassName, getSizedRootImageFilePath, getSnapshot, getSubfunctions, getSubfunctionsVector, getURLString, getUserChooseable, getVersion, getVersionInt, getVersionOfFirstRelease, getVeryShortName, getXMLPrefsVersion, iQuit, iQuit, isCorrectRootTag, isPrerelease, listEmployeeParameters, listEmployees, loadPreferences, log, log, logln, logln, loglnNoEcho, logNoEcho, makeCommand, mesquiteStartup, nameIsInstanceOf, nameMatches, offHold, okToDispose, onHold, outputInvalid, pageModule, panelGoAway, parametersChanged, parametersChanged, parseFullXMLDocument, permanentIDExists, preparePreferencesForFile, preparePreferencesForXML, processPreferencesFromFile, processPreferencesFromXML, processSingleXMLPreference, projectEstablished, quittingConditions, readNexusBlock, readNexusCommand, readUnrecognizedCommand, registerSubfunction, removeNEXUSBlock, removePaging, reportProfiling, requestPrimaryChoice, respondToPaging, returningPage, saveLastResult, saveLastResult, saveLastResult, saveLastResult, saveLastResultString, saveLastResultString, setAutoSaveMacros, setProject, setToLastEmployee, showCitation, showHTMLSnippet, showLogWindow, showLogWindow, showManual, showMe, showWebPage, showWebPage, sorry, startJob, startProfiling, storePreferences, superStartJob, supportDirectoryPath, toString, URLinPackageIntro, windowGoAway, writeNexusCommands, xmlPrefsVersionMustMatch
 
Methods inherited from class mesquite.lib.EmployerEmployee
canHireMoreThanOnce, closeDownAllEmployees, decrementEmployeeBrowserRefreshSuppression, deferBranchPriority, employeeOfWhichEmployee, findCharacterDataEditor, findCharacterDataEditorRec, findElementManager, findEmployee, findEmployee, findEmployeeNeed, findEmployeeWithDuty, findEmployeeWithDuty, findEmployeeWithIDNumber, findEmployeeWithName, findEmployeeWithName, findEmployeeWithName, findEmployeeWithPermanentID, findEmployerWithDuty, findImmediateEmployeeWithDuty, findModelCurator, findModelCuratorRec, findModules, findModulesWithDuty, findNearestColleagueWithDuty, findNearestColleagueWithName, findNearestModuleWithDuty, findNextEmployeeWithDuty, fireEmployee, getClonableEmployeeCommand, getEmployeeNeeds, getEmployeeNeedsVector, getEmployeeReference, getEmployeeVector, getEmployer, getEmployerPath, getExplanationByWhichHired, getFileCoordinator, getHColor, getHDaughters, getHImage, getHiredAs, getHiringCommand, getHiringCondition, getHMother, getHShow, getImmediateEmployeesWithDuty, getNextEmployeeWithDuty, getNumberOfEmployees, getNumSupplements, getSupplementName, getTypeName, hireAllCompatibleEmployees, hireAllEmployees, hireAllOtherCompatibleEmployees, hireAllOtherEmployees, hireCompatibleEmployee, hireEmployee, hireEmployeeFromModuleInfo, hireNamedEmployee, hireNamedEmployee, hireNamedEmployee, hNodeAction, hSupplementTouched, incrementEmployeeBrowserRefreshSuppression, instantiateEmployee, instantiateModule, internalStartUp, isEmployerOf, isMacroAnchor, isPriorityFixed, listEmployees, listNeeds, makeEmployeeVector, moduleActiveWord, moveEmployeeToFront, numCompatibleModulesAvailable, numModulesAvailable, purposeOfEmployee, queryChooseModule, refreshBrowser, registerEmployeeNeed, registerEmployeeNeed, replaceCompatibleEmployee, replaceEmployee, replaceEmployeeWithNext, setHiringCommand, setPriorityFixed, setShowHiringPath, whatIsMyPurpose
 
Methods inherited from class mesquite.lib.MenuOwner
addAuxiliaryMenu, addCheckMenuItem, addCheckMenuItemToSubmenu, addItemToSubmenu, addItemToSubmenu, addLineToSubmenu, addMenuItem, addMenuItem, addMenuItem, addMenuLine, addModuleMenuItems, addSubmenu, addSubmenu, addSubmenu, addSubmenu, addSubmenu, checkMISVector, composeMenuBar, decrementMenuResetSuppression, defineMenus, deleteAllMenuItems, deleteMenuItem, destroyMenu, disposeMenuSpecifications, doom, findMenuAmongEmployers, getContainingMenuSpec, getMenu, getMenuItemSpecs, getMenuResetSuppression, getModuleWindow, getUseMenubar, incrementMenuResetSuppression, isDoomed, makeMenu, needsMenu, recomposeWindowsMenu, resetAllMenuBars, resetAllWindowsMenus, resetContainingMenuBar, setMenuResetSuppression, setMenuToUse, setModule, setModuleWindow, setUndoMenuItemEnabled, setUseMenubar, showPopUp, zeroMenuResetSuppression
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

totalCreated

public static int totalCreated

totalFinalized

public static int totalFinalized
Constructor Detail

FileCoordinator

public FileCoordinator()
Method Detail

getSearchableAsModule

public boolean getSearchableAsModule()
Overrides:
getSearchableAsModule in class EmployerEmployee

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class MesquiteModule
Throws:
java.lang.Throwable

getDutyClass

public java.lang.Class getDutyClass()
Description copied from class: MesquiteModule
Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty

Specified by:
getDutyClass in class MesquiteModule

getDutyName

public java.lang.String getDutyName()
Description copied from class: MesquiteModule
Returns the name of the duty; set by the duty-defining library classes.

Overrides:
getDutyName in class MesquiteModule

elementAdded

public abstract void elementAdded(FileElement e)

elementDisposed

public abstract void elementDisposed(FileElement e)

createProject

public abstract MesquiteFile createProject(java.lang.String pathname,
                                           boolean createTaxaBlockIfNew)
make a new blank MesquiteProject with user input.


createBlankProject

public abstract MesquiteFile createBlankProject()
make a new blank MesquiteProject without user input.


refreshProjectWindow

public abstract void refreshProjectWindow()

readProject

public abstract MesquiteFile readProject(boolean local,
                                         java.lang.String pathname,
                                         java.lang.String arguments)
make a MesquiteProject, reading the information from the given path of a file (if local, interprets as file on disk; if not, as URL specification).


readProjectGeneral

public abstract MesquiteFile readProjectGeneral(java.lang.String arguments)
make a MesquiteProject, using a module.


getNEXUSFileForReading

public abstract MesquiteFile getNEXUSFileForReading(java.lang.String arguments,
                                                    java.lang.String message)

findImporter

public abstract FileInterpreter findImporter(MesquiteFile f,
                                             int fileType,
                                             java.lang.String arguments)

findImporter

public abstract FileInterpreter findImporter(java.lang.String fileContents,
                                             java.lang.String fileName,
                                             int fileType,
                                             java.lang.String arguments,
                                             boolean mustReadFromString,
                                             java.lang.Class stateClass)

initiateProject

public abstract MesquiteProject initiateProject(java.lang.String pathName,
                                                MesquiteFile homeFile)

writeFile

public abstract void writeFile(MesquiteFile file)
write the given file;


export

public abstract void export(FileInterpreterI exporter,
                            MesquiteFile file,
                            java.lang.String arguments)
exports the given file;


closeFile

public abstract boolean closeFile(MesquiteFile file)
closes the given file; returns false if cancelled by user.


saveFile

public abstract void saveFile(MesquiteFile file)
Saves file.


saveAllFiles

public abstract void saveAllFiles()
Saves all files in the project.


findManager

public abstract ElementManager findManager(MesquiteModule m,
                                           java.lang.Class fileElementClass)
Finds the first employee in the m's clade of employees that manages a particular subclass of file element


displayFile

public abstract TextDisplayer displayFile(java.lang.String pathName,
                                          int maxCharacters)
Displays a given local text file;


displayFile

public abstract TextDisplayer displayFile(MesquiteFile file,
                                          int maxCharacters)
Displays a given text file, local or not;


displayText

public abstract TextDisplayer displayText(java.lang.String text,
                                          java.lang.String windowTitle)
Displays a given text string;


isSubstantive

public boolean isSubstantive()
Description copied from class: MesquiteModule
returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module

Overrides:
isSubstantive in class MesquiteModule

getIDSnapshot

public abstract Snapshot getIDSnapshot(MesquiteFile file)