apollo.datamodel
Class CompositeDataHolder

java.lang.Object
  extended by apollo.datamodel.CompositeDataHolder
All Implemented Interfaces:
ApolloDataI

public class CompositeDataHolder
extends java.lang.Object
implements ApolloDataI

Holds multiple curation sets for synteny. Should this be called SyntenyDataHolder or MultiSpeciesDataHolder? For composite curation sets just wraps it - eventually replace CurationSets compositeness with this. CompDataHolder holds a list of SpeciesComparisons (that holds 2 cur sets and a link set) rename species stuff to curation stuff CompositeDataHolder is too vague. rename MultiCurationHolder, but it also holds links


Constructor Summary
CompositeDataHolder()
           
CompositeDataHolder(CurationSet curSet)
          Puts composite curation sets into species comparisons
CompositeDataHolder(SpeciesComparison sc)
           
 
Method Summary
 void addSpeciesComparison(SpeciesComparison sc)
           
 CurationSet getCompositeCurationSet()
          Should be phased out
 CompositeDataHolder getCompositeDataHolder()
           
 CurationSet getCurationSet()
          ApolloDataI method.
 CurationSet getCurationSet(int i)
          Return ith species curation set as listed in species array list - this excludes curation sets for links (if thats how links are represented) rename this - needs to lose species association.
 CurationSet getCurationSet(java.lang.String setName)
           
 CurationSet getCurSetFromCompCurSet(java.lang.String setName)
           
 LinkSet getLinkSet(int i)
           
 java.lang.String getName()
          unclear if name is really needed.
 int getNumberOfLinkSets()
           
 int getNumberOfSpecies()
          I keep forgetting numberOfSpecies has no 'get' in front of it, so I'm inserting this standard accessor for my own sanity.
 java.lang.String getSpecies(int i)
           
 SpeciesComparison getSpeciesComparison(int i)
           
 boolean hasNonEmptyLinkSet()
           
 boolean isCompositeDataHolder()
           
 boolean isCurationSet()
          ApolloDataI - we are not a curation set so returning false.
 boolean isMultiSpecies()
          If we have more than one species, it answers 'true', otherwise not.
 int numberOfSpecies()
          Number of curation sets for species - not links.
 int speciesCompSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeDataHolder

public CompositeDataHolder()

CompositeDataHolder

public CompositeDataHolder(SpeciesComparison sc)

CompositeDataHolder

public CompositeDataHolder(CurationSet curSet)
Puts composite curation sets into species comparisons

Method Detail

getCurationSet

public CurationSet getCurationSet(java.lang.String setName)

getCurationSet

public CurationSet getCurationSet(int i)
Return ith species curation set as listed in species array list - this excludes curation sets for links (if thats how links are represented) rename this - needs to lose species association. getChildCurationSet? getCurationSet? getSubCurationSet?


numberOfSpecies

public int numberOfSpecies()
Number of curation sets for species - not links. This is equal to the number of species comparisons or that number plus one depending if the last comparison has 2 species or one(not filled in yet).


getNumberOfSpecies

public int getNumberOfSpecies()
I keep forgetting numberOfSpecies has no 'get' in front of it, so I'm inserting this standard accessor for my own sanity.


getSpecies

public java.lang.String getSpecies(int i)

hasNonEmptyLinkSet

public boolean hasNonEmptyLinkSet()

getCurSetFromCompCurSet

public CurationSet getCurSetFromCompCurSet(java.lang.String setName)

getNumberOfLinkSets

public int getNumberOfLinkSets()

getLinkSet

public LinkSet getLinkSet(int i)

addSpeciesComparison

public void addSpeciesComparison(SpeciesComparison sc)

speciesCompSize

public int speciesCompSize()

getSpeciesComparison

public SpeciesComparison getSpeciesComparison(int i)

getCompositeCurationSet

public CurationSet getCompositeCurationSet()
Should be phased out


isCurationSet

public boolean isCurationSet()
ApolloDataI - we are not a curation set so returning false. This allows one to query an ApolloDataI to find out if its a curation set or a composite data holder.

Specified by:
isCurationSet in interface ApolloDataI

getCurationSet

public CurationSet getCurationSet()
ApolloDataI method. if isCurationSet returns true than a real curation set would be returned here. Since this is not a curation set we return false. This method should be used after testing isCurationSet()==true, so in other words this method should never be called on a composite data holder, only on a curation set.

Specified by:
getCurationSet in interface ApolloDataI

isCompositeDataHolder

public boolean isCompositeDataHolder()
Specified by:
isCompositeDataHolder in interface ApolloDataI

getCompositeDataHolder

public CompositeDataHolder getCompositeDataHolder()
Specified by:
getCompositeDataHolder in interface ApolloDataI

isMultiSpecies

public boolean isMultiSpecies()
If we have more than one species, it answers 'true', otherwise not.

Specified by:
isMultiSpecies in interface ApolloDataI

getName

public java.lang.String getName()
Description copied from interface: ApolloDataI
unclear if name is really needed. region change event takes it but never used

Specified by:
getName in interface ApolloDataI