Package com.compomics.util.pride
Class PrideObjectsFactory
java.lang.Object
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
-
Method Summary
Modifier and Type Method Description 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.static String
getPrideFolder()
Returns the folder where pride annotation information should be saved.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.static void
setPrideFolder(String prideFolder)
Sets the folder where pride annotation information should be saved.void
setPtmToPrideMap(PtmToPrideMap ptmToPrideMap)
Sets a new PTM to PRIDE map.
-
Field Details
-
extension
The extension to use when saving objects. By default cus for compomics utilities serialization- See Also:
- Constant Field Values
-
-
Method Details
-
getInstance
public static PrideObjectsFactory getInstance() throws FileNotFoundException, IOException, ClassNotFoundExceptionMethod returning the instance of the factory.- Returns:
- the instance of the factory
- Throws:
FileNotFoundException
- exception thrown whenever the file was not foundIOException
- exception thrown whenever an error occurred while writing the fileClassNotFoundException
- exception thrown whenever an error occurred while serializing the file
-
addContactGroup
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
Delete the given contact group.- Parameters:
contactGroup
- the group to delete
-
addProtocol
Adds a protocol in the PRIDE objects.- Parameters:
protocol
- the protocol to add- Throws:
IOException
- exception thrown whenever an error occurred while saving
-
deleteProtocol
Delete the given protocol.- Parameters:
protocol
- the protocol to delete
-
addInstrument
Adds a instrument in the PRIDE objects.- Parameters:
instrument
- the instrument to add- Throws:
IOException
- exception thrown whenever an error occurred while saving
-
deleteInstrument
Delete the given instrument.- Parameters:
instrument
- the instrument to delete
-
addReferenceGroup
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
Delete the given reference group.- Parameters:
referenceGroup
- the reference group to delete
-
addSample
Adds a sample in the PRIDE objects.- Parameters:
sample
- the sample to add- Throws:
IOException
- exception thrown whenever an error occurred while saving
-
deleteSample
Delete the given sample.- Parameters:
sample
- the sample to delete
-
setPtmToPrideMap
public void setPtmToPrideMap(PtmToPrideMap ptmToPrideMap) throws FileNotFoundException, IOExceptionSets a new PTM to PRIDE map.- Parameters:
ptmToPrideMap
- a new PTM to pride map- Throws:
FileNotFoundException
- if a FileNotFoundException occursIOException
- if an IOException occurs
-
getContactGroups
Returns the contact groups.- Returns:
- the contact groups
-
getInstruments
Returns the instruments.- Returns:
- the instruments
-
getProtocols
Returns the protocols.- Returns:
- the protocols
-
getPtmToPrideMap
Returns the utilities PTM to pride map.- Returns:
- the utilities PTM to pride map
-
getReferenceGroups
Returns the reference groups.- Returns:
- the reference groups
-
getSamples
Returns the samples.- Returns:
- the samples
-
getPrideFolder
Returns the folder where pride annotation information should be saved.- Returns:
- the folder where pride annotation information should be saved
-
setPrideFolder
Sets the folder where pride annotation information should be saved.- Parameters:
prideFolder
- the folder where pride annotation information should be saved
-