|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmesquite.lib.MesquiteProject
An object of this class represents a collection of information (data matrices, tree blocks, etc.) that may reside in more than one file (MesquiteFile, which represents files on disk or at a URL). More than one project can be open at once. Information from different projects generally doesn't interact (e.g., a data matrix from one project can't belong to a set of taxa from another project), but within a single project information can interact regardless of what file the information belongs to.
Although more than one file can belong to the project, the first file opened is treated as the "home file". In the future the idea of a "project" may be made stronger, and a separate sort of file (the project file) may be created. tHis would eliminate the need for a "home file".
| Field Summary | |
MesquiteWindow |
activeWindowOfProject
|
boolean |
autosave
|
protected ModelVector |
charModels
Character models belonging to the project. |
ListableVector |
datas
Vector of data sets (including matrix) within the project. |
boolean |
developing
|
MesquiteCommand |
exportCommand
|
MesquiteCommand |
getInfoCommand
|
boolean |
isDoomed
|
MesquiteCommand |
newLinkFileCommand
|
protected ListableVector |
nexusBlocks
Nexus blocks belonging to the files in the project. |
protected ListableVector |
otherElements
Other file elements belonging to the project. |
FileCoordinator |
ownerModule
The file coordinator module that owns this object |
int |
projectColor
Background color scheme for project's windows |
long |
startupTime
|
ListableVector |
taxas
A vector of the sets of taxa within the project. |
static int |
totalCreated
|
static int |
totalDisposed
|
static int |
totalFinalized
|
MesquiteWindow |
windowToActivate
|
| Fields inherited from interface mesquite.lib.HNode |
MOUSEDOWN, MOUSEEXIT, MOUSEMOVE |
| Constructor Summary | |
MesquiteProject(FileCoordinator ownerModule)
|
|
| Method Summary | |
void |
addFile(MesquiteFile file)
add a file to list of currently linked files |
void |
addFileElement(FileElement element)
Adds the passed element to the project. |
void |
addNexusBlock(NexusBlock block)
Adds the passed NEXUS block to the project. |
CharacterData |
chooseData(java.awt.Frame frame,
MesquiteFile file,
Taxa taxa,
java.lang.Object dataClass,
java.lang.String message,
boolean askEvenIfOne,
CommandRecord commandRec)
|
CharacterData |
chooseData(java.awt.Frame frame,
MesquiteFile file,
Taxa taxa,
java.lang.Object dataClass,
java.lang.String message,
CommandRecord commandRec)
|
CharacterData |
chooseData(java.awt.Frame frame,
Taxa taxa,
java.lang.Object dataClass,
CommandRecord commandRec)
|
CharacterData |
chooseData(java.awt.Frame frame,
Taxa taxa,
java.lang.Object dataClass,
java.lang.String message,
CommandRecord commandRec)
|
MesquiteFile |
chooseFile(CommandRecord commandRec,
java.lang.String message)
Select one of the currently linked files; selects first if only one or if scripting. |
Taxa |
chooseTaxa(java.awt.Frame frame,
java.lang.String message,
boolean askEvenIfOne,
CommandRecord commandRec)
|
Taxa |
chooseTaxa(java.awt.Frame frame,
java.lang.String message,
CommandRecord commandRec)
|
Taxa |
createTaxaBlock(int numTaxa)
|
void |
dispose()
Disposes of the components of the project. |
java.lang.Object |
doCommand(java.lang.String commandName,
java.lang.String arguments,
CommandRecord commandRec,
CommandChecker checker)
Here as a placeholder; doesn't do anything at the moment. |
void |
fileSaved(MesquiteFile f)
Sets elements of file as not dirty (i.e. |
void |
finalize()
|
Author |
findAuthor(java.lang.String s,
boolean tryName)
|
ListableVector |
getAuthors()
|
CentralModelListener |
getCentralModelListener()
|
CharacterData |
getCharacterData(MesquiteFile f,
java.lang.String ref)
gets the data set of given reference string (ref. |
CharacterData |
getCharacterData(MesquiteFile f,
Taxa taxa,
java.lang.Object dataClass,
java.lang.String ref)
gets the data set of given reference string (ref. |
CharacterData |
getCharacterData(MesquiteFile f,
Taxa taxa,
java.lang.String ref)
gets the data set of given reference string (ref. |
CharacterData |
getCharacterData(java.lang.String name)
gets the data set of given reference string (ref. |
ListableVector |
getCharacterMatrices()
returns jth data set in file |
CharacterData |
getCharacterMatrix(int j)
returns jth data set in file |
CharacterData |
getCharacterMatrix(int j,
java.lang.Object dataClass)
returns the jth data set for given CharacterState subclass. |
CharacterData |
getCharacterMatrix(MesquiteFile f,
int j)
returns the jth of data sets belonging to a given file |
CharacterData |
getCharacterMatrix(MesquiteFile f,
Taxa taxa,
java.lang.Object dataClass,
int j)
returns the jth of data sets belonging to a given file |
CharacterData |
getCharacterMatrix(java.lang.String uniqueID,
int j)
returns the jth of data sets with given unique ID |
CharacterData |
getCharacterMatrix(Taxa taxa,
int j)
returns the jth data set belonging to given taxa. |
CharacterData |
getCharacterMatrix(Taxa taxa,
int j,
java.lang.Object dataClass)
returns the jth data set belonging to given taxa for given CharacterState subclass. |
CharacterData |
getCharacterMatrixPAMT(Taxa taxa,
java.lang.Object dataClass,
int j)
returns the jth of data sets belonging to a given file*, permitting matrices with different but equivalent taxa |
CharacterModel |
getCharacterModel(java.lang.Class c,
boolean allowBuiltIn,
int index)
returns the index'th character model that is a subclass of c. |
CharacterModel |
getCharacterModel(java.lang.Class c,
int index)
returns the index'th character model that is a subclass of c. |
CharacterModel |
getCharacterModel(int index)
returns the index'th character model. |
CharacterModel |
getCharacterModel(ModelCompatibilityInfo mci,
int index)
returns the index'th character model that is a subclass of c. |
CharacterModel |
getCharacterModel(ModelCompatibilityInfo mci,
java.lang.String name)
returns the character model of name "name' that is a subclass of c. |
CharacterModel |
getCharacterModel(java.lang.String name)
returns the character model with the given name |
ModelVector |
getCharacterModels()
returns the vector of stored character models |
Listable[] |
getCharacterModels(java.lang.Class c,
java.lang.Class stateClass)
returns a vector of stored character models that are subclasses of the given class |
Listable[] |
getCharacterModels(ModelCompatibilityInfo mci,
java.lang.Class stateClass)
returns a vector of stored character models that are compatible with the passed information |
java.lang.String |
getCharMatrixReferenceExternal(CharacterData data)
returns a string that can be used to refer to taxa block |
java.lang.String |
getCharMatrixReferenceInternal(CharacterData data)
returns a string that can be used to refer to taxa block |
MesquiteCommand |
getCloseCommand()
returns command to close a file |
MesquiteCommand |
getCloseFilesCommand()
returns command to close project (linked files) |
Listable[] |
getCompatibleFileElements(java.lang.Class c,
java.lang.Object condition)
Returns a vector of FileElements that are of the given class or are of its subclasses, and which are compatible with the passed object. |
FileCoordinator |
getCoordinatorModule()
returns the file coordinator module in charge of the project |
CharacterData |
getDifferentButCompatibleMatrix(CharacterData data,
boolean permitAltMatchingTaxa,
CommandRecord commandRec,
java.lang.String messageIfNoneFound,
java.lang.String messageForChoice)
returns a data matrix that is of the same class as that passed, but is a different one. |
CharacterData |
getDifferentButCompatibleMatrix(CharacterData data,
boolean permitAltMatchingTaxa,
CommandRecord commandRec,
java.lang.String messageIfNoneFound,
java.lang.String messageForChoice,
boolean subclassOK)
returns a data matrix that is of the same class as that passed, but is a different one. |
MesquiteFile |
getFile(int num)
returns a currently linked file |
MesquiteFile |
getFile(java.lang.String name)
returns a currently linked file |
MesquiteFile |
getFileByID(int id)
returns a currently linked file |
FileElement |
getFileElement(java.lang.Class c,
int i)
Returns the ith FileElement that is a subclass of the given class. |
int |
getFileElementNumber(FileElement f,
java.lang.Class c)
Returns the index position of the FileElement among others of its the subclass c. |
Listable[] |
getFileElements(java.lang.Class c)
Returns a vector of FileElements that are of the given class or are of its subclasses. |
int |
getFileNumber(MesquiteFile f)
returns the index of a currently linked file |
ListableVector |
getFiles()
returns currently linked files |
java.awt.Color |
getHColor()
|
HNode[] |
getHDaughters()
for HNode interface |
java.awt.Image |
getHImage()
|
HNode |
getHMother()
for HNode interface |
java.lang.String |
getHomeDirectoryName()
Returns name of directory of home file. |
MesquiteFile |
getHomeFile()
DOCUMENT |
java.lang.String |
getHomeFileName()
Returns name of home file. |
java.net.URL |
getHomeURL()
DOCUMENT |
boolean |
getHShow()
|
long |
getID()
instantiations of projects are numbered sequentially so they can be referred to by number |
MesquiteCommand |
getIncludeFileCommand()
returns command to incorporate file |
MesquiteCommand |
getIncludeURLCommand()
returns command to incorporate file |
CharacterData |
getLatestMatrix()
returns most recently added matrix. |
MesquiteCommand |
getLinkFileCommand()
returns command to link file |
MesquiteCommand |
getLinkURLCommand()
returns command to link file |
int |
getMatrixNumber(CharacterData data)
gets the number (index position) of the data set. |
int |
getMatrixNumber(MesquiteFile file,
CharacterData data)
gets the number (index position) of the data set. |
int |
getMatrixNumber(java.lang.String name)
gets the number (index position) of the data set of given name. |
java.lang.String |
getName()
Returns the name of the project. |
MesquiteCommand |
getNewLinkFileCommand()
returns command to make new linked file |
ListableVector |
getNexusBlocks()
Returns the ListableVector of NEXUS blocks in the project. |
NexusBlock[] |
getNexusBlocks(java.lang.Class c,
MesquiteFile f)
Returns an array of NEXUS blocks of the given type and belonging to the given file. |
NexusBlock[] |
getNexusBlocks(java.lang.String typeName)
Returns an array of NEXUS blocks of the given type name. |
int |
getNumberCharMatrices()
returns number of data sets in file |
int |
getNumberCharMatrices(long ref)
returns number of data sets of given reference string (ref. |
int |
getNumberCharMatrices(MesquiteFile f)
returns number of data sets belonging to a given file |
int |
getNumberCharMatrices(MesquiteFile file,
Taxa taxa,
java.lang.Object dataClass)
returns number of data sets of a given data class (CharacterState subclass is passed) belonging to given taxa. |
int |
getNumberCharMatrices(java.lang.Object dataClass)
returns number of data sets of a given data class (CharacterState subclass is passed) |
int |
getNumberCharMatrices(java.lang.String uniqueID)
returns number of data sets of given reference string (ref. |
int |
getNumberCharMatrices(Taxa taxa)
returns number of data sets belonging to given taxa |
int |
getNumberCharMatrices(Taxa taxa,
java.lang.Object dataClass)
returns number of data sets of a given data class (CharacterState subclass is passed) belonging to given taxa |
int |
getNumberCharMatricesPAMT(Taxa taxa,
java.lang.Object dataClass)
returns number of data sets of a given data class (CharacterState subclass is passed) belonging to given taxa. |
int |
getNumberLinkedFiles()
returns number of currently linked files |
int |
getNumberOfFileElements(java.lang.Class c)
Returns the number of FileElements that are subclasses of the given class. |
int |
getNumberTaxas()
returns the number of Taxa objects stored in project |
int |
getNumberTaxas(MesquiteFile f)
returns the number of Taxa objects stored in project belonging to a file |
int |
getNumberTaxas(java.lang.String uniqueID)
|
int |
getNumModels()
returns the number of character models stored |
int |
getNumSupplements()
for HNode interface |
int |
getProjectColor()
Returns the background color scheme for the project's windows. |
MesquiteCommand |
getSaveAsCommand()
returns command to save as |
MesquiteCommand |
getSaveCommand()
returns command to save a file |
MesquiteCommand |
getSaveFilesCommand()
returns command to save project (linked files) |
MesquiteCommand |
getSaveLinkagesCommand()
returns command to save as project (linked files) |
java.lang.String |
getSupplementName(int index)
for HNode interface |
Taxa |
getTaxa(int taxaNumber)
returns the Taxa of given number |
Taxa |
getTaxa(MesquiteFile f,
int taxaNumber)
returns the Taxa of given number belonging to given file |
Taxa |
getTaxa(MesquiteFile f,
java.lang.String ref)
returns the Taxa of given reference, name or number (as indicated by string passed) |
Taxa |
getTaxa(java.lang.String name)
returns the Taxa of given name |
Taxa |
getTaxa(java.lang.String uniqueID,
int j)
returns the jth of taxa blocks with given unique ID |
int |
getTaxaNumber(MesquiteFile file,
Taxa taxa)
returns the number (index position) of the Taxa |
int |
getTaxaNumber(java.lang.String name)
returns the number (index position) of the Taxa of given name |
int |
getTaxaNumber(Taxa taxa)
returns the number (index position) of the Taxa |
java.lang.String |
getTaxaReference(Taxa taxa)
This is deprecated and should be avoided |
java.lang.String |
getTaxaReferenceExternal(Taxa taxa)
returns a string that can be used to refer to taxa block |
java.lang.String |
getTaxaReferenceInternal(Taxa taxa)
returns a string that can be used to refer to taxa block |
ListableVector |
getTaxas()
returns the list of Taxa |
java.lang.String |
getTypeName()
for HNode interface |
int |
getWhichCharacterModel(ModelCompatibilityInfo mci,
CharacterModel model)
returns the index of the passed character model among compatible models. |
void |
hNodeAction(java.awt.Container c,
int x,
int y,
int action)
for HNode interface |
void |
hSupplementTouched(int index)
for HNode interface |
boolean |
isDirty()
returns whether any files are dirty |
void |
mergeFile(MesquiteFile file)
Puts all file elements belonging to passed file into home file, and gets rid of record of file. |
int |
numAuthors()
|
void |
removeFile(MesquiteFile file)
remove a file from list of currently linked files |
void |
removeFileElement(FileElement element)
DOCUMENT |
void |
removeNexusBlock(NexusBlock block)
Removes the passed NEXUS block from the project. |
void |
removeNexusBlocks(MesquiteFile f)
Returns those NEXUS blocks belonging to the given file. |
void |
resolveCharMatrixIDs()
gets the data set of given reference string (ref. |
void |
setHomeFile(MesquiteFile file)
DOCUMENT |
TreeVector |
storeTree(java.awt.Frame parent,
Tree tree,
CommandRecord commandRec)
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public ListableVector taxas
public ListableVector datas
protected ModelVector charModels
protected ListableVector otherElements
protected ListableVector nexusBlocks
public long startupTime
public MesquiteWindow windowToActivate
public MesquiteWindow activeWindowOfProject
public MesquiteCommand exportCommand
public MesquiteCommand newLinkFileCommand
public MesquiteCommand getInfoCommand
public FileCoordinator ownerModule
public int projectColor
public static int totalCreated
public static int totalDisposed
public static int totalFinalized
public boolean developing
public boolean autosave
public boolean isDoomed
| Constructor Detail |
public MesquiteProject(FileCoordinator ownerModule)
| Method Detail |
public long getID()
public void dispose()
public void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic boolean isDirty()
public java.lang.Object doCommand(java.lang.String commandName,
java.lang.String arguments,
CommandRecord commandRec,
CommandChecker checker)
doCommand in interface Commandablepublic int getProjectColor()
public java.lang.String getHomeDirectoryName()
public java.lang.String getHomeFileName()
public java.lang.String getName()
getName in interface Listablepublic java.net.URL getHomeURL()
public void setHomeFile(MesquiteFile file)
public MesquiteFile getHomeFile()
public void addFile(MesquiteFile file)
public void removeFile(MesquiteFile file)
public void mergeFile(MesquiteFile file)
public int getNumberLinkedFiles()
public int getFileNumber(MesquiteFile f)
public MesquiteFile getFile(java.lang.String name)
public MesquiteFile getFile(int num)
public MesquiteFile getFileByID(int id)
public ListableVector getFiles()
public MesquiteFile chooseFile(CommandRecord commandRec,
java.lang.String message)
public MesquiteCommand getCloseCommand()
public MesquiteCommand getCloseFilesCommand()
public MesquiteCommand getSaveCommand()
public MesquiteCommand getSaveFilesCommand()
public MesquiteCommand getLinkFileCommand()
public MesquiteCommand getNewLinkFileCommand()
public MesquiteCommand getLinkURLCommand()
public MesquiteCommand getIncludeFileCommand()
public MesquiteCommand getIncludeURLCommand()
public MesquiteCommand getSaveAsCommand()
public MesquiteCommand getSaveLinkagesCommand()
public FileCoordinator getCoordinatorModule()
public void addFileElement(FileElement element)
public void removeFileElement(FileElement element)
public int getNumberOfFileElements(java.lang.Class c)
public void fileSaved(MesquiteFile f)
public Listable[] getFileElements(java.lang.Class c)
public Listable[] getCompatibleFileElements(java.lang.Class c,
java.lang.Object condition)
public FileElement getFileElement(java.lang.Class c,
int i)
public int getFileElementNumber(FileElement f,
java.lang.Class c)
public void addNexusBlock(NexusBlock block)
public void removeNexusBlock(NexusBlock block)
public void removeNexusBlocks(MesquiteFile f)
public NexusBlock[] getNexusBlocks(java.lang.Class c,
MesquiteFile f)
public NexusBlock[] getNexusBlocks(java.lang.String typeName)
public ListableVector getNexusBlocks()
public ListableVector getAuthors()
public int numAuthors()
public Author findAuthor(java.lang.String s,
boolean tryName)
public Taxa createTaxaBlock(int numTaxa)
public ListableVector getTaxas()
public Taxa getTaxa(int taxaNumber)
public Taxa getTaxa(java.lang.String name)
public Taxa getTaxa(MesquiteFile f,
java.lang.String ref)
public Taxa getTaxa(java.lang.String uniqueID,
int j)
public Taxa getTaxa(MesquiteFile f,
int taxaNumber)
public int getTaxaNumber(java.lang.String name)
public int getTaxaNumber(MesquiteFile file,
Taxa taxa)
public int getTaxaNumber(Taxa taxa)
public java.lang.String getTaxaReferenceInternal(Taxa taxa)
public java.lang.String getTaxaReferenceExternal(Taxa taxa)
public java.lang.String getTaxaReference(Taxa taxa)
public Taxa chooseTaxa(java.awt.Frame frame,
java.lang.String message,
CommandRecord commandRec)
public Taxa chooseTaxa(java.awt.Frame frame,
java.lang.String message,
boolean askEvenIfOne,
CommandRecord commandRec)
public int getNumberTaxas(MesquiteFile f)
public int getNumberTaxas(java.lang.String uniqueID)
public int getNumberTaxas()
public TreeVector storeTree(java.awt.Frame parent,
Tree tree,
CommandRecord commandRec)
public ListableVector getCharacterMatrices()
public CharacterData getCharacterMatrix(int j)
public CharacterData getCharacterMatrix(Taxa taxa,
int j)
public CharacterData getCharacterMatrix(int j,
java.lang.Object dataClass)
public CharacterData getCharacterMatrix(Taxa taxa,
int j,
java.lang.Object dataClass)
public CharacterData getCharacterMatrix(MesquiteFile f,
int j)
public CharacterData getLatestMatrix()
public CharacterData getCharacterMatrix(MesquiteFile f,
Taxa taxa,
java.lang.Object dataClass,
int j)
public CharacterData getCharacterMatrixPAMT(Taxa taxa,
java.lang.Object dataClass,
int j)
public CharacterData getCharacterMatrix(java.lang.String uniqueID,
int j)
public CharacterData getCharacterData(java.lang.String name)
public CharacterData getCharacterData(MesquiteFile f,
java.lang.String ref)
public CharacterData getCharacterData(MesquiteFile f,
Taxa taxa,
java.lang.String ref)
public CharacterData getCharacterData(MesquiteFile f,
Taxa taxa,
java.lang.Object dataClass,
java.lang.String ref)
public CharacterData getDifferentButCompatibleMatrix(CharacterData data,
boolean permitAltMatchingTaxa,
CommandRecord commandRec,
java.lang.String messageIfNoneFound,
java.lang.String messageForChoice)
public CharacterData getDifferentButCompatibleMatrix(CharacterData data,
boolean permitAltMatchingTaxa,
CommandRecord commandRec,
java.lang.String messageIfNoneFound,
java.lang.String messageForChoice,
boolean subclassOK)
public int getMatrixNumber(java.lang.String name)
public int getMatrixNumber(CharacterData data)
public int getMatrixNumber(MesquiteFile file,
CharacterData data)
public java.lang.String getCharMatrixReferenceInternal(CharacterData data)
public java.lang.String getCharMatrixReferenceExternal(CharacterData data)
public int getNumberCharMatrices()
public int getNumberCharMatrices(Taxa taxa)
public int getNumberCharMatrices(Taxa taxa,
java.lang.Object dataClass)
public int getNumberCharMatrices(java.lang.Object dataClass)
public int getNumberCharMatrices(MesquiteFile f)
public int getNumberCharMatrices(MesquiteFile file,
Taxa taxa,
java.lang.Object dataClass)
public int getNumberCharMatricesPAMT(Taxa taxa,
java.lang.Object dataClass)
public int getNumberCharMatrices(long ref)
public int getNumberCharMatrices(java.lang.String uniqueID)
public void resolveCharMatrixIDs()
public CharacterData chooseData(java.awt.Frame frame,
Taxa taxa,
java.lang.Object dataClass,
CommandRecord commandRec)