mesquite.lib
Class MesquiteProject

java.lang.Object
  extended bymesquite.lib.MesquiteProject
All Implemented Interfaces:
Commandable, HNode, Listable

public class MesquiteProject
extends java.lang.Object
implements Listable, Commandable, HNode

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

taxas

public ListableVector taxas
A vector of the sets of taxa within the project.


datas

public ListableVector datas
Vector of data sets (including matrix) within the project.


charModels

protected ModelVector charModels
Character models belonging to the project.


otherElements

protected ListableVector otherElements
Other file elements belonging to the project.


nexusBlocks

protected ListableVector nexusBlocks
Nexus blocks belonging to the files in the project.


startupTime

public long startupTime

windowToActivate

public MesquiteWindow windowToActivate

activeWindowOfProject

public MesquiteWindow activeWindowOfProject

exportCommand

public MesquiteCommand exportCommand

newLinkFileCommand

public MesquiteCommand newLinkFileCommand

getInfoCommand

public MesquiteCommand getInfoCommand

ownerModule

public FileCoordinator ownerModule
The file coordinator module that owns this object


projectColor

public int projectColor
Background color scheme for project's windows


totalCreated

public static int totalCreated

totalDisposed

public static int totalDisposed

totalFinalized

public static int totalFinalized

developing

public boolean developing

autosave

public boolean autosave

isDoomed

public boolean isDoomed
Constructor Detail

MesquiteProject

public MesquiteProject(FileCoordinator ownerModule)
Method Detail

getID

public long getID()
instantiations of projects are numbered sequentially so they can be referred to by number


dispose

public void dispose()
Disposes of the components of the project.


finalize

public void finalize()
              throws java.lang.Throwable
Throws:
java.lang.Throwable

isDirty

public boolean isDirty()
returns whether any files are dirty


doCommand

public 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.

Specified by:
doCommand in interface Commandable

getProjectColor

public int getProjectColor()
Returns the background color scheme for the project's windows. This is 0, unless multiple projects are open simultaneously, in which case other colors are used as well (to distinguish windows belonging to different projects).


getHomeDirectoryName

public java.lang.String getHomeDirectoryName()
Returns name of directory of home file.


getHomeFileName

public java.lang.String getHomeFileName()
Returns name of home file.


getName

public java.lang.String getName()
Returns the name of the project. Currently (temporarily?), the name is based upon the name of the home file.

Specified by:
getName in interface Listable

getHomeURL

public java.net.URL getHomeURL()
DOCUMENT


setHomeFile

public void setHomeFile(MesquiteFile file)
DOCUMENT


getHomeFile

public MesquiteFile getHomeFile()
DOCUMENT


addFile

public void addFile(MesquiteFile file)
add a file to list of currently linked files


removeFile

public void removeFile(MesquiteFile file)
remove a file from list of currently linked files


mergeFile

public void mergeFile(MesquiteFile file)
Puts all file elements belonging to passed file into home file, and gets rid of record of file.


getNumberLinkedFiles

public int getNumberLinkedFiles()
returns number of currently linked files


getFileNumber

public int getFileNumber(MesquiteFile f)
returns the index of a currently linked file


getFile

public MesquiteFile getFile(java.lang.String name)
returns a currently linked file


getFile

public MesquiteFile getFile(int num)
returns a currently linked file


getFileByID

public MesquiteFile getFileByID(int id)
returns a currently linked file


getFiles

public ListableVector getFiles()
returns currently linked files


chooseFile

public MesquiteFile chooseFile(CommandRecord commandRec,
                               java.lang.String message)
Select one of the currently linked files; selects first if only one or if scripting. 12 Jan 02


getCloseCommand

public MesquiteCommand getCloseCommand()
returns command to close a file


getCloseFilesCommand

public MesquiteCommand getCloseFilesCommand()
returns command to close project (linked files)


getSaveCommand

public MesquiteCommand getSaveCommand()
returns command to save a file


getSaveFilesCommand

public MesquiteCommand getSaveFilesCommand()
returns command to save project (linked files)


getLinkFileCommand

public MesquiteCommand getLinkFileCommand()
returns command to link file


getNewLinkFileCommand

public MesquiteCommand getNewLinkFileCommand()
returns command to make new linked file


getLinkURLCommand

public MesquiteCommand getLinkURLCommand()
returns command to link file


getIncludeFileCommand

public MesquiteCommand getIncludeFileCommand()
returns command to incorporate file


getIncludeURLCommand

