Package net.sf.basedb.core
Class RawDataType
java.lang.Object
net.sf.basedb.core.RawDataType
- All Implemented Interfaces:
Comparable<RawDataType>
This class holds information about a raw data type. Unlike many other
classes this information is not stored in the database, but in the
raw-data-types.xml
XML file. This file is parsed upon
startup by the RawDataTypes
class.
Raw data types are important for RawBioAssay
:s.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2014-06-04 14:41:12 +0200 (on, 04 jun 2014) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final String
private final boolean
private List<IntensityFormula>
private final String
private String
private Map<String,
IntensityFormula> private Map<String,
RawDataProperty> private final PlatformData
private List<RawDataProperty>
private RealTable
private String
private final PlatformVariantData
-
Constructor Summary
ModifierConstructorDescriptionprivate
RawDataType
(String id, String name, String description, int channels, boolean fileOnly, PlatformData platform, PlatformVariantData variant, String table, List<RawDataProperty> properties, List<IntensityFormula> formulas) (package private)
RawDataType
(String id, String name, String description, int channels, String table, List<RawDataProperty> properties, List<IntensityFormula> formulas) Create a newRawDataType
.(package private)
RawDataType
(PlatformData platform) Create a new raw data type representing a file-only platform.(package private)
RawDataType
(PlatformVariantData variant) Create a new raw data type representing a file-only platform variant. -
Method Summary
Modifier and TypeMethodDescriptionint
Compare the id:s of the raw data types.boolean
int
The number of channels in this raw data type.Get a description of this raw data type.getId()
Get the id of this raw data type.getIntensityFormula
(String name) getName()
Get the name of this raw data type.getPlatform
(DbControl dc) Get the platform that this raw data type is associated with.Get a list ofRawDataProperty
:s with definitions for the extra properties that has been defined for this raw data type.getProperty
(String name) getRawDataById
(DbControl dc, int id) Get the name of the database table that is used to store the extra properties of this raw data type.getVariant
(DbControl dc) Get the platform variant that this raw data type is associated with.int
hashCode()
boolean
If the raw data of this raw data type can be stored in the database or not.(package private) void
Update the name.toString()
-
Field Details
-
id
-
name
-
description
-
fileOnly
private final boolean fileOnly -
channels
private final int channels -
platform
-
variant
-
table
-
realTable
-
properties
-
namedProperties
-
formulas
-
namedFormulas
-
-
Constructor Details
-
RawDataType
RawDataType(String id, String name, String description, int channels, String table, List<RawDataProperty> properties, List<IntensityFormula> formulas) Create a newRawDataType
. See the getter methods for a description of the parameters -
RawDataType
RawDataType(PlatformData platform) Create a new raw data type representing a file-only platform.- Parameters:
platform
- The platform
-
RawDataType
RawDataType(PlatformVariantData variant) Create a new raw data type representing a file-only platform variant.- Parameters:
variant
- The platform variant
-
RawDataType
private RawDataType(String id, String name, String description, int channels, boolean fileOnly, PlatformData platform, PlatformVariantData variant, String table, List<RawDataProperty> properties, List<IntensityFormula> formulas)
-
-
Method Details
-
getId
Get the id of this raw data type. This value is the same as theid
attribute of the<raw-data-type>
tag in the XML file.- Returns:
- The id for this raw data type
-
getPlatform
Get the platform that this raw data type is associated with. Only raw data types representing file-only platforms are associated with that platform. IfisStoredInDb()
returns true this method will always return null.- Parameters:
dc
- The DbControl to use for database access- Returns:
- A Platform item or null if this raw data type isn't associated with a platform
- Since:
- 2.5
-
getVariant
Get the platform variant that this raw data type is associated with. Only raw data types representing file-only variants are associated with that variant.- Parameters:
dc
- The DbControl to use for database access- Returns:
- A Platform item or null if this raw data type isn't associated with a variant
- Since:
- 2.5
-
getName
Get the name of this raw data type. This value is the same as thename
attribute of the<raw-data-type>
tag in the XML file. The name is not used by the core, but should be used by client applications in the user interface.- Returns:
- The name for this raw data type
-
setName
Update the name. Used mainly for file-only representations of raw data types when the underlying platform is changed.- Since:
- 2.16.2
-
getDescription
Get a description of this raw data type. This value is the same as thedescription
attribute of the<raw-data-type>
tag in the XML file. The description is not used by the core, but can be used by client applications in help texts, etc.- Returns:
- A description for this raw data type
-
getChannels
public int getChannels()The number of channels in this raw data type. Channels are important in the core when it comes to the analysis phase. Some analysis methods only works for a specific number of channels (mostly two). This value is the same as thechannels
attribute of the<raw-data-type>
tag in the XML file.- Returns:
- The number of channels
-
isStoredInDb
public boolean isStoredInDb()If the raw data of this raw data type can be stored in the database or not.- See Also:
-
getTableName
Get the name of the database table that is used to store the extra properties of this raw data type. This value is the same as thetable
attribute of the<raw-data-type>
tag in the XML file. The table name is normally not useful for any client application.- Returns:
- The name of the database table for this raw data type, or null if not stored in database
- See Also:
-
getEntityName
-
getRealTable
-
getProperties
Get a list ofRawDataProperty
:s with definitions for the extra properties that has been defined for this raw data type.- Returns:
- A
List
object containingRawDataProperty
objects
-
getProperty
-
getIntensityFormulas
-
getIntensityFormula
-
toString
-
getRawDataById
public RawData getRawDataById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException -
compareTo
Compare the id:s of the raw data types. Note! Before 2.16.2 the name was used for comparing but this led to issues when changing the name of file-only plaforms. See ticket #1567.- Specified by:
compareTo
in interfaceComparable<RawDataType>
- Since:
- 2.5
-
equals
-
hashCode
public int hashCode()
-