Last update: 2011-06-23

org.proteios.core
Enum Item

java.lang.Object
  extended by java.lang.Enum<Item>
      extended by org.proteios.core.Item
All Implemented Interfaces:
Serializable, Comparable<Item>

public enum Item
extends Enum<Item>

This class defines constants for various items in Proteios.

Version:
2.0
Author:
Samuel
Last modified
$Date: 2010-04-20 14:02:33 +0200 (Tue, 20 Apr 2010) $

Enum Constant Summary
ANNOTATION
          The item is an Annotation.
ANNOTATIONSET
          The item is an AnnotationSet.
ANNOTATIONTYPE
          The item is an AnnotationType.
BIOMATERIALEVENT
          The item is a BioMaterialEvent.
BIOSOURCE
          The item is a BioSource.
CLIENT
          The item is an Client.
DIRECTORY
          The item is a Directory.
DISKUSAGE
          The item is a DiskUsage.
EXTRACT
          The item is an Extract.
FILE
          The item is a File.
FILETYPE
          The item is a FileType.
GLOBALDEFAULTSETTING
          The item is an GlobalDefaultSetting.
GROUP
          The item is a Group.
HARDWARE
          The item is a Hardware.
HARDWARECONFIGURATION
          The item is a HardwareConfiguration
HARDWARETYPE
          The item is a HardwareType.
ITEMKEY
          The item is an ItemKey.
JOB
          The item is a Job
LABEL
          The item is a Label.
LABELEDEXTRACT
          The item is a LabeledExtract.
MESSAGE
          The item is a Message.
MIMETYPE
          The item is a MimeType.
NEWS
          The item is a News.
PLUGINCONFIGURATION
          The item is a PluginConfiguration
PLUGINDEFINITION
          The item is a PluginDefinition
PLUGINTYPE
          The item is a PluginType
PROJECT
          The item is a Project.
PROJECTKEY
          The item is a ProjectKey.
PROTEIOS_ACQUISITION
          The item is an Acquisition
PROTEIOS_BIOMATERIAL
          The item is a BioMaterial.
PROTEIOS_CREATIONEVENT
          The item is a CreationEvent
PROTEIOS_DATAPROCESSINGSTEP
          The item is a DataProcessingStep
PROTEIOS_DIGESTPARAMETER
          The item is an DigestParameter
PROTEIOS_FEATURE
          The item is a MascotParameterSetStorage
PROTEIOS_GELELECTROPHORESIS
          The item is a GelElectrophoresis
PROTEIOS_GELIMAGEANALYSISEVENT
          The item is a GelImageAnalysisEvent
PROTEIOS_GELSCANEVENT
          The item is a GelScanEvent
PROTEIOS_HIT
          The item is a Hit
PROTEIOS_IPG
          The item is an IPG
PROTEIOS_LIQUIDCHROMATOGRAPHY
          The item is a LiquidChromatography
PROTEIOS_MASCOTPARAMETERSETSTORAGE
          The item is a MascotParameterSetStorage
PROTEIOS_MEASUREDAREA
          The item is a MeasuredArea
PROTEIOS_OBSERVEDMODIFICATION
          The item is a ObservedModification
PROTEIOS_OFFSET
          Not an item as such.
PROTEIOS_OMSSAPARAMETERSETSTORAGE
          The item is an OMSSAParameterSetStorage
PROTEIOS_PEAK
          The item is a Peak
PROTEIOS_PEAKLIST
          The item is a PeakList
PROTEIOS_PEAKLISTSET
          The item is a PeakListSet
PROTEIOS_PEPTIDE
          The item is a Peptide
PROTEIOS_PRECURSOR
          The item is a Precursor
PROTEIOS_PROTEIN
          The item is a Protein
PROTEIOS_SEARCHDATABASE
          The item is an SearchDatabase
PROTEIOS_SEARCHMODIFICATION
          The item is a SearchModification
PROTEIOS_SEARCHRESULT
          The item is a SearchResult
PROTEIOS_SEPARATIONEVENT
          The item is a SeparationEvent
