com.compomics.util.preferences
Class ModificationProfile

java.lang.Object
  extended by com.compomics.util.preferences.ModificationProfile
All Implemented Interfaces:
Serializable

public class ModificationProfile
extends Object
implements Serializable

This class stores the information about the modification preferences (colors, Names) used for the selected project.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
ModificationProfile()
          Constructor.
 
Method Summary
 Color getColor(String familyName)
          Returns the color used to code the given modification.
 String getFamilyName(String utilitiesName)
          Returns the modification family name corresponding to the given utilities name.
 Set<String> getFamilyNames()
          Returns the modification family names included in this profile.
 HashMap<String,Color> getPtmColors()
          Returns a mapping of the PeptideShaker names to the colors used.
 String getShortName(String familyName)
          Returns the short name of the given modification.
 Set<String> getUtilitiesNames()
          Returns the set of the utilities modification names included in this profile.
 void remove(String utilitiesName)
          Removes a modification from the profile.
 void setColor(String familyName, Color color)
          Sets a new color for the modification.
 void setPeptideShakerName(String utilitiesName, String familyName)
          Sets a new family name for the given modification.
 void setShortName(String familyName, String shortName)
          Sets a new short name for the given modification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModificationProfile

public ModificationProfile()
Constructor.

Method Detail

getUtilitiesNames

public Set<String> getUtilitiesNames()
Returns the set of the utilities modification names included in this profile.

Returns:
the set of the utilities modification names included in this profile

getFamilyNames

public Set<String> getFamilyNames()
Returns the modification family names included in this profile.

Returns:
the modification family names included in this profile

getFamilyName

public String getFamilyName(String utilitiesName)
Returns the modification family name corresponding to the given utilities name.

Parameters:
utilitiesName - the given utilities name
Returns:
the corresponding modification family name

getShortName

public String getShortName(String familyName)
Returns the short name of the given modification.

Parameters:
familyName - the PeptideShaker name of the modification
Returns:
the corresponding short name

getColor

public Color getColor(String familyName)
Returns the color used to code the given modification.

Parameters:
familyName - the PeptideShaker name of the given modification
Returns:
the corresponding color

setPeptideShakerName

public void setPeptideShakerName(String utilitiesName,
                                 String familyName)
Sets a new family name for the given modification.

Parameters:
utilitiesName - the utilities name of the modification
familyName - the new family name

setShortName

public void setShortName(String familyName,
                         String shortName)
Sets a new short name for the given modification.

Parameters:
familyName - the PeptideShaker name of the modification
shortName - the new short name

setColor

public void setColor(String familyName,
                     Color color)
Sets a new color for the modification.

Parameters:
familyName - the family name of the modification
color - the new color

remove

public void remove(String utilitiesName)
Removes a modification from the profile.

Parameters:
utilitiesName - the utilities name of the modification

getPtmColors

public HashMap<String,Color> getPtmColors()
Returns a mapping of the PeptideShaker names to the colors used.

Returns:
a mapping of the PeptideShaker names to the colors used


Copyright © 2012. All Rights Reserved.