org.biojava3.protmod
Class ProteinModificationImpl.Builder

java.lang.Object
  extended by org.biojava3.protmod.ProteinModificationImpl.Builder
Enclosing class:
ProteinModificationImpl

public static class ProteinModificationImpl.Builder
extends Object

Uses Builder pattern to build a ProteinModification.


Constructor Summary
ProteinModificationImpl.Builder(ProteinModification copyFrom)
          Create a Builder from an existing ProteinModification.
ProteinModificationImpl.Builder(String id, ModificationCategory cat, ModificationOccurrenceType occType, ModificationCondition condition)
           
 
Method Summary
 ProteinModificationImpl.Builder addKeyword(String keyword)
          Add a keyword associate with the PTM.
 ProteinModificationImpl.Builder addKeywords(Collection<String> keywords)
           
 ProteinModificationImpl build()
           
 ProteinModificationImpl.Builder setCategory(ModificationCategory cat)
           
 ProteinModificationImpl.Builder setCondition(ModificationCondition condition)
           
 ProteinModificationImpl.Builder setDescription(String description)
           
 ProteinModificationImpl.Builder setFormula(String formula)
          Set the residue formula.
 ProteinModificationImpl.Builder setOccurrenceType(ModificationOccurrenceType occType)
           
 ProteinModificationImpl.Builder setPdbccId(String pdbccId)
          Set the Protein Data Bank Chemical Component ID.
 ProteinModificationImpl.Builder setPdbccName(String pdbccName)
          Set the Protein Data Bank Chemical Component name.
 ProteinModificationImpl.Builder setPsimodId(String psimodId)
          Set the PSI-MOD ID.
 ProteinModificationImpl.Builder setPsimodName(String psimodName)
          Set the PSI-MOD name.
 ProteinModificationImpl.Builder setResidId(String residId)
          Set the RESID ID.
 ProteinModificationImpl.Builder setResidName(String residName)
          Set the RESID name.
 ProteinModificationImpl.Builder setSystematicName(String sysName)
          Set the systematic name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProteinModificationImpl.Builder

public ProteinModificationImpl.Builder(String id,
                                       ModificationCategory cat,
                                       ModificationOccurrenceType occType,
                                       ModificationCondition condition)
Parameters:
id -
cat -
occType -
condition -

ProteinModificationImpl.Builder

public ProteinModificationImpl.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.