com.compomics.util.pride
Class PrideObjectsFactory

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

public class PrideObjectsFactory
extends java.lang.Object

This factory manages the pride objects saved in the user folder

Author:
marc

Field Summary
static java.lang.String extension
          The extension to use when saving objects.
static java.lang.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.
 java.util.HashMap<java.lang.String,Contact> getContacts()
          Returns the contacts.
static PrideObjectsFactory getInstance()
          Method returning the instance of the factory.
 java.util.HashMap<java.lang.String,Instrument> getInstruments()
          Returns the instruments.
 java.util.HashMap<java.lang.String,Protocol> getProtocols()
          Returns the protocols.
 PtmToPrideMap getPtmToPrideMap()
          Returns the utilities ptm to pride map.
 java.util.HashMap<java.lang.String,Reference> getReferences()
          Returns the references.
 java.util.HashMap<java.lang.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 java.lang.String prideFolder
The folder where pride related infos are stored.


extension

public static final java.lang.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 java.io.FileNotFoundException,
                                              java.io.IOException,
                                              java.lang.ClassNotFoundException
Method returning the instance of the factory.

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

addContact

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

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

addProtocol

public void addProtocol(Protocol protocol)
                 throws java.io.IOException
Adds a protocol in the pride objects.

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

addInstrument

public void addInstrument(Instrument instrument)
                   throws java.io.IOException
Adds a instrument in the pride objects.

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

addReference

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

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

addSample

public void addSample(Sample sample)
               throws java.io.IOException
Adds a sample in the pride objects.

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

setPtmToPrideMap

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

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

getContacts

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

Returns:
the contacts

getInstruments

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

Returns:
the instruments

getProtocols

public java.util.HashMap<java.lang.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 java.util.HashMap<java.lang.String,Reference> getReferences()
Returns the references.

Returns:
the references

getSamples

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

Returns:
the samples


Copyright © 2012. All Rights Reserved.