com.compomics.util.pride
Class PrideObjectsFactory

java.lang.Object
  extended by com.compomics.util.pride.PrideObjectsFactory

public class PrideObjectsFactory
extends Object

This factory manages the pride objects saved in the user folder.

Author:
Marc Vaudel

Field Summary
static String extension
          The extension to use when saving objects.
static String prideFolder
          The folder where PRIDE related info is stored.
 
Method Summary
 void addContactGroup(ContactGroup contactGroup)
          Adds a contact group in the PRIDE objects.
 void addInstrument(Instrument instrument)
          Adds a instrument in the PRIDE objects.
 void addProtocol(Protocol protocol)
          Adds a protocol in the PRIDE objects.
 void addReferenceGroup(ReferenceGroup referenceGroup)
          Adds a reference group in the PRIDE objects.
 void addSample(Sample sample)
          Adds a sample in the PRIDE objects.
 void deleteContactGroup(ContactGroup contactGroup)
          Delete the given contact group.
 void deleteInstrument(Instrument instrument)
          Delete the given instrument.
 void deleteProtocol(Protocol protocol)
          Delete the given protocol.
 void deleteReferenceGroup(ReferenceGroup referenceGroup)
          Delete the given reference group.
 void deleteSample(Sample sample)
          Delete the given sample.
 HashMap<String,ContactGroup> getContactGroups()
          Returns the contact groups.
static PrideObjectsFactory getInstance()
          Method returning the instance of the factory.
 HashMap<String,Instrument> getInstruments()
          Returns the instruments.
 HashMap<String,Protocol> getProtocols()
          Returns the protocols.
 PtmToPrideMap getPtmToPrideMap()
          Returns the utilities ptm to pride map.
 HashMap<String,ReferenceGroup> getReferenceGroups()
          Returns the reference groups.
 HashMap<String,Sample> getSamples()
          Returns the samples.
 void setPtmToPrideMap(PtmToPrideMap ptmToPrideMap)
          Sets a new ptm to PRIDE map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prideFolder

public static final String prideFolder
The folder where PRIDE related info is stored.


extension

public static final String extension
The extension to use when saving objects. By default cus for compomics utilities serialization

See Also:
Constant Field Values
Method Detail

getInstance

public static PrideObjectsFactory getInstance()
                                       throws FileNotFoundException,
                                              IOException,
                                              ClassNotFoundException
Method returning the instance of the factory.

Returns:
the instance of the factory
Throws:
FileNotFoundException - exception thrown whenever the file was not found
IOException - exception thrown whenever an error occurred while writing the file
ClassNotFoundException - exception thrown whenever an error occurred while serializing the file

addContactGroup

public void addContactGroup(ContactGroup contactGroup)
                     throws IOException
Adds a contact group in the PRIDE objects.

Parameters:
contactGroup - the contact group to add
Throws:
IOException - exception thrown whenever an error occurred while saving

deleteContactGroup

public void deleteContactGroup(ContactGroup contactGroup)
Delete the given contact group.

Parameters:
contactGroup - the group to delete

addProtocol

public void addProtocol(Protocol protocol)
                 throws IOException
Adds a protocol in the PRIDE objects.

Parameters:
protocol - the protocol to add
Throws:
IOException - exception thrown whenever an error occurred while saving

deleteProtocol

public void deleteProtocol(Protocol protocol)
Delete the given protocol.

Parameters:
protocol - the protocol to delete

addInstrument

public void addInstrument(Instrument instrument)
                   throws IOException
Adds a instrument in the PRIDE objects.

Parameters:
instrument - the instrument to add
Throws:
IOException - exception thrown whenever an error occurred while saving

deleteInstrument

public void deleteInstrument(Instrument instrument)
Delete the given instrument.

Parameters:
instrument - the instrument to delete

addReferenceGroup

public void addReferenceGroup(ReferenceGroup referenceGroup)
                       throws IOException
Adds a reference group in the PRIDE objects.

Parameters:
referenceGroup - the reference group to add
Throws:
IOException - exception thrown whenever an error occurred while saving

deleteReferenceGroup

public void deleteReferenceGroup(ReferenceGroup referenceGroup)
Delete the given reference group.

Parameters:
referenceGroup - the reference group to delete

addSample

public void addSample(Sample sample)
               throws IOException
Adds a sample in the PRIDE objects.

Parameters:
sample - the sample to add
Throws:
IOException - exception thrown whenever an error occurred while saving

deleteSample

public void deleteSample(Sample sample)
Delete the given sample.

Parameters:
sample - the sample to delete

setPtmToPrideMap

public void setPtmToPrideMap(PtmToPrideMap ptmToPrideMap)
                      throws FileNotFoundException,
                             IOException
Sets a new ptm to PRIDE map.

Parameters:
ptmToPrideMap - a new ptm to pride map
Throws:
FileNotFoundException
IOException

getContactGroups

public HashMap<String,ContactGroup> getContactGroups()
Returns the contact groups.

Returns:
the contact groups

getInstruments

public HashMap<String,Instrument> getInstruments()
Returns the instruments.

Returns:
the instruments

getProtocols

public HashMap<String,Protocol> getProtocols()
Returns the protocols.

Returns:
the protocols

getPtmToPrideMap

public PtmToPrideMap getPtmToPrideMap()
Returns the utilities ptm to pride map.

Returns:
the utilities ptm to pride map

getReferenceGroups

public HashMap<String,ReferenceGroup> getReferenceGroups()
Returns the reference groups.

Returns:
the reference groups

getSamples

public HashMap<String,Sample> getSamples()
Returns the samples.

Returns:
the samples


Copyright © 2013. All Rights Reserved.