001package com.hfg.bio.proteinproperty;
002
003
004import com.hfg.setting.ComplexSetting;
005import com.hfg.setting.Settings;
006
007//------------------------------------------------------------------------------
008/**
009 * Settings for performing physical property calculations on proteins.
010 * <div>
011 * @author J. Alex Taylor, hairyfatguy.com
012 * </div>
013 */
014//------------------------------------------------------------------------------
015// com.hfg XML/HTML Coding 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 SimpleProteinPropertyCalcSettings extends Settings implements Cloneable
036{
037    public static final String PROTEIN_ANALYSIS_MODE     = "protein_analysis_mode";
038
039    private static ProteinAnalysisMode sDefaultProteinAnalysisMode = ProteinAnalysisMode.NATIVE;
040
041    //###########################################################################
042    // CONSTRUCTORS
043    //###########################################################################
044
045    //---------------------------------------------------------------------------
046    public SimpleProteinPropertyCalcSettings()
047    {
048        super();
049    }
050
051    //---------------------------------------------------------------------------
052    protected void init()
053    {
054        add(new ComplexSetting(PROTEIN_ANALYSIS_MODE, sDefaultProteinAnalysisMode));
055    }
056
057    //###########################################################################
058    // PUBLIC METHODS
059    //###########################################################################
060
061
062    //---------------------------------------------------------------------------
063    @Override
064    public SimpleProteinPropertyCalcSettings clone()
065    {
066        SimpleProteinPropertyCalcSettings cloneObj = (SimpleProteinPropertyCalcSettings) super.clone();
067
068        return cloneObj;
069    }
070
071    //--------------------------------------------------------------------------
072    @SuppressWarnings("unchecked")
073    public SimpleProteinPropertyCalcSettings setProteinAnalysisMode(ProteinAnalysisMode inValue)
074    {
075        get(PROTEIN_ANALYSIS_MODE).setValue(inValue);
076        return this;
077    }
078
079    //--------------------------------------------------------------------------
080    public ProteinAnalysisMode getProteinAnalysisMode()
081    {
082        return (ProteinAnalysisMode) get(PROTEIN_ANALYSIS_MODE).getValue();
083    }
084}