tools.namemapping
Class ProteinLabelOrganism

java.lang.Object
  extended by tools.namemapping.ProteinLabel
      extended by tools.namemapping.ProteinLabelOrganism

public class ProteinLabelOrganism
extends ProteinLabel

A protein label implementation which associates a string identifier and an organism string with each protein label. For more information about protein labels, see ProteinLabel.

This class is useful when loading files containing proteins from different organisms which have identical identifiers.

Author:
Jan Krumsiek

Constructor Summary
ProteinLabelOrganism(String key)
          Creates a new label from a key.
ProteinLabelOrganism(String identifier, String organism)
          Creates a new label consisting of a given protein identifier and an organism string.
 
Method Summary
protected  String getKey()
          Returns the key for this protein label.
 String getOrganism()
          Returns the organism associated with this label
 String toString()
          Returns a string representation of this label
 
Methods inherited from class tools.namemapping.ProteinLabel
getIdentifier, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProteinLabelOrganism

public ProteinLabelOrganism(String identifier,
                            String organism)
Creates a new label consisting of a given protein identifier and an organism string.

Parameters:
identifier - identifier of the protein
organism - organism associated with this organism

ProteinLabelOrganism

public ProteinLabelOrganism(String key)
Creates a new label from a key. When the result of getKey() is passed into this constructor, an identical label object will be created. organism string.

Parameters:
identifier - identifier of the protein
Method Detail

getOrganism

public String getOrganism()
Returns the organism associated with this label

Returns:
organism for this label

getKey

protected String getKey()
Description copied from class: ProteinLabel
Returns the key for this protein label. Should return equal value for different label objects if and only if the labels are considered equal.

Overrides:
getKey in class ProteinLabel
Returns:
key for this protein label

toString

public String toString()
Description copied from class: ProteinLabel
Returns a string representation of this label

Overrides:
toString in class ProteinLabel