11 |
13 Sep 07 |
nicklas |
1 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
2 |
// |
11 |
13 Sep 07 |
nicklas |
// Copyright (C) 2005 Affymetrix, Inc. |
11 |
13 Sep 07 |
nicklas |
4 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is free software; you can redistribute it and/or modify |
11 |
13 Sep 07 |
nicklas |
// it under the terms of the GNU Lesser General Public License as published |
11 |
13 Sep 07 |
nicklas |
// by the Free Software Foundation; either version 2.1 of the License, |
11 |
13 Sep 07 |
nicklas |
// or (at your option) any later version. |
11 |
13 Sep 07 |
nicklas |
9 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is distributed in the hope that it will be useful, but |
11 |
13 Sep 07 |
nicklas |
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 |
13 Sep 07 |
nicklas |
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// for more details. |
11 |
13 Sep 07 |
nicklas |
14 |
// |
11 |
13 Sep 07 |
nicklas |
// You should have received a copy of the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// along with this library; if not, write to the Free Software Foundation, Inc., |
11 |
13 Sep 07 |
nicklas |
// 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 |
/** 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 |
/** Sets the file name. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Gets the file name. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** The CHP file name. */ |
11 |
13 Sep 07 |
nicklas |
40 |
protected String filename; |
11 |
13 Sep 07 |
nicklas |
41 |
|
11 |
13 Sep 07 |
nicklas |
/** Reads the contents of the file. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Reads the header. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Get the id of the file (only valid for Command Console "calvin" files) |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** 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 |
/** 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 |
/** Gets the file type identifiers associated with the CHP files the reader can parse. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Sets the file type identifiers associated with the CHP files the reader can parse. |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Gets the file type identifier in the file (blank for GCOS files). |
11 |
13 Sep 07 |
nicklas |
* @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 |
/** Sets the file type identifier in the file (blank for GCOS files). |
11 |
13 Sep 07 |
nicklas |
* @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 |
} |