public MesquiteCommand getIncludeURLCommand()
returns command to incorporate file


getSaveAsCommand

public MesquiteCommand getSaveAsCommand()
returns command to save as


getSaveLinkagesCommand

public MesquiteCommand getSaveLinkagesCommand()
returns command to save as project (linked files)


getCoordinatorModule

public FileCoordinator getCoordinatorModule()
returns the file coordinator module in charge of the project


addFileElement

public void addFileElement(FileElement element)
Adds the passed element to the project.


removeFileElement

public void removeFileElement(FileElement element)
DOCUMENT


getNumberOfFileElements

public int getNumberOfFileElements(java.lang.Class c)
Returns the number of FileElements that are subclasses of the given class.


fileSaved

public void fileSaved(MesquiteFile f)
Sets elements of file as not dirty (i.e. saved).


getFileElements

public Listable[] getFileElements(java.lang.Class c)
Returns a vector of FileElements that are of the given class or are of its subclasses.


getCompatibleFileElements

public 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.


getFileElement

public FileElement getFileElement(java.lang.Class c,
                                  int i)
Returns the ith FileElement that is a subclass of the given class.


getFileElementNumber

public int getFileElementNumber(FileElement f,
                                java.lang.Class c)
Returns the index position of the FileElement among others of its the subclass c.


addNexusBlock

public void addNexusBlock(NexusBlock block)
Adds the passed NEXUS block to the project.


removeNexusBlock

public void removeNexusBlock(NexusBlock block)
Removes the passed NEXUS block from the project.


removeNexusBlocks

public void removeNexusBlocks(MesquiteFile f)
Returns those NEXUS blocks belonging to the given file.


getNexusBlocks

public NexusBlock[] getNexusBlocks(java.lang.Class c,
                                   MesquiteFile f)
Returns an array of NEXUS blocks of the given type and belonging to the given file.


getNexusBlocks

public NexusBlock[] getNexusBlocks(java.lang.String typeName)
Returns an array of NEXUS blocks of the given type name. 12 Jan 02


getNexusBlocks

public ListableVector getNexusBlocks()
Returns the ListableVector of NEXUS blocks in the project.


getAuthors

public ListableVector getAuthors()

numAuthors

public int numAuthors()

findAuthor

public Author findAuthor(java.lang.String s,
                         boolean tryName)

createTaxaBlock

public Taxa createTaxaBlock(int numTaxa)

getTaxas

public ListableVector getTaxas()
returns the list of Taxa


getTaxa

public Taxa getTaxa(int taxaNumber)
returns the Taxa of given number


getTaxa

public Taxa getTaxa(java.lang.String name)
returns the Taxa of given name


getTaxa

public Taxa getTaxa(MesquiteFile f,
                    java.lang.String ref)
returns the Taxa of given reference, name or number (as indicated by string passed)


getTaxa

public Taxa getTaxa(java.lang.String uniqueID,
                    int j)
returns the jth of taxa blocks with given unique ID


getTaxa

public Taxa getTaxa(MesquiteFile f,
                    int taxaNumber)
returns the Taxa of given number belonging to given file


getTaxaNumber

public int getTaxaNumber(java.lang.String name)
returns the number (index position) of the Taxa of given name


getTaxaNumber

public int getTaxaNumber(MesquiteFile file,
                         Taxa taxa)
returns the number (index position) of the Taxa


getTaxaNumber

public int getTaxaNumber(Taxa taxa)
returns the number (index position) of the Taxa


getTaxaReferenceInternal

public java.lang.String getTaxaReferenceInternal(Taxa taxa)
returns a string that can be used to refer to taxa block


getTaxaReferenceExternal

public java.lang.String getTaxaReferenceExternal(Taxa taxa)
returns a string that can be used to refer to taxa block


getTaxaReference

public java.lang.String getTaxaReference(Taxa taxa)
This is deprecated and should be avoided


chooseTaxa

public Taxa chooseTaxa(java.awt.Frame frame,
                       java.lang.String message,
                       CommandRecord commandRec)

chooseTaxa

public Taxa chooseTaxa(java.awt.Frame frame,
                       java.lang.String message,
                       boolean askEvenIfOne,
                       CommandRecord commandRec)

getNumberTaxas

public int getNumberTaxas(MesquiteFile f)
returns the number of Taxa objects stored in project belonging to a file


getNumberTaxas

public int getNumberTaxas(java.lang.String uniqueID)

getNumberTaxas

