001package com.hfg.citation.ncbi;
002
003import java.util.Collection;
004import java.util.HashMap;
005import java.util.Map;
006
007//------------------------------------------------------------------------------
008/**
009 Enumeration of MEDLINE citation status values.
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
035
036public class MedlineCitationStatus
037{
038   private static Map<String, MedlineCitationStatus> sInstanceMap = new HashMap<>(7);
039
040   private String mName;
041
042   public static final MedlineCitationStatus COMPLETED          = new MedlineCitationStatus("Completed");
043   public static final MedlineCitationStatus IN_PROCESS         = new MedlineCitationStatus("In-Process");
044   public static final MedlineCitationStatus PUBMED_NOT_MEDLINE = new MedlineCitationStatus("PubMed-not-MEDLINE");
045   public static final MedlineCitationStatus IN_DATA_REVIEW     = new MedlineCitationStatus("In-Data-Review");
046   public static final MedlineCitationStatus PUBLISHER          = new MedlineCitationStatus("Publisher");
047   public static final MedlineCitationStatus MEDLINE            = new MedlineCitationStatus("MEDLINE");
048   public static final MedlineCitationStatus OLDMEDLINE         = new MedlineCitationStatus("OLDMEDLINE");
049
050
051
052   //###########################################################################
053   // CONSTRUCTORS
054   //###########################################################################
055
056   //---------------------------------------------------------------------------
057   private MedlineCitationStatus(String inName)
058   {
059      mName = inName;
060      sInstanceMap.put(inName.toUpperCase(), this);
061   }
062
063   //###########################################################################
064   // PUBLIC METHODS
065   //###########################################################################
066
067   //---------------------------------------------------------------------------
068   public String name()
069   {
070      return mName;
071   }
072
073   //---------------------------------------------------------------------------
074   @Override
075   public String toString()
076   {
077      return name();
078   }
079
080   //---------------------------------------------------------------------------
081   public static MedlineCitationStatus valueOf(String inString)
082   {
083      return sInstanceMap.get(inString.toUpperCase());
084   }
085
086   //---------------------------------------------------------------------------
087   public static Collection<MedlineCitationStatus> values()
088   {
089      return sInstanceMap.values();
090   }
091}