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 infos are stored.
 
Method Summary
 void addContact(Contact contact)
          Adds a contact 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 addReference(Reference reference)
          Adds a reference in the pride objects.
 void addSample(Sample sample)
          Adds a sample in the pride objects.
 HashMap<String,Contact> getContacts()
          Returns the contacts.
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,Reference> getReferences()
          Returns the references.
 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 infos are 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

addContact

public void addContact(Contact contact)
                throws IOException
Adds a contact in the pride objects.

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

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

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

addReference

public void addReference(Reference reference)
                  throws IOException
Adds a reference in the pride objects.

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

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

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

getContacts

public HashMap<String,Contact> getContacts()
Returns the contacts.

Returns:
the contacts

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

getReferences

public HashMap<String,Reference> getReferences()
Returns the references.

Returns:
the references

getSamples

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

Returns:
the samples


Copyright © 2012. All Rights Reserved.