ome.io.nio
Class AbstractFileSystemService

java.lang.Object
  extended by ome.io.nio.AbstractFileSystemService
Direct Known Subclasses:
OriginalFilesService, PixelsService, ThumbnailService

public class AbstractFileSystemService
extends Object

Author:
callan

Field Summary
static String FILES_PATH
           
static String PIXELS_PATH
           
static String ROOT_DEFAULT
           
static String THUMBNAILS_PATH
           
 
Constructor Summary
AbstractFileSystemService(String path)
           
 
Method Summary
protected  void createSubpath(String path)
          Makes sure that for a given path, it's subpath exists.
 String getFilesPath(Long id)
          Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
 String getPixelsPath(Long id)
          Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
 String getThumbnailPath(Long id)
          Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_DEFAULT

public static final String ROOT_DEFAULT

PIXELS_PATH

public static final String PIXELS_PATH

FILES_PATH

public static final String FILES_PATH

THUMBNAILS_PATH

public static final String THUMBNAILS_PATH
Constructor Detail

AbstractFileSystemService

public AbstractFileSystemService(String path)
Method Detail

createSubpath

protected void createSubpath(String path)
Makes sure that for a given path, it's subpath exists. For example, given the path "/foo/bar/foobar.txt" the method will make sure the directory structure "/foo/bar" exists.

Parameters:
path - the path to check for subpath existance.

getPixelsPath

public String getPixelsPath(Long id)
Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs. For example, given an id of 123456 this will return "ROOT/Pixels/Dir-123/Dir-456/123456" Should be marked protected in 4.4 because assumptions on the existence of this file can be dangerous.

Parameters:
id -
Returns:

getFilesPath

public String getFilesPath(Long id)
Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs. For example, given an id of 123456 this will return "ROOT/Files/Dir-123/Dir-456/123456" Should be marked protected in 4.4 because assumptions on the existence of this file can be dangerous.

Parameters:
id -
Returns:

getThumbnailPath

public String getThumbnailPath(Long id)
Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs. For example, given an id of 123456 this will return "ROOT/Thumbnails/Dir-123/Dir-456/123456" Should be marked protected in 4.4 because assumptions on the existence of this file can be dangerous.

Parameters:
id -
Returns:


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.