001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 * Created on Jun 5, 2010
021 * Author: Jianjiong Gao
022 *
023 */
024
025package org.biojava.nbio.protmod.structure;
026
027import org.biojava.nbio.protmod.ProteinModification;
028
029import java.util.Collection;
030import java.util.Set;
031
032/**
033 * Root interface for all modifications in structure.
034 *
035 * @author Jianjiong Gao
036 * @since 3.0
037 */
038public interface ModifiedCompound {
039
040        /** return a description of this compound
041         *
042         * @return a description
043         */
044        public String getDescription();
045
046        public void setDescription(String desc);
047
048        /**
049         *
050         * @return {@link ProteinModificationBean} occurred on the residue.
051         */
052        public ProteinModification getModification();
053
054        public void setModification(ProteinModification modi);
055
056        /**
057         *
058         * @return a set of involved group.
059         */
060        public Set<StructureGroup> getGroups();
061
062        public void setGroups(Set<StructureGroup> groups);
063
064        /**
065         *
066         * @param isAminoAcid true if amino acids.
067         * @return a set of involved group of the type.
068         */
069        public Set<StructureGroup> getGroups(boolean isAminoAcid);
070
071
072
073        /**
074         *
075         * @return a set of atom linkages.
076         * @see #getLinkedGroupPairs
077         * @see StructureAtomLinkage
078         */
079        public Set<StructureAtomLinkage> getAtomLinkages();
080
081        /** Set atom linkages
082         *
083         * @return
084         */
085        public void setAtomLinkages(Set<StructureAtomLinkage> linkages);
086
087        /**
088         * Add a linkage. Add new the involved groups first using {@link addGroup}.
089         * @param linkage an atom linkage.
090         * @return true if this linkage was not already contained.
091         * @see StructureAtomLinkage
092         */
093        public boolean addAtomLinkage(StructureAtomLinkage linkage);
094
095        /**
096         * Add a collections of linkages.
097         * @param linkages an atom linkage.
098         */
099        public void addAtomLinkages(Collection<StructureAtomLinkage> linkages);
100
101
102        /**
103         *
104         * @return true if groups from multiple chains were involved
105         */
106        public boolean crossChains();
107
108
109}