X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FUniprotSequence.java;h=c9b84fabe5476bb896c2cb6a7e0349e18fd5e597;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=c33914c5132ea1a4f1f8e10358e5169c18f28ad3;hpb=174230b4233d9ce80f94527768d2cd2f76da11ab;p=jalview.git diff --git a/src/jalview/datamodel/UniprotSequence.java b/src/jalview/datamodel/UniprotSequence.java index c33914c..c9b84fa 100755 --- a/src/jalview/datamodel/UniprotSequence.java +++ b/src/jalview/datamodel/UniprotSequence.java @@ -1,42 +1,58 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ -package jalview.datamodel; - -public class UniprotSequence -{ - /** - * internal content storage - */ - private java.lang.String _content = ""; - - public void setContent(String seq) - { - StringBuffer sb = new StringBuffer(); - for(int i=0; i. + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.datamodel; + +/** + * Data model for the sequence returned by a Uniprot query + * + * @see uniprot_mapping.xml + */ +public class UniprotSequence +{ + private String _content = ""; + + /** + * Sets the content string, omitting any space characters + * + * @param seq + */ + public void setContent(String seq) + { + if (seq != null) + { + StringBuilder sb = new StringBuilder(seq.length()); + for (int i = 0; i < seq.length(); i++) + { + if (seq.charAt(i) != ' ') + { + sb.append(seq.charAt(i)); + } + } + _content = sb.toString(); + } + } + + public String getContent() + { + return _content; + } + +}