001package com.hfg.bio.seq.format.feature.uniprot;
002
003import com.hfg.bio.seq.format.feature.FeatureQualifierImpl;
004import com.hfg.util.StringUtil;
005
006//------------------------------------------------------------------------------
007/**
008 UniProt feature table qualifier for flat-file records.
009 <div>
010 @author J. Alex Taylor, hairyfatguy.com
011 </div>
012 */
013//------------------------------------------------------------------------------
014// com.hfg Library
015//
016// This library is free software; you can redistribute it and/or
017// modify it under the terms of the GNU Lesser General Public
018// License as published by the Free Software Foundation; either
019// version 2.1 of the License, or (at your option) any later version.
020//
021// This library is distributed in the hope that it will be useful,
022// but WITHOUT ANY WARRANTY; without even the implied warranty of
023// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
024// Lesser General Public License for more details.
025//
026// You should have received a copy of the GNU Lesser General Public
027// License along with this library; if not, write to the Free Software
028// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
029//
030// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
031// jataylor@hairyfatguy.com
032//------------------------------------------------------------------------------
033
034public class UniProtFeatureQualifier extends FeatureQualifierImpl
035{
036   //###########################################################################
037   // CONSTRUCTORS
038   //###########################################################################
039
040   //---------------------------------------------------------------------------
041   public UniProtFeatureQualifier(UniProtFeatureQualifierName inName)
042   {
043      super(inName.name());
044   }
045
046   //---------------------------------------------------------------------------
047   public UniProtFeatureQualifier(UniProtFeatureQualifierName inName, String inValue)
048   {
049      this(inName);
050      setValue(inValue);
051   }
052
053   //###########################################################################
054   // PUBLIC METHODS
055   //###########################################################################
056
057   //---------------------------------------------------------------------------
058   @Override
059   public String toString()
060   {
061      return "/" + name() + (StringUtil.isSet(getValue()) ? "=" + getValue() : "");
062   }
063}