PROTEIOS_SEPARATIONMETHOD
          The item is a SeparationMethod
PROTEIOS_SPECTRUMSEARCH
          The item is an SpectrumSearch
PROTEIOS_STAININGEVENT
          The item is a StainingEvent
PROTEIOS_UPDATEEVENT
          The item is an UpdateEvent
PROTEIOS_XTANDEMPARAMETERSETSTORAGE
          The item is an XTandemParameterSetStorage
PROTOCOL
          The item is a Protocol.
PROTOCOLTYPE
          The item is a ProtocolType.
QUOTA
          The item is a Quota.
QUOTATYPE
          The item is a QuotaType.
ROLE
          The item is a Role.
ROLEKEY
          The item is a RoleKey.
SAMPLE
          The item is a Sample.
SESSION
          The item is an Session.
SETTING
          The item is an Setting.
SOFTWARE
          The item is a Software.
SOFTWARECONFIGURATION
          The item is a SoftwareConfiguration
SOFTWARETYPE
          The item is a SoftwareType.
SYSTEM
          Not an item as such.
USER
          The item is a User.
 
Method Summary
static Item fromClass(Class<?> anyClass)
          Get the Item object when you know either the item or data class.
static Item fromDataClass(Class<? extends BasicData> dataClass)
          Get the Item object when you know the data class.
static Item fromDataObject(BasicData data)
          Get the Item object when you have a data layer object.
static Item fromItemClass(Class<? extends BasicItem> itemClass)
          Get the Item object when you know the item class.
static Item fromValue(int value)
          Get the Item object when you know the integer code.
 String getAlias()
          Get the alias for this item, which is used in queries,
 BasicItem getById(DbControl dc, int id)
          Get the item of the type represented by this enumeration constant with the specified id.
 Class<? extends BasicData> getDataClass()
          Get the data object that is used to store information in the database for items of this type.
 Set<Permission> getDefinedPermissions()
          Get the permissions which are meaningful to assign to an item if this type.
 Class<? extends BasicItem> getItemClass()
          Get the class object that is used to handle items of this type.
 int getValue()
          Get the integer value that is used when storing an item to the database.
 String toString()
           
