org.forester.go
Class BasicGoTerm

java.lang.Object
  extended by org.forester.go.BasicGoTerm
All Implemented Interfaces:
Comparable<GoTerm>, GoTerm, PhylogenyData

public class BasicGoTerm
extends Object
implements GoTerm


Constructor Summary
BasicGoTerm(GoId id, String name, GoNameSpace namespace, boolean is_obsolete)
           
BasicGoTerm(String id, String name, String namespace, boolean is_obsolete)
           
 
Method Summary
 StringBuffer asSimpleText()
           
 StringBuffer asText()
           
 int compareTo(GoTerm go_term)
          Compares based on GO id.
 PhylogenyData copy()
          Makes a shallow copy.
 boolean equals(Object o)
          Return true if both GO id and namespace are equal.
 List<GoId> getAltIds()
           
 String getComment()
           
 String getDefinition()
           
 GoId getGoId()
           
 GoNameSpace getGoNameSpace()
           
 List<GoRelationship> getGoRelationships()
           
 List<GoSubset> getGoSubsets()
           
 List<GoXRef> getGoXRefs()
           
 String getName()
           
 List<GoId> getSuperGoIds()
           
 int hashCode()
          Hashcode is based on hashcode of GO id.
 boolean isEqual(PhylogenyData go_term)
          Compares this PhylogenyData to PhylogenyData data.
 boolean isObsolete()
           
 void setComment(String comment)
           
 void setDefinition(String definition)
           
 void setGoSubsets(List<GoSubset> go_subsets)
           
 StringBuffer toNHX()
           
 void toPhyloXML(Writer writer, int level, String indentation)
          Writes a phyloXML representation of this phylogeny data.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicGoTerm

public BasicGoTerm(GoId id,
                   String name,
                   GoNameSpace namespace,
                   boolean is_obsolete)

BasicGoTerm

public BasicGoTerm(String id,
                   String name,
                   String namespace,
                   boolean is_obsolete)
Method Detail

asSimpleText

public StringBuffer asSimpleText()
Specified by:
asSimpleText in interface PhylogenyData

asText

public StringBuffer asText()
Specified by:
asText in interface PhylogenyData

compareTo

public int compareTo(GoTerm go_term)
Compares based on GO id.

Specified by:
compareTo in interface Comparable<GoTerm>

copy

public PhylogenyData copy()
Makes a shallow copy.

Specified by:
copy in interface PhylogenyData
Returns:
a ~deep~ copy of this PhylogenyData

equals

public boolean equals(Object o)
Return true if both GO id and namespace are equal.

Overrides:
equals in class Object

getAltIds

public List<GoId> getAltIds()
Specified by:
getAltIds in interface GoTerm

getComment

public String getComment()
Specified by:
getComment in interface GoTerm

getDefinition

public String getDefinition()
Specified by:
getDefinition in interface GoTerm

getGoId

public GoId getGoId()
Specified by:
getGoId in interface GoTerm

getGoNameSpace

public GoNameSpace getGoNameSpace()
Specified by:
getGoNameSpace in interface GoTerm

getGoRelationships

public List<GoRelationship> getGoRelationships()
Specified by:
getGoRelationships in interface GoTerm

getGoSubsets

public List<GoSubset> getGoSubsets()
Specified by:
getGoSubsets in interface GoTerm

getGoXRefs

public List<GoXRef> getGoXRefs()
Specified by:
getGoXRefs in interface GoTerm

getName

public String getName()
Specified by:
getName in interface GoTerm

getSuperGoIds

public List<GoId> getSuperGoIds()
Specified by:
getSuperGoIds in interface GoTerm

hashCode

public int hashCode()
Hashcode is based on hashcode of GO id.

Overrides:
hashCode in class Object

isEqual

public boolean isEqual(PhylogenyData go_term)
Description copied from interface: PhylogenyData
Compares this PhylogenyData to PhylogenyData data. In general, this should return true if and only if all fiels are exactly identical.

Specified by:
isEqual in interface PhylogenyData
Returns:
in general, true if and only if all fiels are exactly identical, false otherwise

isObsolete

public boolean isObsolete()
Specified by:
isObsolete in interface GoTerm

setComment

public void setComment(String comment)

setDefinition

public void setDefinition(String definition)

setGoSubsets

public void setGoSubsets(List<GoSubset> go_subsets)

toNHX

public StringBuffer toNHX()
Specified by:
toNHX in interface PhylogenyData

toPhyloXML

public void toPhyloXML(Writer writer,
                       int level,
                       String indentation)
                throws IOException
Description copied from interface: PhylogenyData
Writes a phyloXML representation of this phylogeny data.

Specified by:
toPhyloXML in interface PhylogenyData
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object