Package org.biojava.nbio.protmod
Class ProteinModificationImpl.Builder
- java.lang.Object
-
- org.biojava.nbio.protmod.ProteinModificationImpl.Builder
-
- Enclosing class:
- ProteinModificationImpl
public static class ProteinModificationImpl.Builder extends Object
Uses Builder pattern to build a ProteinModification.
-
-
Constructor Summary
Constructors Constructor Description Builder(String id, ModificationCategory cat, ModificationOccurrenceType occType, ModificationCondition condition)
Builder(ProteinModification copyFrom)
Create a Builder from an existing ProteinModification.
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder(String id, ModificationCategory cat, ModificationOccurrenceType occType, ModificationCondition condition)
- Parameters:
id
-cat
-occType
-condition
-
-
Builder
public Builder(ProteinModification copyFrom)
Create a Builder from an existing ProteinModification.- Parameters:
copyFrom
- the ProteinModification to be copied from.
-
-
Method Detail
-
setCategory
public ProteinModificationImpl.Builder setCategory(ModificationCategory cat)
-
setOccurrenceType
public ProteinModificationImpl.Builder setOccurrenceType(ModificationOccurrenceType occType)
-
setCondition
public ProteinModificationImpl.Builder setCondition(ModificationCondition condition)
-
setPdbccId
public ProteinModificationImpl.Builder setPdbccId(String pdbccId)
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
public ProteinModificationImpl.Builder setPdbccName(String pdbccName)
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
public ProteinModificationImpl.Builder setResidId(String residId)
Set the RESID ID.- Parameters:
residId
- RESID ID.- Returns:
- the same Builder object so you can chain setters.
-
setResidName
public ProteinModificationImpl.Builder setResidName(String residName)
Set the RESID name.- Parameters:
residName
- RESID name.- Returns:
- the same Builder object so you can chain setters.
-
setPsimodId
public ProteinModificationImpl.Builder setPsimodId(String psimodId)
Set the PSI-MOD ID.- Parameters:
psimodId
- PSI-MOD ID.- Returns:
- the same Builder object so you can chain setters.
-
setPsimodName
public ProteinModificationImpl.Builder setPsimodName(String psimodName)
Set the PSI-MOD name.- Parameters:
psimodName
- PSI-MOD name.- Returns:
- the same Builder object so you can chain setters.
-
setSystematicName
public ProteinModificationImpl.Builder setSystematicName(String sysName)
Set the systematic name.- Parameters:
sysName
- systematic name.- Returns:
- the same Builder object so you can chain setters.
-
setDescription
public ProteinModificationImpl.Builder setDescription(String description)
- Parameters:
description
- description of the modification.- Returns:
- the same Builder object so you can chain setters.
-
addKeyword
public ProteinModificationImpl.Builder addKeyword(String keyword)
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
public ProteinModificationImpl.Builder addKeywords(Collection<String> keywords)
-
setFormula
public ProteinModificationImpl.Builder setFormula(String formula)
Set the residue formula.- Parameters:
formula
- residue formula.- Returns:
- the same Builder object so you can chain setters.
-
build
public ProteinModificationImpl build()
- Returns:
- build ProteinModification.
-
-