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 ProteinModification} 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 StructureAtomLinkage
077         */
078        public Set<StructureAtomLinkage> getAtomLinkages();
079
080        /**
081         * Set atom linkages
082         *
083         */
084        public void setAtomLinkages(Set<StructureAtomLinkage> linkages);
085
086        /**
087         * Add a linkage. Add new the involved groups first using addGroup.
088         * @param linkage an atom linkage.
089         * @return true if this linkage was not already contained.
090         * @see StructureAtomLinkage
091         */
092        public boolean addAtomLinkage(StructureAtomLinkage linkage);
093
094        /**
095         * Add a collections of linkages.
096         * @param linkages an atom linkage.
097         */
098        public void addAtomLinkages(Collection<StructureAtomLinkage> linkages);
099
100
101        /**
102         *
103         * @return true if groups from multiple chains were involved
104         */
105        public boolean crossChains();
106
107
108}