Package globus.glmap

Class GLMapDocumentTreeStorage


public class GLMapDocumentTreeStorage extends GLMapStorage
Storage implementation for document tree.
  • Field Details

    • treeUri

      @NonNull public final android.net.Uri treeUri
      The URI of the document tree. This is the root URI of the storage.
    • uri

      @NonNull public final android.net.Uri uri
      The URI representing the current storage object.
    • childrenUri

      @NonNull public final android.net.Uri childrenUri
      The URI for accessing the children of the current storage object.
  • Constructor Details

    • GLMapDocumentTreeStorage

      public GLMapDocumentTreeStorage(@NonNull android.content.ContentResolver resolver, @NonNull android.net.Uri treeUri)
      Constructs a GLMapDocumentTreeStorage object for the specified content resolver and tree URI.
      Parameters:
      resolver - the content resolver to use for accessing the storage
      treeUri - the URI of the document tree
    • GLMapDocumentTreeStorage

      public GLMapDocumentTreeStorage(@NonNull android.content.ContentResolver resolver, @NonNull android.net.Uri treeUri, @NonNull android.net.Uri uri, GLMapDocumentTreeStorage parent)
      Constructs a GLMapDocumentTreeStorage object with a parent storage.
      Parameters:
      resolver - the content resolver to use for accessing the storage
      treeUri - the URI of the document tree
      uri - the URI of the current storage
      parent - the parent storage
  • Method Details

    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getParent

      @Nullable public GLMapStorage getParent()
      Description copied from class: GLMapStorage
      Gets name of storage
      Specified by:
      getParent in class GLMapStorage
      Returns:
      name of storage
    • getPath

      @Nullable public String getPath()
      Description copied from class: GLMapStorage
      Gets the full path of this storage.
      Specified by:
      getPath in class GLMapStorage
      Returns:
      the full path of this storage
    • getName

      public String getName()
      Description copied from class: GLMapStorage
      Gets name of storage
      Specified by:
      getName in class GLMapStorage
      Returns:
      name of storage
    • listFiles

      @Nullable public GLMapStorageFile[] listFiles()
      Description copied from class: GLMapStorage
      List files in storage
      Specified by:
      listFiles in class GLMapStorage
      Returns:
      files in storage
    • findFile

      @Nullable public GLMapStorageFile findFile(@NonNull String name, boolean create)
      Description copied from class: GLMapStorage
      Searches file with given name
      Specified by:
      findFile in class GLMapStorage
      Parameters:
      name - name of file
      create - create if missing
      Returns:
      file object or null if failed
    • findStorage

      @Nullable public GLMapStorage findStorage(@NonNull String name, boolean create)
      Description copied from class: GLMapStorage
      Opens new storage inside this storage (folder)
      Specified by:
      findStorage in class GLMapStorage
      Parameters:
      name - name of storage
      create - create if missing
      Returns:
      new storage
    • getFreeSpace

      public Long getFreeSpace()
      Description copied from class: GLMapStorage
      Returns free space in storage
      Specified by:
      getFreeSpace in class GLMapStorage
      Returns:
      free space in storage or -1 if storage is unavailable.