public int getNumberTaxas()
returns the number of Taxa objects stored in project


storeTree

public TreeVector storeTree(java.awt.Frame parent,
                            Tree tree,
                            CommandRecord commandRec)

getCharacterMatrices

public ListableVector getCharacterMatrices()
returns jth data set in file


getCharacterMatrix

public CharacterData getCharacterMatrix(int j)
returns jth data set in file


getCharacterMatrix

public CharacterData getCharacterMatrix(Taxa taxa,
                                        int j)
returns the jth data set belonging to given taxa.


getCharacterMatrix

public CharacterData getCharacterMatrix(int j,
                                        java.lang.Object dataClass)
returns the jth data set for given CharacterState subclass.


getCharacterMatrix

public CharacterData getCharacterMatrix(Taxa taxa,
                                        int j,
                                        java.lang.Object dataClass)
returns the jth data set belonging to given taxa for given CharacterState subclass.


getCharacterMatrix

public CharacterData getCharacterMatrix(MesquiteFile f,
                                        int j)
returns the jth of data sets belonging to a given file


getLatestMatrix

public CharacterData getLatestMatrix()
returns most recently added matrix.


getCharacterMatrix

public CharacterData getCharacterMatrix(MesquiteFile f,
                                        Taxa taxa,
                                        java.lang.Object dataClass,
                                        int j)
returns the jth of data sets belonging to a given file


getCharacterMatrixPAMT

public 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


getCharacterMatrix

public CharacterData getCharacterMatrix(java.lang.String uniqueID,
                                        int j)
returns the jth of data sets with given unique ID


getCharacterData

public CharacterData getCharacterData(java.lang.String name)
gets the data set of given reference string (ref. number, name, number) from the project


getCharacterData

public CharacterData getCharacterData(MesquiteFile f,
                                      java.lang.String ref)
gets the data set of given reference string (ref. number, name, number) from the project


getCharacterData

public CharacterData getCharacterData(MesquiteFile f,
                                      Taxa taxa,
                                      java.lang.String ref)
gets the data set of given reference string (ref. number, name, number) from the project


getCharacterData

public CharacterData getCharacterData(MesquiteFile f,
                                      Taxa taxa,
                                      java.lang.Object dataClass,
                                      java.lang.String ref)
gets the data set of given reference string (ref. number, name, number) from the project


getDifferentButCompatibleMatrix

public 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.


getDifferentButCompatibleMatrix

public 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.


getMatrixNumber

public int getMatrixNumber(java.lang.String name)
gets the number (index position) of the data set of given name.


getMatrixNumber

public int getMatrixNumber(CharacterData data)
gets the number (index position) of the data set.


getMatrixNumber

public int getMatrixNumber(MesquiteFile file,
                           CharacterData data)
gets the number (index position) of the data set.


getCharMatrixReferenceInternal

public java.lang.String getCharMatrixReferenceInternal(CharacterData data)
returns a string that can be used to refer to taxa block


getCharMatrixReferenceExternal

public java.lang.String getCharMatrixReferenceExternal(CharacterData data)
returns a string that can be used to refer to taxa block


getNumberCharMatrices

public int getNumberCharMatrices()
returns number of data sets in file


getNumberCharMatrices

public int getNumberCharMatrices(Taxa taxa)
returns number of data sets belonging to given taxa


getNumberCharMatrices

public 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


getNumberCharMatrices

public int getNumberCharMatrices(java.lang.Object dataClass)
returns number of data sets of a given data class (CharacterState subclass is passed)


getNumberCharMatrices

public int getNumberCharMatrices(MesquiteFile f)
returns number of data sets belonging to a given file


getNumberCharMatrices

public 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. If permitTaxaMatching is true, * considers taxa equal if names coincide


getNumberCharMatricesPAMT

public 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. If permitTaxaMatching is true, * considers taxa equal if names coincide


getNumberCharMatrices

public int getNumberCharMatrices(long ref)
returns number of data sets of given reference string (ref. number, name, number) from the project


getNumberCharMatrices

public int getNumberCharMatrices(java.lang.String uniqueID)
returns number of data sets of given reference string (ref. number, name, number) from the project


resolveCharMatrixIDs

public void resolveCharMatrixIDs()
gets the data set of given reference string (ref. number, name, number) from the project


chooseData

public CharacterData chooseData(java.awt.Frame frame,
                                Taxa taxa,
                                java.lang.Object dataClass,
                                CommandRecord commandRec)