Class ModifiedCompoundImpl
- java.lang.Object
-
- org.biojava.nbio.protmod.structure.ModifiedCompoundImpl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ModifiedCompound>
,ModifiedCompound
public class ModifiedCompoundImpl extends java.lang.Object implements ModifiedCompound, java.io.Serializable, java.lang.Comparable<ModifiedCompound>
- Since:
- 3.0
- Author:
- Jianjiong Gao
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
newline
-
Constructor Summary
Constructors Constructor Description ModifiedCompoundImpl()
ModifiedCompoundImpl(ProteinModification modification, java.util.Collection<StructureAtomLinkage> linkages)
ModifiedCompoundImpl(ProteinModification modification, StructureGroup modifiedResidue)
Create a ModifiedCompoundImpl that has only one involved component.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addAtomLinkage(StructureAtomLinkage linkage)
Add a linkage.void
addAtomLinkages(java.util.Collection<StructureAtomLinkage> linkages)
Add a collections of linkages.int
compareTo(ModifiedCompound compound)
boolean
crossChains()
boolean
equals(java.lang.Object obj)
java.util.Set<StructureAtomLinkage>
getAtomLinkages()
java.lang.String
getDescription()
return a description of this compoundjava.util.Set<StructureGroup>
getGroups()
java.util.Set<StructureGroup>
getGroups(boolean isAminoAcid)
ProteinModification
getModification()
java.lang.String
getOriginalModificationId()
Deprecated.use getModification().getId()int
hashCode()
void
setAtomLinkages(java.util.Set<StructureAtomLinkage> linkages)
Set atom linkagesvoid
setDescription(java.lang.String desc)
void
setGroups(java.util.Set<StructureGroup> groups)
void
setModification(ProteinModification protmod)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ModifiedCompoundImpl
public ModifiedCompoundImpl()
-
ModifiedCompoundImpl
public ModifiedCompoundImpl(ProteinModification modification, StructureGroup modifiedResidue)
Create a ModifiedCompoundImpl that has only one involved component. Use this constructor for a modified residue.- Parameters:
modification
-ProteinModification
.modifiedResidue
- modified group.- Throws:
java.lang.IllegalArgumentException
- if either argument is null.
-
ModifiedCompoundImpl
public ModifiedCompoundImpl(ProteinModification modification, java.util.Collection<StructureAtomLinkage> linkages)
- Parameters:
modification
- ProteinModification.linkages
- a collection of atom linkages.- See Also:
ProteinModification
,StructureAtomLinkage
-
-
Method Detail
-
setModification
public void setModification(ProteinModification protmod)
- Specified by:
setModification
in interfaceModifiedCompound
-
getModification
public ProteinModification getModification()
- Specified by:
getModification
in interfaceModifiedCompound
- Returns:
ProteinModificationBean
occurred on the residue.
-
getOriginalModificationId
@Deprecated public java.lang.String getOriginalModificationId()
Deprecated.use getModification().getId()- Returns:
- the original modification ID.
-
getGroups
public java.util.Set<StructureGroup> getGroups()
- Specified by:
getGroups
in interfaceModifiedCompound
- Returns:
- a set of involved group.
-
getGroups
public java.util.Set<StructureGroup> getGroups(boolean isAminoAcid)
- Specified by:
getGroups
in interfaceModifiedCompound
- Parameters:
isAminoAcid
- true if amino acids.- Returns:
- a set of involved group of the type.
-
setGroups
public void setGroups(java.util.Set<StructureGroup> groups)
- Specified by:
setGroups
in interfaceModifiedCompound
-
getAtomLinkages
public java.util.Set<StructureAtomLinkage> getAtomLinkages()
- Specified by:
getAtomLinkages
in interfaceModifiedCompound
- Returns:
- a set of atom linkages.
- See Also:
#getLinkedGroupPairs
,StructureAtomLinkage
-
setAtomLinkages
public void setAtomLinkages(java.util.Set<StructureAtomLinkage> linkages)
Description copied from interface:ModifiedCompound
Set atom linkages- Specified by:
setAtomLinkages
in interfaceModifiedCompound
-
addAtomLinkage
public boolean addAtomLinkage(StructureAtomLinkage linkage)
Description copied from interface:ModifiedCompound
Add a linkage. Add new the involved groups first usingaddGroup
.- Specified by:
addAtomLinkage
in interfaceModifiedCompound
- Parameters:
linkage
- an atom linkage.- Returns:
- true if this linkage was not already contained.
- See Also:
StructureAtomLinkage
-
addAtomLinkages
public void addAtomLinkages(java.util.Collection<StructureAtomLinkage> linkages)
Description copied from interface:ModifiedCompound
Add a collections of linkages.- Specified by:
addAtomLinkages
in interfaceModifiedCompound
- Parameters:
linkages
- an atom linkage.
-
crossChains
public boolean crossChains()
- Specified by:
crossChains
in interfaceModifiedCompound
- Returns:
- true if groups from multiple chains were involved
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ModifiedCompound
return a description of this compound- Specified by:
getDescription
in interfaceModifiedCompound
- Returns:
- a description
-
setDescription
public void setDescription(java.lang.String desc)
- Specified by:
setDescription
in interfaceModifiedCompound
-
compareTo
public int compareTo(ModifiedCompound compound)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ModifiedCompound>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- Returns:
- true if same modification and same components; false, otherwise.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-