Package org.forester.go
Class BasicGoTerm
- java.lang.Object
-
- org.forester.go.BasicGoTerm
-
- All Implemented Interfaces:
java.lang.Comparable<GoTerm>
,GoTerm
,PhylogenyData
public class BasicGoTerm extends java.lang.Object implements GoTerm
-
-
Constructor Summary
Constructors Constructor Description BasicGoTerm(java.lang.String id, java.lang.String name, java.lang.String namespace, boolean is_obsolete)
BasicGoTerm(GoId id, java.lang.String name, GoNameSpace namespace, boolean is_obsolete)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuffer
asSimpleText()
java.lang.StringBuffer
asText()
int
compareTo(GoTerm go_term)
Compares based on GO id.PhylogenyData
copy()
Makes a shallow copy.boolean
equals(java.lang.Object o)
Return true if both GO id and namespace are equal.java.util.List<GoId>
getAltIds()
java.lang.String
getComment()
java.lang.String
getDefinition()
GoId
getGoId()
GoNameSpace
getGoNameSpace()
java.util.List<GoRelationship>
getGoRelationships()
java.util.List<GoSubset>
getGoSubsets()
java.util.List<GoXRef>
getGoXRefs()
java.lang.String
getName()
java.util.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(java.lang.String comment)
void
setDefinition(java.lang.String definition)
void
setGoSubsets(java.util.List<GoSubset> go_subsets)
java.lang.StringBuffer
toNHX()
void
toPhyloXML(java.io.Writer writer, int level, java.lang.String indentation)
Writes a phyloXML representation of this phylogeny data.java.lang.String
toString()
-
-
-
Constructor Detail
-
BasicGoTerm
public BasicGoTerm(GoId id, java.lang.String name, GoNameSpace namespace, boolean is_obsolete)
-
BasicGoTerm
public BasicGoTerm(java.lang.String id, java.lang.String name, java.lang.String namespace, boolean is_obsolete)
-
-
Method Detail
-
asSimpleText
public java.lang.StringBuffer asSimpleText()
- Specified by:
asSimpleText
in interfacePhylogenyData
-
asText
public java.lang.StringBuffer asText()
- Specified by:
asText
in interfacePhylogenyData
-
compareTo
public int compareTo(GoTerm go_term)
Compares based on GO id.- Specified by:
compareTo
in interfacejava.lang.Comparable<GoTerm>
-
copy
public PhylogenyData copy()
Makes a shallow copy.- Specified by:
copy
in interfacePhylogenyData
- Returns:
- a ~deep~ copy of this PhylogenyData
-
equals
public boolean equals(java.lang.Object o)
Return true if both GO id and namespace are equal.- Overrides:
equals
in classjava.lang.Object
-
getComment
public java.lang.String getComment()
- Specified by:
getComment
in interfaceGoTerm
-
getDefinition
public java.lang.String getDefinition()
- Specified by:
getDefinition
in interfaceGoTerm
-
getGoNameSpace
public GoNameSpace getGoNameSpace()
- Specified by:
getGoNameSpace
in interfaceGoTerm
-
getGoRelationships
public java.util.List<GoRelationship> getGoRelationships()
- Specified by:
getGoRelationships
in interfaceGoTerm
-
getGoSubsets
public java.util.List<GoSubset> getGoSubsets()
- Specified by:
getGoSubsets
in interfaceGoTerm
-
getGoXRefs
public java.util.List<GoXRef> getGoXRefs()
- Specified by:
getGoXRefs
in interfaceGoTerm
-
getSuperGoIds
public java.util.List<GoId> getSuperGoIds()
- Specified by:
getSuperGoIds
in interfaceGoTerm
-
hashCode
public int hashCode()
Hashcode is based on hashcode of GO id.- Overrides:
hashCode
in classjava.lang.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 interfacePhylogenyData
- Returns:
- in general, true if and only if all fiels are exactly identical, false otherwise
-
isObsolete
public boolean isObsolete()
- Specified by:
isObsolete
in interfaceGoTerm
-
setComment
public void setComment(java.lang.String comment)
-
setDefinition
public void setDefinition(java.lang.String definition)
-
setGoSubsets
public void setGoSubsets(java.util.List<GoSubset> go_subsets)
-
toNHX
public java.lang.StringBuffer toNHX()
- Specified by:
toNHX
in interfacePhylogenyData
-
toPhyloXML
public void toPhyloXML(java.io.Writer writer, int level, java.lang.String indentation) throws java.io.IOException
Description copied from interface:PhylogenyData
Writes a phyloXML representation of this phylogeny data.- Specified by:
toPhyloXML
in interfacePhylogenyData
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-