static Item valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Item[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SYSTEM

public static final Item SYSTEM
Not an item as such. Used for setting system permissions to role keys.

See Also:
Install, SessionControl.hasSystemPermission(Permission)

USER

public static final Item USER
The item is a User.


GROUP

public static final Item GROUP
The item is a Group.


ROLE

public static final Item ROLE
The item is a Role.


PROJECT

public static final Item PROJECT
The item is a Project.


ITEMKEY

public static final Item ITEMKEY
The item is an ItemKey.


PROJECTKEY

public static final Item PROJECTKEY
The item is a ProjectKey.


ROLEKEY

public static final Item ROLEKEY
The item is a RoleKey.


CLIENT

public static final Item CLIENT
The item is an Client.


SESSION

public static final Item SESSION
The item is an Session.


SETTING

public static final Item SETTING
The item is an Setting.


GLOBALDEFAULTSETTING

public static final Item GLOBALDEFAULTSETTING
The item is an GlobalDefaultSetting.


QUOTA

public static final Item QUOTA
The item is a Quota.


QUOTATYPE

public static final Item QUOTATYPE
The item is a QuotaType.


DISKUSAGE

public static final Item DISKUSAGE
The item is a DiskUsage.


FILE

public static final Item FILE
The item is a File.


FILETYPE

public static final Item FILETYPE
The item is a FileType.


DIRECTORY

public static final Item DIRECTORY
The item is a Directory.


MIMETYPE

public static final Item MIMETYPE
The item is a MimeType.


PROTOCOL

public static final Item PROTOCOL
The item is a Protocol.


PROTOCOLTYPE

public static final Item PROTOCOLTYPE
The item is a ProtocolType.


HARDWARE

public static final Item HARDWARE
The item is a Hardware.


HARDWARETYPE

public static final Item HARDWARETYPE
The item is a HardwareType.


SOFTWARE

public static final Item SOFTWARE
The item is a Software.


SOFTWARETYPE

public static final Item SOFTWARETYPE
The item is a SoftwareType.


NEWS

public static final Item NEWS
The item is a News.


MESSAGE

public static final Item MESSAGE
The item is a Message.


ANNOTATIONSET

public static final Item ANNOTATIONSET
The item is an AnnotationSet.


ANNOTATION

public static final Item ANNOTATION
The item is an Annotation.


ANNOTATIONTYPE

public static final Item ANNOTATIONTYPE
The item is an AnnotationType.


BIOSOURCE

public static final Item BIOSOURCE
The item is a BioSource.


SAMPLE

public static final Item SAMPLE
The item is a Sample.


EXTRACT

public static final Item EXTRACT
The item is an Extract.


LABELEDEXTRACT

public static final Item LABELEDEXTRACT
The item is a LabeledExtract.


BIOMATERIALEVENT

public static final Item BIOMATERIALEVENT
The item is a BioMaterialEvent.


LABEL

public static final Item LABEL
The item is a Label.


PLUGINTYPE

public static final Item PLUGINTYPE
The item is a PluginType


PLUGINDEFINITION

public static final Item PLUGINDEFINITION
The item is a PluginDefinition


PLUGINCONFIGURATION

public static final Item PLUGINCONFIGURATION
The item is a PluginConfiguration


JOB

public static final Item JOB
The item is a Job


HARDWARECONFIGURATION

public static final Item HARDWARECONFIGURATION
The item is a HardwareConfiguration


SOFTWARECONFIGURATION

public static final Item SOFTWARECONFIGURATION
The item is a SoftwareConfiguration


PROTEIOS_OFFSET

public static final Item PROTEIOS_OFFSET
Not an item as such. Used as a convenient way to set an offset for the index value of Proteios constants.


PROTEIOS_PEAKLISTSET

public static final Item PROTEIOS_PEAKLISTSET
The item is a PeakListSet


PROTEIOS_PEAKLIST

public static final Item PROTEIOS_PEAKLIST
The item is a PeakList


PROTEIOS_DATAPROCESSINGSTEP

public static final Item PROTEIOS_DATAPROCESSINGSTEP
The item is a DataProcessingStep


PROTEIOS_PRECURSOR

public static final Item PROTEIOS_PRECURSOR
The item is a Precursor


PROTEIOS_PEAK

public static final Item PROTEIOS_PEAK
The item is a Peak


PROTEIOS_ACQUISITION

public static final Item PROTEIOS_ACQUISITION
The item is an Acquisition


PROTEIOS_SPECTRUMSEARCH

public static final Item PROTEIOS_SPECTRUMSEARCH
The item is an SpectrumSearch


PROTEIOS_DIGESTPARAMETER

public static final Item PROTEIOS_DIGESTPARAMETER
The item is an DigestParameter


PROTEIOS_SEARCHDATABASE

public static final Item PROTEIOS_SEARCHDATABASE
The item is an SearchDatabase


PROTEIOS_SEARCHRESULT

public static final Item PROTEIOS_SEARCHRESULT
The item is a SearchResult


PROTEIOS_PROTEIN

public static final Item PROTEIOS_PROTEIN
The item is a Protein


PROTEIOS_PEPTIDE

public static final Item PROTEIOS_PEPTIDE
The item is a Peptide


PROTEIOS_HIT

public static final Item PROTEIOS_HIT
The item is a Hit


PROTEIOS_MEASUREDAREA

public static final Item PROTEIOS_MEASUREDAREA
The item is a MeasuredArea


PROTEIOS_GELELECTROPHORESIS

public static final Item PROTEIOS_GELELECTROPHORESIS
The item is a GelElectrophoresis


PROTEIOS_IPG

public static final Item PROTEIOS_IPG
The item is an IPG


PROTEIOS_SEPARATIONMETHOD

public static final Item PROTEIOS_SEPARATIONMETHOD
The item is a SeparationMethod


PROTEIOS_GELIMAGEANALYSISEVENT

public static final Item PROTEIOS_GELIMAGEANALYSISEVENT
The item is a GelImageAnalysisEvent


PROTEIOS_GELSCANEVENT

public static final Item PROTEIOS_GELSCANEVENT
The item is a GelScanEvent


PROTEIOS_SEPARATIONEVENT

public static final Item PROTEIOS_SEPARATIONEVENT
The item is a SeparationEvent


PROTEIOS_STAININGEVENT

public static final Item PROTEIOS_STAININGEVENT
The item is a StainingEvent


PROTEIOS_OBSERVEDMODIFICATION

public static final Item PROTEIOS_OBSERVEDMODIFICATION
The item is a ObservedModification


PROTEIOS_SEARCHMODIFICATION

public static final Item PROTEIOS_SEARCHMODIFICATION
The item is a SearchModification


PROTEIOS_CREATIONEVENT

public static final Item PROTEIOS_CREATIONEVENT
The item is a CreationEvent


PROTEIOS_BIOMATERIAL

public static final Item PROTEIOS_BIOMATERIAL
The item is a BioMaterial. Was introduced when trying to display any biomaterial by clicking on it.


PROTEIOS_UPDATEEVENT

public static final Item PROTEIOS_UPDATEEVENT
The item is an UpdateEvent


PROTEIOS_LIQUIDCHROMATOGRAPHY

public static final Item PROTEIOS_LIQUIDCHROMATOGRAPHY
The item is a LiquidChromatography


PROTEIOS_XTANDEMPARAMETERSETSTORAGE

public static final Item PROTEIOS_XTANDEMPARAMETERSETSTORAGE
The item is an XTandemParameterSetStorage


PROTEIOS_OMSSAPARAMETERSETSTORAGE

public static final Item PROTEIOS_OMSSAPARAMETERSETSTORAGE
The item is an OMSSAParameterSetStorage


PROTEIOS_MASCOTPARAMETERSETSTORAGE

public static final Item PROTEIOS_MASCOTPARAMETERSETSTORAGE
The item is a MascotParameterSetStorage


PROTEIOS_FEATURE

public static final Item PROTEIOS_FEATURE
The item is a MascotParameterSetStorage

Method Detail

values

public static Item[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Item c : Item.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Item valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Overrides:
toString in class Enum<Item>

getValue

public int getValue()
Get the integer value that is used when storing an item to the database.


getAlias

public String getAlias()
Get the alias for this item, which is used in queries,

See Also:
Query.getRootAlias()

getItemClass

public Class<? extends BasicItem> getItemClass()
Get the class object that is used to handle items of this type.


getDataClass

public Class<? extends BasicData> getDataClass()
Get the data object that is used to store information in the database for items of this type.


getDefinedPermissions

public Set<Permission> getDefinedPermissions()
Get the permissions which are meaningful to assign to an item if this type. This is not used internally by the core, but is can be used by client applications to dynamically display a proper input form while assigning permissions.

Returns:
A Set containing the permissions

getById

public BasicItem getById(DbControl dc,
                         int id)
                  throws ItemNotFoundException,
                         PermissionDeniedException,
                         BaseException
Get the item of the type represented by this enumeration constant with the specified id. Ie. Item.SAMPLE.getById() is the same as Sample.getById.

Parameters:
dc - The DbControl object used for database access and permission checking
id - The id of the item
Returns:
An item of the type represented by this enumeration constant
Throws:
ItemNotFoundException - If an item with the specified id isn't found
PermissionDeniedException - If the logged in user hasn't read permission for the item
BaseException - If there is another error

fromValue

public static Item fromValue(int value)
Get the Item object when you know the integer code.


fromItemClass

public static Item fromItemClass(Class<? extends BasicItem> itemClass)
Get the Item object when you know the item class.


fromDataClass

public static Item fromDataClass(Class<? extends BasicData> dataClass)
Get the Item object when you know the data class.


fromClass

public static Item fromClass(Class<?> anyClass)
Get the Item object when you know either the item or data class.

Returns:
The Item object, or null if no matching item is found

fromDataObject

public static Item fromDataObject(BasicData data)
Get the Item object when you have a data layer object. This method takes Hibernate proxies into account.


Last update: 2011-06-23