Package org.biojava.nbio.protmod
Class ProteinModificationImpl.Builder
java.lang.Object
org.biojava.nbio.protmod.ProteinModificationImpl.Builder
- Enclosing class:
- ProteinModificationImpl
Uses Builder pattern to build a ProteinModification.
-
Constructor Summary
ConstructorDescriptionBuilder
(String id, ModificationCategory cat, ModificationOccurrenceType occType, ModificationCondition condition) Builder
(ProteinModification copyFrom) Create a Builder from an existing ProteinModification. -
Method Summary
Modifier and TypeMethodDescriptionaddKeyword
(String keyword) Add a keyword associate with the PTM.addKeywords
(Collection<String> keywords) build()
setCondition
(ModificationCondition condition) setDescription
(String description) setFormula
(String formula) Set the residue formula.setPdbccId
(String pdbccId) Set the Protein Data Bank Chemical Component ID.setPdbccName
(String pdbccName) Set the Protein Data Bank Chemical Component name.setPsimodId
(String psimodId) Set the PSI-MOD ID.setPsimodName
(String psimodName) Set the PSI-MOD name.setResidId
(String residId) Set the RESID ID.setResidName
(String residName) Set the RESID name.setSystematicName
(String sysName) Set the systematic name.
-
Constructor Details
-
Builder
public Builder(String id, ModificationCategory cat, ModificationOccurrenceType occType, ModificationCondition condition) - Parameters:
id
-cat
-occType
-condition
-
-
Builder
Create a Builder from an existing ProteinModification.- Parameters:
copyFrom
- the ProteinModification to be copied from.
-
-
Method Details
-
setCategory
-
setOccurrenceType
-
setCondition
-
setPdbccId
Set the Protein Data Bank Chemical Component ID.- Parameters:
pdbccId
- Protein Data Bank Chemical Component ID.- Returns:
- the same Builder object so you can chain setters.
-
setPdbccName
Set the Protein Data Bank Chemical Component name.- Parameters:
pdbccName
- Protein Data Bank Chemical Component name.- Returns:
- the same Builder object so you can chain setters.
-
setResidId
Set the RESID ID.- Parameters:
residId
- RESID ID.- Returns:
- the same Builder object so you can chain setters.
-
setResidName
Set the RESID name.- Parameters:
residName
- RESID name.- Returns:
- the same Builder object so you can chain setters.
-
setPsimodId
Set the PSI-MOD ID.- Parameters:
psimodId
- PSI-MOD ID.- Returns:
- the same Builder object so you can chain setters.
-
setPsimodName
Set the PSI-MOD name.- Parameters:
psimodName
- PSI-MOD name.- Returns:
- the same Builder object so you can chain setters.
-
setSystematicName
Set the systematic name.- Parameters:
sysName
- systematic name.- Returns:
- the same Builder object so you can chain setters.
-
setDescription
- Parameters:
description
- description of the modification.- Returns:
- the same Builder object so you can chain setters.
-
addKeyword
Add a keyword associate with the PTM.- Parameters:
keyword
- a keyword.- Returns:
- the same Builder object so you can chain setters.
- Throws:
IllegalArgumentException
- if the keyword is null.
-
addKeywords
-
setFormula
Set the residue formula.- Parameters:
formula
- residue formula.- Returns:
- the same Builder object so you can chain setters.
-
build
- Returns:
- build ProteinModification.
-