affyfusion-109/src/affymetrix/calvin/array/CreateStep.java

Code
Comments
Other
Rev Date Author Line
11 13 Sep 07 nicklas 1 /////////////////////////////////////////////////////////////////
11 13 Sep 07 nicklas 2 //
11 13 Sep 07 nicklas 3 // Copyright (C) 2005 Affymetrix, Inc.
11 13 Sep 07 nicklas 4 //
11 13 Sep 07 nicklas 5 // This library is free software; you can redistribute it and/or modify
11 13 Sep 07 nicklas 6 // it under the terms of the GNU Lesser General Public License as published
11 13 Sep 07 nicklas 7 // by the Free Software Foundation; either version 2.1 of the License,
11 13 Sep 07 nicklas 8 // or (at your option) any later version.
11 13 Sep 07 nicklas 9 //
11 13 Sep 07 nicklas 10 // This library is distributed in the hope that it will be useful, but
11 13 Sep 07 nicklas 11 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 13 Sep 07 nicklas 12 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 13 Sep 07 nicklas 13 // for more details.
11 13 Sep 07 nicklas 14 //
11 13 Sep 07 nicklas 15 // You should have received a copy of the GNU Lesser General Public License
11 13 Sep 07 nicklas 16 // along with this library; if not, write to the Free Software Foundation, Inc.,
11 13 Sep 07 nicklas 17 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
11 13 Sep 07 nicklas 18 //
11 13 Sep 07 nicklas 19 /////////////////////////////////////////////////////////////////
11 13 Sep 07 nicklas 20
11 13 Sep 07 nicklas 21 package affymetrix.calvin.array;
11 13 Sep 07 nicklas 22
11 13 Sep 07 nicklas 23 /** Defines the steps that can create array data. */
11 13 Sep 07 nicklas 24 public class CreateStep {
11 13 Sep 07 nicklas 25     
11 13 Sep 07 nicklas 26     /** No step. */
11 13 Sep 07 nicklas 27     public static final int NoStep = 0;
11 13 Sep 07 nicklas 28     
11 13 Sep 07 nicklas 29     /** Array registration. */
11 13 Sep 07 nicklas 30     public static final int ArrayRegistrationStep = 1;
11 13 Sep 07 nicklas 31         
11 13 Sep 07 nicklas 32     /** Scanning. */
11 13 Sep 07 nicklas 33     public static final int ScanningStep = 2;
11 13 Sep 07 nicklas 34     
11 13 Sep 07 nicklas 35     /** Grid analysis. */
11 13 Sep 07 nicklas 36     public static final int GriddingStep = 3;
11 13 Sep 07 nicklas 37     
11 13 Sep 07 nicklas 38     /** CEL file analysis. */
11 13 Sep 07 nicklas 39     public static final int CELAnalysisStep = 4;
11 13 Sep 07 nicklas 40     
11 13 Sep 07 nicklas 41     /** From. */
11 13 Sep 07 nicklas 42     public static final int FromStep=5;
11 13 Sep 07 nicklas 43     
11 13 Sep 07 nicklas 44     /** Job order. */
11 13 Sep 07 nicklas 45     public static final int JobOrderServerStep=6;
11 13 Sep 07 nicklas 46     
11 13 Sep 07 nicklas 47     /** File indexer. */
11 13 Sep 07 nicklas 48     public static final int FileIndexerStep=7;
11 13 Sep 07 nicklas 49             
11 13 Sep 07 nicklas 50     /** Any other step. */
11 13 Sep 07 nicklas 51     public static final int OtherStep = 8;
11 13 Sep 07 nicklas 52
11 13 Sep 07 nicklas 53     /** The none step. */
11 13 Sep 07 nicklas 54     private static final String CREATED_STEP_NONE = "None";
11 13 Sep 07 nicklas 55
11 13 Sep 07 nicklas 56     /** The array registration step. */
11 13 Sep 07 nicklas 57     private static final String CREATED_STEP_ARRAY_REG = "ArrayRegistration";
11 13 Sep 07 nicklas 58
11 13 Sep 07 nicklas 59     /** The scan step. */
11 13 Sep 07 nicklas 60     private static final String CREATED_STEP_SCAN = "Scanning";
11 13 Sep 07 nicklas 61
11 13 Sep 07 nicklas 62     /** The grid alignment step. */
11 13 Sep 07 nicklas 63     private static final String CREATED_STEP_GRID = "Gridding";
11 13 Sep 07 nicklas 64
11 13 Sep 07 nicklas 65     /** The cel analysis step. */
11 13 Sep 07 nicklas 66     private static final String CREATED_STEP_CEL = "CELAnalysis";
11 13 Sep 07 nicklas 67
11 13 Sep 07 nicklas 68     /** Other undefined step. */
11 13 Sep 07 nicklas 69     private static final String CREATED_STEP_OTHER = "Other";
11 13 Sep 07 nicklas 70
11 13 Sep 07 nicklas 71     /** From step. */
11 13 Sep 07 nicklas 72     private static final String CREATED_STEP_FROM = "From";
11 13 Sep 07 nicklas 73
11 13 Sep 07 nicklas 74     /** Job order step. */
11 13 Sep 07 nicklas 75     private static final String CREATED_STEP_JOB_ORDER = "JobOrderServer";
11 13 Sep 07 nicklas 76
11 13 Sep 07 nicklas 77     /** File indexer step. */
11 13 Sep 07 nicklas 78     private static final String CREATED_STEP_FILE_INDEXER = "FileIndexer";
11 13 Sep 07 nicklas 79
11 13 Sep 07 nicklas 80     /** Defines the steps that can create array data. */
11 13 Sep 07 nicklas 81     private int step;
11 13 Sep 07 nicklas 82     
11 13 Sep 07 nicklas 83     /** Gets the step that created the array data. */
11 13 Sep 07 nicklas 84     public int getStep() { return step; }
11 13 Sep 07 nicklas 85     
11 13 Sep 07 nicklas 86     /** Sets the step that created the array data. */
11 13 Sep 07 nicklas 87     public void setStep(int s) { step=s; }
11 13 Sep 07 nicklas 88     
11 13 Sep 07 nicklas 89     /** Converts the step type to a string.
11 13 Sep 07 nicklas 90      * @return The string representation.
11 13 Sep 07 nicklas 91      */
11 13 Sep 07 nicklas 92     public String toString() {
11 13 Sep 07 nicklas 93   switch (step)
11 13 Sep 07 nicklas 94   {
11 13 Sep 07 nicklas 95   case NoStep:
11 13 Sep 07 nicklas 96             return CREATED_STEP_NONE;
11 13 Sep 07 nicklas 97
11 13 Sep 07 nicklas 98   case ArrayRegistrationStep:
11 13 Sep 07 nicklas 99             return CREATED_STEP_ARRAY_REG;
11 13 Sep 07 nicklas 100   
11 13 Sep 07 nicklas 101   case ScanningStep:
11 13 Sep 07 nicklas 102             return CREATED_STEP_SCAN;
11 13 Sep 07 nicklas 103
11 13 Sep 07 nicklas 104   case GriddingStep:
11 13 Sep 07 nicklas 105             return CREATED_STEP_GRID;
11 13 Sep 07 nicklas 106
11 13 Sep 07 nicklas 107   case CELAnalysisStep:
11 13 Sep 07 nicklas 108             return CREATED_STEP_CEL;
11 13 Sep 07 nicklas 109
11 13 Sep 07 nicklas 110   case FromStep:
11 13 Sep 07 nicklas 111             return CREATED_STEP_FROM;
11 13 Sep 07 nicklas 112     
11 13 Sep 07 nicklas 113   case JobOrderServerStep:
11 13 Sep 07 nicklas 114             return CREATED_STEP_JOB_ORDER;
11 13 Sep 07 nicklas 115   
11 13 Sep 07 nicklas 116   case FileIndexerStep:
11 13 Sep 07 nicklas 117             return CREATED_STEP_FILE_INDEXER;
11 13 Sep 07 nicklas 118
11 13 Sep 07 nicklas 119   case OtherStep:
11 13 Sep 07 nicklas 120             return CREATED_STEP_OTHER;
11 13 Sep 07 nicklas 121   }
11 13 Sep 07 nicklas 122         return null;
11 13 Sep 07 nicklas 123     }
11 13 Sep 07 nicklas 124
11 13 Sep 07 nicklas 125     /** Converts a string to step type.
11 13 Sep 07 nicklas 126      * @param s The string representation.
11 13 Sep 07 nicklas 127      */
11 13 Sep 07 nicklas 128     public CreateStep(String s) {
11 13 Sep 07 nicklas 129         if (s.compareTo(CREATED_STEP_NONE) == 0)
11 13 Sep 07 nicklas 130             step = NoStep;
11 13 Sep 07 nicklas 131
11 13 Sep 07 nicklas 132         else if (s.compareTo(CREATED_STEP_ARRAY_REG) == 0)
11 13 Sep 07 nicklas 133             step = ArrayRegistrationStep;
11 13 Sep 07 nicklas 134
11 13 Sep 07 nicklas 135         else if (s.compareTo(CREATED_STEP_SCAN) == 0)
11 13 Sep 07 nicklas 136             step = ScanningStep;
11 13 Sep 07 nicklas 137
11 13 Sep 07 nicklas 138         else if (s.compareTo(CREATED_STEP_GRID) == 0)
11 13 Sep 07 nicklas 139             step = GriddingStep;
11 13 Sep 07 nicklas 140
11 13 Sep 07 nicklas 141         else if (s.compareTo(CREATED_STEP_CEL) == 0)
11 13 Sep 07 nicklas 142             step = CELAnalysisStep;
11 13 Sep 07 nicklas 143
11 13 Sep 07 nicklas 144   else if (s.compareTo(CREATED_STEP_FROM) == 0)
11 13 Sep 07 nicklas 145             step = FromStep;
11 13 Sep 07 nicklas 146     
11 13 Sep 07 nicklas 147   else if (s.compareTo(CREATED_STEP_JOB_ORDER) == 0)
11 13 Sep 07 nicklas 148             step = JobOrderServerStep;
11 13 Sep 07 nicklas 149
11 13 Sep 07 nicklas 150   else if (s.compareTo(CREATED_STEP_FILE_INDEXER) == 0)
11 13 Sep 07 nicklas 151             step = FileIndexerStep;
11 13 Sep 07 nicklas 152
11 13 Sep 07 nicklas 153         else if (s.compareTo(CREATED_STEP_OTHER) == 0)
11 13 Sep 07 nicklas 154             step = OtherStep;
11 13 Sep 07 nicklas 155
11 13 Sep 07 nicklas 156         else
11 13 Sep 07 nicklas 157             step = OtherStep;
11 13 Sep 07 nicklas 158     }
11 13 Sep 07 nicklas 159
11 13 Sep 07 nicklas 160     /** Creates a new instance of CreateStep */
11 13 Sep 07 nicklas 161     public CreateStep() {
11 13 Sep 07 nicklas 162         step = NoStep;
11 13 Sep 07 nicklas 163     }
11 13 Sep 07 nicklas 164     
11 13 Sep 07 nicklas 165 }
11 13 Sep 07 nicklas 166