services

FileService

trait FileService extends AnyRef

Generic file service to store blobs of files and metadata about them.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FileService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addFollower(id: UUID, userId: UUID): Unit

    Add follower to a file.

  2. abstract def addMetadata(fileId: UUID, metadata: JsValue): Unit

  3. abstract def addTags(id: UUID, userIdStr: Option[String], eid: Option[String], tags: List[String]): Unit

  4. abstract def addUserMetadata(id: UUID, json: String): Unit

  5. abstract def addVersusMetadata(id: UUID, json: JsValue): Unit

  6. abstract def addXMLMetadata(id: UUID, json: String): Unit

  7. abstract def bytes(): Long

    The number of bytes stored

  8. abstract def comment(id: UUID, comment: Comment): Unit

  9. abstract def count(): Long

    The number of files

  10. abstract def dumpAllFileMetadata(): List[String]

  11. abstract def findByTag(tag: String, start: String, limit: Integer, reverse: Boolean, user: Option[User]): List[File]

  12. abstract def findByTag(tag: String, user: Option[User]): List[File]

  13. abstract def findIntermediates(): List[File]

  14. abstract def findMetadataChangedFiles(): List[File]

  15. abstract def first(): Option[File]

    First file in chronological order.

  16. abstract def get(id: UUID): Option[File]

    Get file metadata.

  17. abstract def getBytes(id: UUID): Option[(InputStream, String, String, Long)]

    Get the input stream of a file given a file id.

    Get the input stream of a file given a file id. Returns input stream, file name, content type, content length.

  18. abstract def getJsonArray(list: List[JsObject]): JsArray

  19. abstract def getMetadata(id: UUID): Map[String, Any]

  20. abstract def getMetrics(user: Option[User]): Iterable[File]

  21. abstract def getTags(user: Option[User]): Map[String, Long]

    Return a list of tags and counts found in sections

  22. abstract def getTechnicalMetadataJSON(id: UUID): String

  23. abstract def getUserMetadata(id: UUID): Map[String, Any]

  24. abstract def getUserMetadataJSON(id: UUID): String

  25. abstract def getVersusMetadata(id: UUID): Option[JsValue]

  26. abstract def getXMLMetadataJSON(id: UUID): String

  27. abstract def incrementDownloads(id: UUID, user: Option[User]): Unit

  28. abstract def incrementMetadataCount(id: UUID, count: Long): Unit

  29. abstract def incrementViews(id: UUID, user: Option[User]): (Int, Date)

  30. abstract def index(id: UUID): Unit

  31. abstract def index(id: Option[UUID]): Unit

  32. abstract def insert(file: File): Option[String]

    Directly insert file into database, for example if the file path is local.

  33. abstract def isInDataset(file: File, dataset: Dataset): Boolean

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

    Lastest x files in chronological order.

  35. abstract def latest(): Option[File]

    Lastest file in chronological order.

  36. abstract def listFiles(): List[File]

    List all files in the system.

  37. abstract def listFilesAfter(date: String, limit: Int): List[File]

    List files after a specified date.

  38. abstract def listFilesBefore(date: String, limit: Int): List[File]

    List files before a specified date.

  39. abstract def listFilesNotIntermediate(): List[File]

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

  40. abstract def listOutsideDataset(dataset_id: UUID): List[File]

  41. abstract def listUserFilesAfter(date: String, limit: Int, email: String): List[File]

    List files for a specific user after a specified date.

  42. abstract def listUserFilesBefore(date: String, limit: Int, email: String): List[File]

    List files for a specific user before a specified date.

  43. abstract def modifyRDFOfMetadataChangedFiles(): Unit

  44. abstract def modifyRDFUserMetadata(id: UUID, mappingNumber: String = "1"): Unit

  45. abstract def removeAllTags(id: UUID): Unit

  46. abstract def removeFile(id: UUID, host: String, apiKey: Option[String], user: Option[User]): Unit

    Remove the file from mongo

  47. abstract def removeFollower(id: UUID, userId: UUID): Unit

    Remove follower from a file.

  48. abstract def removeOldIntermediates(apiKey: Option[String], user: Option[User]): Unit

  49. abstract def removeTags(id: UUID, userIdStr: Option[String], eid: Option[String], tags: List[String]): Unit

  50. abstract def removeTemporaries(): Unit

  51. abstract def renameFile(id: UUID, newName: String): Unit

  52. abstract def save(file: File): Unit

    Save a file object

  53. abstract def save(inputStream: InputStream, filename: String, contentType: Option[String], author: MiniUser, showPreviews: String = "DatasetLevel"): Option[File]

    Save a file from an input stream.

  54. abstract def searchAllMetadataFormulateQuery(requestedMetadataQuery: Any): List[File]

  55. abstract def searchMetadataFormulateQuery(requestedMap: LinkedHashMap[String, Any], root: String): com.mongodb.casbah.Imports.MongoDBObject

  56. abstract def searchUserMetadataFormulateQuery(requestedMetadataQuery: Any): List[File]

  57. abstract def setContentType(id: UUID, newType: String): Unit

  58. abstract def setIntermediate(id: UUID): Unit

  59. abstract def setStatus(id: UUID, status: FileStatus): Unit

    Set the file status

  60. abstract def setUserMetadataWasModified(id: UUID, wasModified: Boolean): Unit

  61. abstract def statusCount(): Map[FileStatus, Long]

    The number of files

  62. abstract def updateAuthorFullName(userId: UUID, fullName: String): Unit

  63. abstract def updateDescription(fileId: UUID, description: String): Unit

  64. abstract def updateLicense(id: UUID, licenseType: String, rightsHolder: String, licenseText: String, licenseUrl: String, allowDownload: String): Unit

    Update the license data that is currently associated with the file.

    Update the license data that is currently associated with the file.

    id: The id of the file licenseType: A String representing the type of license rightsHolder: A String that is the free-text describing the owner of the license. Only required for certain license types licenseText: Text that describes what the license is licenseUrl: A reference to the license information allowDownload: true or false, to allow downloading of the file or dataset. Relevant only for certain license types

  65. abstract def updateMetadata(fileId: UUID, metadata: JsValue, extractor_id: String): Unit

    Update technical metadata

  66. abstract def updateThumbnail(fileId: UUID, thumbnailId: UUID): Unit

    Update thumbnail used to represent this dataset.

Concrete 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped