001 /** 002 * Do we want to use this space for anything? Eg, revision history? 003 */ 004 package edu.nrao.sss.model.proposal; 005 006 import edu.nrao.sss.util.EnumerationUtility; 007 008 /** <i>Placeholder for time when we integrate proposal work.</i> 009 * TODO Add comments 010 * TODO Write JUnit class 011 * 012 * @version 1.1 013 * @since 2006-03-09 014 */ 015 public enum ObservingType 016 { 017 /** 018 * 019 */ 020 CONTINUUM(), 021 022 /** 023 * 024 */ 025 PULSAR(), 026 027 /** 028 * 029 */ 030 POLARIMETRY(), 031 032 /** 033 * 034 */ 035 ON_THE_FLY() 036 { 037 public String toString() { return "On-the-Fly Imaging"; } 038 }, 039 040 /** 041 * 042 */ 043 SPECTROSCOPY(), 044 045 /** 046 * 047 */ 048 PLANETARY_RADAR(), 049 050 /** 051 * 052 */ 053 SINGLE_POINTING() 054 { 055 public String toString() { return "Single Pointing(s)"; } 056 }, 057 058 /** 059 * 060 */ 061 MONITORING(), 062 063 /** 064 * 065 */ 066 SOLAR(), 067 068 /** 069 * 070 */ 071 HIGH_TIME_RESOLUTION(), 072 073 /** 074 * 075 */ 076 GRID_MAPPING() 077 { 078 public String toString() { return "Grid Mapping/Mosaicing"; } 079 }, 080 081 /** 082 * 083 */ 084 TRIGGERED_TRANSIENT(), 085 086 /** 087 * 088 */ 089 OTHER(); 090 091 private ObservingType() 092 { 093 } 094 095 /** 096 * Returns a default observing type. 097 * @return a default observing type. 098 */ 099 public static ObservingType getDefault() 100 { 101 return OTHER; 102 } 103 104 /** 105 * Returns a text representation of this enumeration constant. 106 * @return a text representation of this enumeration constant. 107 */ 108 public String toString() 109 { 110 return EnumerationUtility.getSharedInstance().enumToString(this); 111 } 112 113 /** 114 * Returns the observing type represented by {@code text}. 115 * <p> 116 * For details about the transformation, see 117 * {@link EnumerationUtility#enumFromString(Class, String)}.</p> 118 * 119 * @param text a text representation of an observing type. 120 * 121 * @return the observing type represented by {@code text}. 122 */ 123 public static ObservingType fromString(String text) 124 { 125 return EnumerationUtility.getSharedInstance() 126 .enumFromString(ObservingType.class, text); 127 } 128 }