Package ome.io.nio

Class AbstractFileSystemService

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void createSubpath​(java.lang.String path)
      Makes sure that for a given path, its subpath exists.
      java.lang.String getFilesPath​(java.lang.Long id)
      Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
      protected java.lang.String getPath​(java.lang.String prefix, java.lang.Long id)
      Returns a numbered path relative to the root of this service for a given prefix, but is ignorant of FS and similar constructs.
      java.lang.String getPixelsDirectory()
      Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
      java.lang.String getPixelsPath​(java.lang.Long id)
      Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs.
      java.lang.String getThumbnailPath​(java.lang.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 java.lang.String ROOT_DEFAULT
      • PIXELS_PATH

        public static final java.lang.String PIXELS_PATH
      • FILES_PATH

        public static final java.lang.String FILES_PATH
      • THUMBNAILS_PATH

        public static final java.lang.String THUMBNAILS_PATH
    • Constructor Detail

      • AbstractFileSystemService

        @Deprecated
        public AbstractFileSystemService​(java.lang.String path)
        Deprecated.
      • AbstractFileSystemService

        public AbstractFileSystemService​(java.lang.String path,
                                         boolean isReadOnlyRepo)
    • Method Detail

      • createSubpath

        protected void createSubpath​(java.lang.String path)
        Makes sure that for a given path, its 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 existence.
      • getPixelsDirectory

        public java.lang.String getPixelsDirectory()
        Returns a numbered path relative to the root of this service, but is ignorant of FS and similar constructs. For example, this will return "ROOT/Pixels/"
        Returns:
        the path relative to the root
      • getPixelsPath

        public java.lang.String getPixelsPath​(java.lang.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 12345 this will return "ROOT/Pixels/Dir-123/Dir-456/123456"
        Parameters:
        id - the Pixels identifier
        Returns:
        the path relative to the root
      • getFilesPath

        public java.lang.String getFilesPath​(java.lang.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"
        Parameters:
        id - the Files identifier
        Returns:
        the path relative to the root
      • getThumbnailPath

        public java.lang.String getThumbnailPath​(java.lang.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"
        Parameters:
        id - the thumbnail identifier
        Returns:
        the path relative to the root
      • getPath

        protected java.lang.String getPath​(java.lang.String prefix,
                                           java.lang.Long id)
        Returns a numbered path relative to the root of this service for a given prefix, but is ignorant of FS and similar constructs. For example, given an id of 123456 this will return "ROOT//Dir-123/Dir-456/123456".
        Parameters:
        prefix - id type prefix
        id - the model object identifier
        Returns:
        the path relative to the root