Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/biomage/Array/ManufactureLIMSBiomaterial.java


1   /***************************************************************************  
2    *                                                                         *
3    * C O P Y R I G H T   N O T I C E                                         * 
4    *  Copyright (c) 2001 by:                                                 *
5    *    * The MicroArray Gene Expression Database group (MGED)               *
6    *    * Rosetta Inpharmatics                                               *
7    *                                                                         *
8    *    All Rights Reserved.                                                 *
9    *                                                                         *
10   * Permission is hereby granted, free of charge, to any person             *
11   * obtaining a copy of this software and associated documentation files    *
12   * (the "Software"), to deal in the Software without restriction,          *
13   * including without limitation the rights to use, copy, modify, merge,    *
14   * publish, distribute, sublicense, and/or sell copies of the Software,    *
15   * and to permit persons to whom the Software is furnished to do so,       *
16   * subject to the following conditions:                                    *
17   *                                                                         *
18   * The above copyright notice and this permission notice shall be          *
19   * included in all copies or substantial portions of the Software.         *
20   *                                                                         *
21   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,         *
22   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF      * 
23   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                   *
24   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS     *
25   * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN      *
26   * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN       *
27   * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE        *
28   * SOFTWARE.                                                               *
29   ***************************************************************************
30   *                                                                         *
31   * Created by the create_mage_java_classes java program based on the       * 
32   * information in the xmi file created from the MAGE-OM UML model,         *
33   * copyright European Bioinformatics Institute (EBI) for MGED and Rosetta  *
34   * Informatics.                                                            *
35   *                                                                         *
36   * The ideas and work are built on the previous work in perl of Jason      *
37   * Stewart, Open Informatics, and Robert M. Hubley, Institute for Systems  *
38   * Biology                                                                 *
39   *                                                                         *
40   * @author  Michael Miller, Rosetta Inpharmatics                           *
41   * @version Revision: 1.0                                                  *
42   * @date    Thu, Feb 21, 2002 10:46:07 AM                                  *
43   *                                                                         *
44   ***************************************************************************
45   */
46  
47  /**
48   *  org.biomage.Array
49   *  
50   */
51  package org.biomage.Array;
52  
53  /**
54   *  Import list for ManufactureLIMSBiomaterial
55   *  
56   */
57  import java.io.Serializable;
58  import java.util.*;
59  import org.xml.sax.Attributes;
60  import java.io.Writer;
61  import java.io.IOException;
62  
63  /**
64   *  Stores the location from which a biomaterial was obtained.
65   *  
66   */
67  public
68  class ManufactureLIMSBiomaterial
69      extends ManufactureLIMS
70      implements Serializable
71  {
72      /**
73       *  The plate from which a biomaterial was obtained.
74       *  
75       */
76       String bioMaterialPlateIdentifier;
77  
78      /**
79       *  The plate row from which a biomaterial was obtained.  Specified 
80       *  by a letter.
81       *  
82       */
83       String bioMaterialPlateRow;
84  
85      /**
86       *  The plate column from which a biomaterial was obtained.  
87       *  Specified by a number.
88       *  
89       */
90       String bioMaterialPlateCol;
91  
92      /**
93       *  Default constructor.
94       *  
95       */
96      public
97      ManufactureLIMSBiomaterial()
98      {
99          super();
100     }
101 
102     /**
103      *  Attribute constructor.
104      *  
105      *  Looks up the attributes in the parameter and casts them from strings 
106      *  appropriately
107      *  @param atts: the attribute list.
108      *  
109      */
110     // TODO Work in progress (attribute constructor).
111     public
112     ManufactureLIMSBiomaterial(Attributes atts)
113     {
114         super(atts);
115 
116         {
117             int nIndex = atts.getIndex("", "bioMaterialPlateIdentifier");
118             if (nIndex != -1)
119             {
120                 bioMaterialPlateIdentifier = atts.getValue(nIndex);
121             }
122         }
123 
124         {
125             int nIndex = atts.getIndex("", "bioMaterialPlateRow");
126             if (nIndex != -1)
127             {
128                 bioMaterialPlateRow = atts.getValue(nIndex);
129             }
130         }
131 
132         {
133             int nIndex = atts.getIndex("", "bioMaterialPlateCol");
134             if (nIndex != -1)
135             {
136                 bioMaterialPlateCol = atts.getValue(nIndex);
137             }
138         }
139 
140     }
141 
142     /**
143      *  writeMAGEML
144      *  <p>
145      *  This method is responsible for assembling the attribute and 
146      *  association data into XML. It creates the object tag and then calls 
147      *  the writeAttributes and writeAssociation methods.
148      *  <p>
149      *  
150      */
151     public
152     void
153     writeMAGEML(Writer out)
154     throws IOException
155     {
156         out.write("<ManufactureLIMSBiomaterial");
157         writeAttributes(out);
158         out.write(">");
159         writeAssociations(out);
160         out.write("</ManufactureLIMSBiomaterial>");
161     }
162 
163     /**
164      *  writeAttributes
165      *  <p>
166      *  This method is responsible for assembling the attribute data into 
167      *  XML. It calls the super method to write out all attributes of this 
168      *  class and it's ancestors.
169      *  <p>
170      *  
171      */
172     public
173     void
174     writeAttributes(Writer out)
175     throws IOException
176     {
177         super.writeAttributes(out);
178         if ( bioMaterialPlateIdentifier != null ) {
179             out.write(" bioMaterialPlateIdentifier=\"" + bioMaterialPlateIdentifier + "\"");
180         }
181         if ( bioMaterialPlateRow != null ) {
182             out.write(" bioMaterialPlateRow=\"" + bioMaterialPlateRow + "\"");
183         }
184         if ( bioMaterialPlateCol != null ) {
185             out.write(" bioMaterialPlateCol=\"" + bioMaterialPlateCol + "\"");
186         }
187     }
188 
189     /**
190      *  writeAssociations
191      *  <p>
192      *  This method is responsible for assembling the association data 
193      *  into XML. It calls the super method to write out all associations of 
194      *  this class's ancestors.
195      *  <p>
196      *  
197      */
198     public
199     void
200     writeAssociations(Writer out)
201     throws IOException
202     {
203         super.writeAssociations(out);
204     }
205 
206     /**
207      *  Set method for bioMaterialPlateIdentifier
208      *  <p>
209      *  @param value to set
210      *  <p>
211      *  
212      */
213     public
214     void
215     setBioMaterialPlateIdentifier(
216         String bioMaterialPlateIdentifier
217     )
218     {
219         this.bioMaterialPlateIdentifier = bioMaterialPlateIdentifier;
220     }
221 
222     /**
223      *  Get method for bioMaterialPlateIdentifier
224      *  <p>
225      *  @return value of the attribute
226      *  <p>
227      *  
228      */
229     public
230     String
231     getBioMaterialPlateIdentifier()
232     {
233         return bioMaterialPlateIdentifier;
234     }
235 
236     /**
237      *  Set method for bioMaterialPlateRow
238      *  <p>
239      *  @param value to set
240      *  <p>
241      *  
242      */
243     public
244     void
245     setBioMaterialPlateRow(
246         String bioMaterialPlateRow
247     )
248     {
249         this.bioMaterialPlateRow = bioMaterialPlateRow;
250     }
251 
252     /**
253      *  Get method for bioMaterialPlateRow
254      *  <p>
255      *  @return value of the attribute
256      *  <p>
257      *  
258      */
259     public
260     String
261     getBioMaterialPlateRow()
262     {
263         return bioMaterialPlateRow;
264     }
265 
266     /**
267      *  Set method for bioMaterialPlateCol
268      *  <p>
269      *  @param value to set
270      *  <p>
271      *  
272      */
273     public
274     void
275     setBioMaterialPlateCol(
276         String bioMaterialPlateCol
277     )
278     {
279         this.bioMaterialPlateCol = bioMaterialPlateCol;
280     }
281 
282     /**
283      *  Get method for bioMaterialPlateCol
284      *  <p>
285      *  @return value of the attribute
286      *  <p>
287      *  
288      */
289     public
290     String
291     getBioMaterialPlateCol()
292     {
293         return bioMaterialPlateCol;
294     }
295 
296 }