services.mongodb

MongoDBFileService

class MongoDBFileService extends FileService

Use mongo for both metadata and blobs.

Annotations
@Singleton()
Linear Supertypes
FileService, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoDBFileService
  2. FileService
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MongoDBFileService(datasets: DatasetService, collections: CollectionService, spaces: SpaceService, sections: SectionService, comments: CommentService, previews: PreviewService, thumbnails: ThumbnailService, threeD: ThreeDService, sparql: RdfSPARQLService, storage: ByteStorageService, userService: UserService, folders: FolderService, metadatas: MetadataService, events: EventService, routing: ExtractorRoutingService, appConfig: AppConfigurationService, esqueue: ElasticsearchQueue)

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object MustBreak extends Exception

  7. def addFollower(id: UUID, userId: UUID): Unit

    Add follower to a file.

    Add follower to a file.

    Definition Classes
    MongoDBFileServiceFileService
  8. def addMetadata(fileId: UUID, metadata: JsValue): Unit

    Definition Classes
    MongoDBFileServiceFileService
  9. def addTags(id: UUID, userIdStr: Option[String], eid: Option[String], tags: List[String]): List[Tag]

    Definition Classes
    MongoDBFileServiceFileService
  10. def addUserMetadata(id: UUID, json: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  11. def addVersusMetadata(id: UUID, json: JsValue): Unit

    Add versus descriptors to the Versus.

    Add versus descriptors to the Versus.descriptors collection associated to a file

    Definition Classes
    MongoDBFileServiceFileService
  12. def addXMLMetadata(id: UUID, json: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def autoArchiveCandidateFiles(): Unit

    Submit all archival candidates to the appropriate queue/extractor.

    Submit all archival candidates to the appropriate queue/extractor. This may be expanded to support per-space configuration in the future.

    Reads the following parameters from Clowder configuration:

    • archiveAutoAfterInactiveCount - timeout after which files are considered to be candidates for archival (see below)
    • archiveAutoAfterInactiveUnits - time unit that should be used for the timeout (see below)
    • archiveAutoAboveMinimumStorageSize - files below this size (in Bytes) should not be archived
    • clowder.rabbitmq.clowderurl - the Clowder hostname to pass to the archival extractor
    • commKey - the admin key to pass to the archival extractor

    Archival candidates are currently defined as follows:

    • file's size must be greater than archiveAutoAboveMinimumStorageSize Bytes
    • file's age must be greater than archiveAutoAfterInactiveCount * archiveAutoAfterInactiveUnits (e.g. 10 days old)
    • AND one of the following must be true:
      • file has never been downloaded (0 downloads) OR
      • file has not been downloaded in the past archiveAutoAfterInactiveCount archiveAutoAfterInactiveUnits
    Definition Classes
    MongoDBFileServiceFileService
  15. def bytes(): Long

    The number of bytes stored

    The number of bytes stored

    Definition Classes
    MongoDBFileServiceFileService
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def comment(id: UUID, comment: Comment): Unit

    Definition Classes
    MongoDBFileServiceFileService
  18. def count(): Long

    Count all files

    Count all files

    Definition Classes
    MongoDBFileServiceFileService
  19. def dumpAllFileMetadata(): List[String]

    Definition Classes
    MongoDBFileServiceFileService
  20. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def findByTag(tag: String, start: String, limit: Integer, reverse: Boolean, user: Option[User]): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  24. def findByTag(tag: String, user: Option[User]): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  25. def findIntermediates(): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  26. def findMetadataChangedFiles(): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  27. def first(): Option[File]

    First file in chronological order.

    First file in chronological order.

    Definition Classes
    MongoDBFileServiceFileService
  28. def get(ids: List[UUID]): DBResult[File]

    Definition Classes
    MongoDBFileServiceFileService
  29. def get(id: UUID): Option[File]

    Get file metadata.

    Get file metadata.

    Definition Classes
    MongoDBFileServiceFileService
  30. def getBytes(id: UUID): Option[(InputStream, String, String, Long)]

    Get blob.

    Get blob.

    Definition Classes
    MongoDBFileServiceFileService
  31. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  32. def getIterator(space: Option[String], since: Option[String], until: Option[String]): Iterator[File]

    Definition Classes
    MongoDBFileServiceFileService
  33. def getJsonArray(list: List[JsObject]): JsArray

    Definition Classes
    MongoDBFileServiceFileService
  34. def getMetadata(id: UUID): Map[String, Any]

    Definition Classes
    MongoDBFileServiceFileService
  35. def getTags(user: Option[User]): Map[String, Long]

    Return a list of tags and counts found in sections

    Return a list of tags and counts found in sections

    Definition Classes
    MongoDBFileServiceFileService
  36. def getTechnicalMetadataJSON(id: UUID): String

    Definition Classes
    MongoDBFileServiceFileService
  37. def getUserMetadata(id: UUID): Map[String, Any]

    Definition Classes
    MongoDBFileServiceFileService
  38. def getUserMetadataJSON(id: UUID): String

    Definition Classes
    MongoDBFileServiceFileService
  39. def getVersusMetadata(id: UUID): Option[JsValue]

    Get Versus descriptors as Json Array for a file

    Get Versus descriptors as Json Array for a file

    Definition Classes
    MongoDBFileServiceFileService
  40. def getXMLMetadataJSON(id: UUID): String

    Definition Classes
    MongoDBFileServiceFileService
  41. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  42. def incrementDownloads(id: UUID, user: Option[User], dateOnly: Boolean = false): Unit

    Definition Classes
    MongoDBFileServiceFileService
  43. def incrementMetadataCount(id: UUID, count: Long): Unit

    Change the metadataCount field for a file

    Change the metadataCount field for a file

    Definition Classes
    MongoDBFileServiceFileService
  44. def incrementViews(id: UUID, user: Option[User]): (Int, Date)

    Definition Classes
    MongoDBFileServiceFileService
  45. def index(id: UUID, idx: Option[String] = None): Unit

    Definition Classes
    MongoDBFileServiceFileService
  46. def indexAll(idx: Option[String] = None): Unit

    Definition Classes
    MongoDBFileServiceFileService
  47. def insert(file: File): Option[String]

    Directly insert a file into the db (even with a local path)

    Directly insert a file into the db (even with a local path)

    Definition Classes
    MongoDBFileServiceFileService
  48. def isInDataset(file: File, dataset: Dataset): Boolean

    Definition Classes
    MongoDBFileServiceFileService
  49. def isInTrash(id: UUID): Boolean

    Definition Classes
    MongoDBFileServiceFileService
  50. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  51. def isLastPointingToLoader(loader: String, loader_id: String): Boolean

  52. def jsonToXML(theJSON: String): File

  53. def latest(i: Int): List[File]

    Lastest x files in chronological order.

    Lastest x files in chronological order.

    Definition Classes
    MongoDBFileServiceFileService
  54. def latest(): Option[File]

    Lastest file in chronological order.

    Lastest file in chronological order.

    Definition Classes
    MongoDBFileServiceFileService
  55. def listFiles(): List[File]

    List all files.

    List all files.

    Definition Classes
    MongoDBFileServiceFileService
  56. def listFilesAfter(date: String, limit: Int): List[File]

    List files after a specified date.

    List files after a specified date.

    Definition Classes
    MongoDBFileServiceFileService
  57. def listFilesBefore(date: String, limit: Int): List[File]

    List files before a specified date.

    List files before a specified date.

    Definition Classes
    MongoDBFileServiceFileService
  58. def listFilesNotIntermediate(): List[File]

    List all files in the system that are not intermediate result files generated by the extractors.

    List all files in the system that are not intermediate result files generated by the extractors.

    Definition Classes
    MongoDBFileServiceFileService
  59. def listOutsideDataset(dataset_id: UUID): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  60. def listUserFilesAfter(date: String, limit: Int, email: String): List[File]

    List files specific to a user after a specified date.

    List files specific to a user after a specified date.

    Definition Classes
    MongoDBFileServiceFileService
  61. def listUserFilesBefore(date: String, limit: Int, email: String): List[File]

    List files specific to a user before a specified date.

    List files specific to a user before a specified date.

    Definition Classes
    MongoDBFileServiceFileService
  62. def modifyRDFOfMetadataChangedFiles(): Unit

    Definition Classes
    MongoDBFileServiceFileService
  63. def modifyRDFUserMetadata(id: UUID, mappingNumber: String = "1"): Unit

    Definition Classes
    MongoDBFileServiceFileService
  64. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  65. final def notify(): Unit

    Definition Classes
    AnyRef
  66. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  67. def removeAllTags(id: UUID): Unit

    Definition Classes
    MongoDBFileServiceFileService
  68. def removeFile(id: UUID, host: String, apiKey: Option[String], user: Option[User]): Boolean

    Remove the file from mongo

    Remove the file from mongo

    Definition Classes
    MongoDBFileServiceFileService
  69. def removeFollower(id: UUID, userId: UUID): Unit

    Remove follower from a file.

    Remove follower from a file.

    Definition Classes
    MongoDBFileServiceFileService
  70. def removeOldIntermediates(apiKey: Option[String], user: Option[User]): Unit

    Definition Classes
    MongoDBFileServiceFileService
  71. def removeTags(id: UUID, tags: List[String]): Unit

    Definition Classes
    MongoDBFileServiceFileService
  72. def removeTemporaries(): Unit

    Definition Classes
    MongoDBFileServiceFileService
  73. def renameFile(id: UUID, newName: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  74. def save(inputStream: InputStream, filename: String, contentLength: Long, contentType: Option[String], author: MiniUser, showPreviews: String = "DatasetLevel"): Option[File]

    Save blob.

    Save blob.

    Definition Classes
    MongoDBFileServiceFileService
  75. def save(file: File): Unit

    Save a file object

    Save a file object

    Definition Classes
    MongoDBFileServiceFileService
  76. def searchAllMetadataFormulateQuery(requestedMetadataQuery: Any): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  77. def searchMetadataFormulateQuery(requestedMap: LinkedHashMap[String, Any], root: String): MongoDBObject

    Definition Classes
    MongoDBFileServiceFileService
  78. def searchUserMetadataFormulateQuery(requestedMetadataQuery: Any): List[File]

    Definition Classes
    MongoDBFileServiceFileService
  79. def setContentType(id: UUID, newType: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  80. def setIntermediate(id: UUID): Unit

    Definition Classes
    MongoDBFileServiceFileService
  81. def setStatus(id: UUID, status: FileStatus): Unit

    Set the file status

    Set the file status

    Definition Classes
    MongoDBFileServiceFileService
  82. def setUserMetadataWasModified(id: UUID, wasModified: Boolean): Unit

    Definition Classes
    MongoDBFileServiceFileService
  83. def statusCount(): Map[FileStatus, Long]

    The number of files

    The number of files

    Definition Classes
    MongoDBFileServiceFileService
  84. def submitArchivalOperation(file: File, id: UUID, host: String, parameters: JsObject, apiKey: Option[String], user: Option[User]): Unit

    Submit a single archival operation to the appropriate queue/extractor

    Submit a single archival operation to the appropriate queue/extractor

    Definition Classes
    MongoDBFileServiceFileService
  85. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  86. def toString(): String

    Definition Classes
    AnyRef → Any
  87. def updateAuthorFullName(userId: UUID, fullName: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  88. def updateDescription(id: UUID, description: String): Unit

    Definition Classes
    MongoDBFileServiceFileService
  89. def updateLicense(id: UUID, licenseType: String, rightsHolder: String, licenseText: String, licenseUrl: String, allowDownload: String): Unit

    Implementation of updateLicenseing defined in services/FileService.

    Implementation of updateLicenseing defined in services/FileService.scala.

    Definition Classes
    MongoDBFileServiceFileService
  90. def updateMetadata(fileId: UUID, metadata: JsValue, extractor_id: String): Unit

    Update technical metadata

    Update technical metadata

    Definition Classes
    MongoDBFileServiceFileService
  91. def updateThumbnail(fileId: UUID, thumbnailId: UUID): Unit

    Update thumbnail used to represent this dataset.

    Update thumbnail used to represent this dataset.

    Definition Classes
    MongoDBFileServiceFileService
  92. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  93. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FileService

Inherited from AnyRef

Inherited from Any

Ungrouped