|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BasicItem<PlatformData>
net.sf.basedb.core.Platform
public class Platform
This class is used to represent an experimental platform in BASE.
An experimental platform is used to define the types of files
that are used as data files. For example, the AFFYMETRIX
platform defines CDF and
CEL files.
A platform may have variants. A PlatformVariant has independent
settings but may inherit file types from the main platform.
Some platforms are file-only platforms, and has data that can't be imported
into the database, for example the Affymetrix platform. Platforms that
are not file-only can also import data into the database. Such platforms
may be locked to a single RawDataType or they may be GENERIC.
| Field Summary | |
|---|---|
static String |
AFFYMETRIX
The external id for the Affymetrix platform. |
static String |
GENERIC
The external id for the Generic platform. |
static int |
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external ID that can be stored in the database. |
static String |
SEQUENCING
The external id for the generic Sequencing platform. |
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface net.sf.basedb.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Constructor Summary | |
|---|---|
Platform(PlatformData data)
Creates a new filetype item from the given data. |
|
| Method Summary | |
|---|---|
static Platform |
getByExternalId(DbControl dc,
String externalId)
Get a Platform item when you know the external ID. |
static Platform |
getById(DbControl dc,
int id)
Get a Platform object when you know the ID. |
String |
getDescription()
Get the description for the item. |
String |
getExternalId()
Get the external id for the platform. |
PlatformFileType |
getFileType(DataFileType type,
PlatformVariant variant,
boolean create)
Get information about a file type that has been registered with this platform/variant. |
ItemQuery<PlatformFileType> |
getFileTypes(PlatformVariant variant,
boolean restrict)
Get the file types registered with this platform. |
String |
getName()
Get the name of the item. |
static Platform |
getNew(DbControl dc,
String externalId,
int channels)
Create a new file-only platform. |
static Platform |
getNew(DbControl dc,
String externalId,
RawDataType rawDataType)
Create a new platform which may optionally import data into the database. |
static ItemQuery<Platform> |
getQuery()
Get a query configured to retrieve Platform items. |
RawDataType |
getRawDataType()
Get the raw data type this platform is locked to. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: ArrayDesign:s and RawBioAssay:s using
this platform
|
ItemQuery<PlatformVariant> |
getVariants()
Get a query that returns variants of this platform. |
protected void |
initPermissions(int granted,
int denied)
Deny deletion of the GENERIC and Affymetrix platform. |
boolean |
isFileOnly()
Check if the platform is a file-only platform or if it allows data to be imported into the database. |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isUsed()
Check if: any raw bioassays or array design are using this platform |
PlatformVariant |
newVariant(String systemId)
Create a new PlatformVariant of this platform. |
(package private) void |
onAfterCommit(Transactional.Action action)
Register file-only platforms as raw data type after insert and unregister after delete. |
void |
removeFileType(DataFileType type,
PlatformVariant variant)
Remove a file type from this platform/variant. |
private void |
setChannels(int channels)
Set the number of channels for a file-only platform. |
void |
setDescription(String description)
Set the description for the item. |
private void |
setExternalId(String externalId)
|
void |
setName(String name)
Set the name of the item. |
private void |
setRawDataType(RawDataType rawDataType)
Set the raw data type. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.basedb.core.Identifiable |
|---|
getId, getVersion |
| Methods inherited from interface net.sf.basedb.core.AccessControlled |
|---|
checkPermission, getPermissions, hasPermission |
| Field Detail |
|---|
public static final Item TYPE
Item.PLATFORM,
getType()public static final String GENERIC
Generic platform. It allows
importing raw data into the database for all raw data
type.
getByExternalId(DbControl, String),
Constant Field Valuespublic static final String AFFYMETRIX
Affymetrix platform. It
is a file-only platform.
getByExternalId(DbControl, String),
Constant Field Valuespublic static final String SEQUENCING
Sequencing platform.
We don't defined any specific details at this level, but use
variants for this.
PlatformVariant.SEQUENCING_EXPRESSION,
Constant Field Valuespublic static final int MAX_EXTERNAL_ID_LENGTH
setExternalId(String),
Constant Field Values| Constructor Detail |
|---|
Platform(PlatformData data)
data - the data.| Method Detail |
|---|
public static Platform getNew(DbControl dc,
String externalId,
int channels)
dc - The DbControl to use for database accessexternalId - The external ID of the platform, must be
unique for all platformschannels - Number of channels in this platform
public static Platform getNew(DbControl dc,
String externalId,
RawDataType rawDataType)
dc - The DbControl to use for database accessexternalId - The external ID of the platform, must be
unique for all platformsrawDataType - A specific raw data type this platform will be locked
to or null if it is not locked to any specific raw data type
public static Platform getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
Platform object when you know the ID.
dc - The DbControl which will be used for
permission checking and database access.id - The ID of the item to load
Platform item
ItemNotFoundException - If an item with the specified ID is not found
PermissionDeniedException - If the logged in user doesn't have
Permission.READ permission to the items
BaseException - If there is another error
public static Platform getByExternalId(DbControl dc,
String externalId)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
Platform item when you know the external ID.
dc - The DbControl which will be used for
permission checking and database access.externalId - The external ID of the item to load
Platform item.
ItemNotFoundException - If an item with the specified ID is not found
PermissionDeniedException - If the logged in user doesn't have
read permission for the item
BaseException - If there is another error
public static ItemQuery<Platform> getQuery()
throws BaseException
Platform items.
ItemQuery object
BaseException - If the query could not be created.public Item getType()
IdentifiableItem enumeration.
getType in interface Identifiablepublic String getName()
Nameable
getName in interface NameableString with the name of the item
public void setName(String name)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_NAME_LENGTH constant.
setName in interface Nameablename - The new name for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH constantpublic String getDescription()
Nameable
getDescription in interface NameableString with a description of the item
public void setDescription(String description)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_DESCRIPTION_LENGTH constant.
setDescription in interface Nameabledescription - The new description for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH constantpublic boolean isRemoved()
Removable
isRemoved in interface Removable
public void setRemoved(boolean removed)
throws PermissionDeniedException
Removable
setRemoved in interface Removableremoved - TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException - If the logged in user doesn't
have Permission.DELETE permission for setting the flag
to TRUE or Permission.WRITE permission for setting the
flag to FALSE
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<PlatformData>BaseException - If not able to tell if item is used or not.BasicItem.getUsingItems()public Set<ItemProxy> getUsingItems()
ArrayDesign:s and RawBioAssay:s using
this platform
getUsingItems in class BasicItem<PlatformData>BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
protected void initPermissions(int granted,
int denied)
initPermissions in class BasicItem<PlatformData>granted - Permissions that have been granted by the subclassdenied - Permissions that have been denied by the subclassvoid onAfterCommit(Transactional.Action action)
onAfterCommit in class BasicItem<PlatformData>Transactional,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classespublic String getExternalId()
private void setExternalId(String externalId)
throws PermissionDeniedException,
InvalidDataException,
BaseException
PermissionDeniedException
InvalidDataException
BaseExceptionprivate void setChannels(int channels)
private void setRawDataType(RawDataType rawDataType)
rawDataType - The raw data type, null is allowedpublic boolean isFileOnly()
public RawDataType getRawDataType()
RawDataType is returned for each call to this
method.
public ItemQuery<PlatformVariant> getVariants()
public PlatformVariant newVariant(String systemId)
PlatformVariant of this platform.
systemId - The systemId of the new variant (must be unique)
PlatformVariant objectPlatformVariant.getNew(DbControl, Platform, String)
public ItemQuery<PlatformFileType> getFileTypes(PlatformVariant variant,
boolean restrict)
PlatformFileType.getQuery(Platform, PlatformVariant, boolean)
public void removeFileType(DataFileType type,
PlatformVariant variant)
type - The file type to removevariant - An optional variant
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidUseOfNullException - If type is null
public PlatformFileType getFileType(DataFileType type,
PlatformVariant variant,
boolean create)
type - The file type to get information forvariant - An optional variantcreate - If TRUE, the file type will be added to the platform if it doesn't already exists
PlatformFileType object
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||