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