001package com.hfg.bio.seq;
002
003import java.util.Collection;
004import java.util.Date;
005import java.util.List;
006import java.util.Set;
007
008import com.hfg.bio.DbXref;
009import com.hfg.bio.seq.format.SeqCitation;
010import com.hfg.bio.seq.format.feature.FeatureKey;
011import com.hfg.bio.seq.format.feature.SeqFeature;
012import com.hfg.bio.seq.format.feature.qualifier.MolType;
013import com.hfg.bio.taxonomy.ncbi.NCBITaxon;
014import com.hfg.bio.taxonomy.SeqRepositoryDivision;
015import com.hfg.util.collection.CollectionUtil;
016
017//------------------------------------------------------------------------------
018/**
019 Interface for an exetended biological protein, DNA, or RNA sequence with support for features,
020 citations, db xrefs, etc.
021 <div>
022  @author J. Alex Taylor, hairyfatguy.com
023 </div>
024 */
025//------------------------------------------------------------------------------
026// com.hfg XML/HTML Coding Library
027//
028// This library is free software; you can redistribute it and/or
029// modify it under the terms of the GNU Lesser General Public
030// License as published by the Free Software Foundation; either
031// version 2.1 of the License, or (at your option) any later version.
032//
033// This library is distributed in the hope that it will be useful,
034// but WITHOUT ANY WARRANTY; without even the implied warranty of
035// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
036// Lesser General Public License for more details.
037//
038// You should have received a copy of the GNU Lesser General Public
039// License along with this library; if not, write to the Free Software
040// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
041//
042// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
043// jataylor@hairyfatguy.com
044//------------------------------------------------------------------------------
045
046public interface BioSequencePlus extends BioSequence
047{
048   //--------------------------------------------------------------------------
049   public BioSequencePlusImpl setSeqRepositoryDivision(SeqRepositoryDivision inValue);
050
051   //--------------------------------------------------------------------------
052   public SeqRepositoryDivision getSeqRepositoryDivision();
053
054
055   //--------------------------------------------------------------------------
056   public BioSequencePlusImpl setMolType(MolType inValue);
057
058   //--------------------------------------------------------------------------
059   public MolType getMolType();
060
061
062   //--------------------------------------------------------------------------
063   public BioSequencePlusImpl setSeqTopology(SeqTopology inValue);
064
065   //--------------------------------------------------------------------------
066   public SeqTopology getSeqTopology();
067
068
069   //--------------------------------------------------------------------------
070   public BioSequence addFeature(SeqFeature inValue);
071
072   //--------------------------------------------------------------------------
073   public List<SeqFeature> getFeatures();
074
075   //--------------------------------------------------------------------------
076   public List<SeqFeature> getFeatures(FeatureKey inFeatureKey);
077
078   //--------------------------------------------------------------------------
079   public void clearFeatures();
080
081
082   //--------------------------------------------------------------------------
083   public BioSequence addReference(SeqCitation inValue);
084
085   //--------------------------------------------------------------------------
086   public List<SeqCitation> getReferences();
087
088   //--------------------------------------------------------------------------
089   public void clearReferences();
090
091
092   //--------------------------------------------------------------------------
093   public BioSequence addDbXref(DbXref inValue);
094
095   //--------------------------------------------------------------------------
096   public List<DbXref> getDbXrefs();
097
098   //--------------------------------------------------------------------------
099   public void clearDbXrefs();
100
101
102   //--------------------------------------------------------------------------
103   public BioSequence addKeyword(String inValue);
104
105   //--------------------------------------------------------------------------
106   public BioSequence addKeywords(Collection<String> inValues);
107
108   //--------------------------------------------------------------------------
109   public BioSequence addKeywords(String[] inValues);
110
111   //--------------------------------------------------------------------------
112   public Set<String> getKeywords();
113
114   //--------------------------------------------------------------------------
115   public void clearKeywords();
116
117
118   //--------------------------------------------------------------------------
119   public BioSequencePlusImpl setRevisionDate(Date inValue);
120
121   //--------------------------------------------------------------------------
122   public Date getRevisionDate();
123
124
125   //--------------------------------------------------------------------------
126   public BioSequencePlusImpl setClone(Clone inValue);
127
128   //--------------------------------------------------------------------------
129   public Clone getClone();
130
131
132   //--------------------------------------------------------------------------
133   public BioSequencePlusImpl setNCBITaxon(NCBITaxon inValue);
134
135   //--------------------------------------------------------------------------
136   public NCBITaxon getNCBITaxon();
137
138
139   //--------------------------------------------------------------------------
140   public default boolean hadParseExceptions()
141   {
142      return CollectionUtil.hasValues(getParseExceptions());
143   }
144
145   //--------------------------------------------------------------------------
146   public void addParseException(Throwable inException);
147
148   //--------------------------------------------------------------------------
149   public List<Throwable> getParseExceptions();
150
151   //--------------------------------------------------------------------------
152   public void clearParseExceptions();
153
154}