affyfusion-109/src/affymetrix/fusion/chp/FusionCHPData.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.fusion.chp;
11 13 Sep 07 nicklas 22
11 13 Sep 07 nicklas 23 import affymetrix.calvin.utils.*;
11 13 Sep 07 nicklas 24 import java.util.*;
11 13 Sep 07 nicklas 25
11 13 Sep 07 nicklas 26 /** A base class for all CHP data objects. */
11 13 Sep 07 nicklas 27 public abstract class FusionCHPData {
11 13 Sep 07 nicklas 28
11 13 Sep 07 nicklas 29     /** Sets the file name.
11 13 Sep 07 nicklas 30      * @param str The file name.
11 13 Sep 07 nicklas 31      */
11 13 Sep 07 nicklas 32     protected void setFileName(String str) { filename = str; }
11 13 Sep 07 nicklas 33
11 13 Sep 07 nicklas 34     /** Gets the file name.
11 13 Sep 07 nicklas 35      * @return The file name.
11 13 Sep 07 nicklas 36      */
11 13 Sep 07 nicklas 37     public String getFileName() { return filename; }
11 13 Sep 07 nicklas 38
11 13 Sep 07 nicklas 39     /** The CHP file name. */
11 13 Sep 07 nicklas 40     protected String filename;
11 13 Sep 07 nicklas 41
11 13 Sep 07 nicklas 42     /** Reads the contents of the file.
11 13 Sep 07 nicklas 43      * @return True if successfully read.
11 13 Sep 07 nicklas 44      */
11 13 Sep 07 nicklas 45     protected abstract boolean read();
11 13 Sep 07 nicklas 46
11 13 Sep 07 nicklas 47     /** Reads the header.
11 13 Sep 07 nicklas 48      * @return True if successfully read.
11 13 Sep 07 nicklas 49      */
11 13 Sep 07 nicklas 50     protected abstract boolean readHeader();
11 13 Sep 07 nicklas 51
11 13 Sep 07 nicklas 52     /** Get the id of the file (only valid for Command Console "calvin" files)
11 13 Sep 07 nicklas 53      * @return The unique file id.
11 13 Sep 07 nicklas 54      */
11 13 Sep 07 nicklas 55     public abstract AffymetrixGuidType getFileId();
11 13 Sep 07 nicklas 56
11 13 Sep 07 nicklas 57     /** The file type identifiers associated with the CHP files the reader can parse. */
11 13 Sep 07 nicklas 58     protected Vector /*AffymetrixGuidType*/ fileTypeIdentifiers;
11 13 Sep 07 nicklas 59
11 13 Sep 07 nicklas 60     /** The actual file type identifier in the file. */
11 13 Sep 07 nicklas 61     protected AffymetrixGuidType fileTypeIdentifier;
11 13 Sep 07 nicklas 62
11 13 Sep 07 nicklas 63     /** Gets the file type identifiers associated with the CHP files the reader can parse.
11 13 Sep 07 nicklas 64      * @return The ids
11 13 Sep 07 nicklas 65      */
11 13 Sep 07 nicklas 66     public Vector /*AffymetrixGuidType*/ getFileTypeIdentifiers() { return fileTypeIdentifiers; }
11 13 Sep 07 nicklas 67
11 13 Sep 07 nicklas 68     /** Sets the file type identifiers associated with the CHP files the reader can parse.
11 13 Sep 07 nicklas 69      * @param ids The ids
11 13 Sep 07 nicklas 70      */
11 13 Sep 07 nicklas 71     public void setFileTypeIdentifiers(Vector /*AffymetrixGuidType*/ ids) { fileTypeIdentifiers=ids; }
11 13 Sep 07 nicklas 72
11 13 Sep 07 nicklas 73     /** Gets the file type identifier in the file (blank for GCOS files).
11 13 Sep 07 nicklas 74      * @return The id of the file.
11 13 Sep 07 nicklas 75      */
11 13 Sep 07 nicklas 76     public AffymetrixGuidType getFileTypeIdentifier() { return fileTypeIdentifier; }
11 13 Sep 07 nicklas 77
11 13 Sep 07 nicklas 78     /** Sets the file type identifier in the file (blank for GCOS files).
11 13 Sep 07 nicklas 79      * @param id The id of the file.
11 13 Sep 07 nicklas 80      */
11 13 Sep 07 nicklas 81     public void setFileTypeIdentifier(AffymetrixGuidType id) { fileTypeIdentifier=id; }
11 13 Sep 07 nicklas 82 }