|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.ThumbnailCtx
public class ThumbnailCtx
Field Summary | |
---|---|
static String |
DEFAULT_MIME_TYPE
Default thumbnail MIME type. |
Constructor Summary | |
---|---|
ThumbnailCtx(IQuery queryService,
IUpdate updateService,
IPixels pixelsService,
IRenderingSettings settingsService,
ThumbnailService thumbnailService,
SecuritySystem securitySystem,
long userId)
Default constructor. |
Method Summary | |
---|---|
Dimension |
calculateXYWidths(ome.model.core.Pixels pixels,
int longestSide)
Calculates the ratio of the two sides of a Pixel set and returns the X and Y widths based on the longest side maintaining aspect ratio. |
void |
createAndPrepareMissingRenderingSettings(Set<Long> pixelsIds)
Resets a given set of Pixels rendering settings to the default effectively creating any which do not exist. |
ome.model.display.Thumbnail |
createThumbnailMetadata(ome.model.core.Pixels pixels,
Dimension dimensions)
Creates metadata for a thumbnail of a given set of pixels set and X-Y dimensions. |
boolean |
dirtyMetadata(long pixelsId)
Whether or not the thumbnail metadata for a given Pixels ID is dirty (the RenderingDef has been updated since the Thumbnail was). |
ome.model.display.Thumbnail |
getMetadata(long pixelsId)
Retrieves the Thumbnail object for a given Pixels ID. |
ome.model.core.Pixels |
getPixels(long pixelsId)
Retrieves the Pixels object for a given Pixels ID. |
ome.model.display.RenderingDef |
getSettings(long pixelsId)
Retrieves the RenderingDef object for a given Pixels ID. |
long |
getUserId()
Retrieves the current user ID to use for queries. |
boolean |
hasMetadata(long pixelsId)
Whether or not thumbnail metadata is available for a given Pixels ID. |
boolean |
hasSettings(long pixelsId)
Whether or not settings are available for a given Pixels ID. |
boolean |
isThumbnailCached(long pixelsId)
Checks to see if a thumbnail is in the on disk cache or not. |
List<ome.model.display.Thumbnail> |
loadAllMetadata(long pixelsId)
Retrieves all thumbnail metadata available in the database for a given Pixels ID. |
void |
loadAndPrepareMetadata(Set<Long> pixelsIds,
Dimension dimensions)
Bulk loads and prepares metadata for a group of pixels sets. |
void |
loadAndPrepareMetadata(Set<Long> pixelsIds,
int longestSide)
Bulk loads and prepares metadata for a group of pixels sets. |
void |
loadAndPrepareRenderingSettings(long pixelsId,
long settingsId)
Loads and prepares a rendering settings for a Pixels ID and RenderingDef ID. |
void |
loadAndPrepareRenderingSettings(Set<Long> pixelsIds)
Bulk loads a set of rendering settings for a group of pixels sets and prepares our internal data structures. |
void |
setUserId(long userId)
Sets the user ID to use for queries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_MIME_TYPE
Constructor Detail |
---|
public ThumbnailCtx(IQuery queryService, IUpdate updateService, IPixels pixelsService, IRenderingSettings settingsService, ThumbnailService thumbnailService, SecuritySystem securitySystem, long userId)
queryService
- OMERO query service to use.updateService
- OMERO update service to use.pixelsService
- OMERO pixels service to use.settingsService
- OMERO rendering settings service to use.thumbnailService
- OMERO thumbnail service to use.securitySystem
- OMERO security system for this session.userId
- Current user ID.Method Detail |
---|
public long getUserId()
public void setUserId(long userId)
userId
- The user ID to use for queries.public void loadAndPrepareRenderingSettings(Set<Long> pixelsIds)
pixelsIds
- Set of Pixels IDs to prepare rendering settings for.public void loadAndPrepareRenderingSettings(long pixelsId, long settingsId)
pixelsId
- Pixels ID to load.settingsId
- RenderingDef ID to load an prepare settings for.public void loadAndPrepareMetadata(Set<Long> pixelsIds, int longestSide)
pixelsIds
- Pixels IDs to prepare metadata for.longestSide
- The longest side of the thumbnails requested.public void loadAndPrepareMetadata(Set<Long> pixelsIds, Dimension dimensions)
pixelsIds
- Pixels IDs to prepare metadata for.dimensions
- X-Y dimensions of the thumbnails requested.public List<ome.model.display.Thumbnail> loadAllMetadata(long pixelsId)
pixelsId
- Pixels ID to retrieve thumbnail metadata for.
public void createAndPrepareMissingRenderingSettings(Set<Long> pixelsIds)
pixelsIds
- Pixels IDspublic boolean hasSettings(long pixelsId)
pixelsId
- Pixels ID to check for availability.
true
if settings are available and
false
otherwise.public boolean hasMetadata(long pixelsId)
pixelsId
- Pixels ID to check for availability.
true
if metadata is available and
false
otherwise.public ome.model.core.Pixels getPixels(long pixelsId)
pixelsId
- Pixels ID to retrieve the Pixels object for.
public ome.model.display.RenderingDef getSettings(long pixelsId)
pixelsId
- Pixels ID to retrieve the RenderingDef object for.
public ome.model.display.Thumbnail getMetadata(long pixelsId)
pixelsId
- Pixels ID to retrieve the Thumbnail object for.
public boolean dirtyMetadata(long pixelsId)
pixelsId
- Pixels ID to check for dirty metadata.
true
if the metadata is dirty false
otherwise.public boolean isThumbnailCached(long pixelsId)
pixelsId
- The Pixels set the thumbnail is for.
public Dimension calculateXYWidths(ome.model.core.Pixels pixels, int longestSide)
pixels
- The Pixels set to calculate against.longestSide
- The size of the longest side of the thumbnail
requested.
public ome.model.display.Thumbnail createThumbnailMetadata(ome.model.core.Pixels pixels, Dimension dimensions)
pixels
- The Pixels set to create thumbnail metadata for.dimensions
- The dimensions of the thumbnail.
getThumbnailMetadata()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.