Packages

c

nl.knaw.dans.lib.dataverse

DataverseApi

class DataverseApi extends HttpSupport with DebugEnhancedLogging

Linear Supertypes
HttpSupport, DebugEnhancedLogging, LazyLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataverseApi
  2. HttpSupport
  3. DebugEnhancedLogging
  4. LazyLogging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addRoleAssigneesToGroup(groupAlias: String, assignees: List[String]): Try[DataverseResponse[Group]]

  5. val apiPrefix: String
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  6. val apiToken: Option[String]
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  7. val apiVersion: Option[String]
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def assignRole(roleAssignment: RoleAssignment): Try[DataverseResponse[RoleAssignmentReadOnly]]

  10. val baseUrl: URI
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. val connectionTimeout: Int
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  13. def contents(): Try[DataverseResponse[List[DataverseItem]]]

    Returns the contents of a dataverse (datasets and sub-verses)

    Returns the contents of a dataverse (datasets and sub-verses)

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#show-contents-of-a-dataverse

  14. def create(s: String): Try[DataverseResponse[Dataverse]]

    Creates a dataverse based on a definition provided as a string with the JSON definition.

    Creates a dataverse based on a definition provided as a string with the JSON definition.

    s

    the JSON definition

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#create-a-dataverse

  15. def create(dd: Dataverse): Try[DataverseResponse[Dataverse]]

    Creates a dataverse based on a definition provided as model object.

    Creates a dataverse based on a definition provided as model object.

    dd

    the model object

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#create-a-dataverse

  16. def createDataset(dataset: Dataset): Try[DataverseResponse[DatasetCreationResult]]

  17. def createDatasetFromJsonLd(s: String): Try[DataverseResponse[Any]]

  18. def createGroup(group: Group): Try[DataverseResponse[Group]]

  19. def createGroup(s: String): Try[DataverseResponse[Group]]

    s

    JSON document with the definition of the group

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#create-new-explicit-group

  20. def createRole(s: String): Try[DataverseResponse[Role]]

    Creates a role base on a definition provided as model object.

    Creates a role base on a definition provided as model object.

    s

    the JSON definition

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#create-a-new-role-in-a-dataverse

  21. def createRole(role: Role): Try[DataverseResponse[Role]]

    Creates a role base on a definition provided as model object.

    Creates a role base on a definition provided as model object.

    role

    the model object

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#create-a-new-role-in-a-dataverse

  22. def debug(msg: String)(implicit enclosing: Name): Unit
    Definition Classes
    DebugEnhancedLogging
  23. def delete(): Try[DataverseResponse[DataMessage]]

    Deletes a dataverse.

  24. def deleteAssigneeFromGroup(groupAlias: String, assignee: String): Try[DataverseResponse[Group]]

    groupAlias

    alias of the group

    assignee

    assignee to remove

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#delete-group-from-a-dataverse

  25. def deleteGroup(groupAlias: String): Try[DataverseResponse[DataMessage]]

  26. def deletePath[D](subPath: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  27. def deleteRoleAssignment(assignmentId: Int): Try[DataverseResponse[Nothing]]

    Use DataverseApi#listRoleAssignments to get the ID.

  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def get[D](subPath: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  32. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. def getGroup(alias: String): Try[DataverseResponse[Group]]

  34. def getUnwrapped(subPath: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty): Try[HttpResponse[Array[Byte]]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def importDataset(dataset: Dataset, optPid: Option[String] = Option.empty, autoPublish: Boolean = false): Try[DataverseResponse[DatasetCreationResult]]

    Import a dataset with an existing persistent identifier, which can be provided as a parameter or in the Dataset object's protocol, authority and identifier fields.

    Import a dataset with an existing persistent identifier, which can be provided as a parameter or in the Dataset object's protocol, authority and identifier fields. (E.g. for a DOI: protocol = "doi", authority = "10.5072", identifier = "FK2/12345".)

    dataset

    model object defining the dataset

    optPid

    PID provided as parameter

    autoPublish

    immediately publish dataset after publication

  37. def importDataset(s: String, pid: String, autoPublish: Boolean): Try[DataverseResponse[DatasetCreationResult]]

    Import a dataset with an existing persistent identifier, which must be provided as a separate parameter.

    Import a dataset with an existing persistent identifier, which must be provided as a separate parameter. The dataset will be automatically published after import if autoPublish is set to true.

    s

    string with the JSON definition of the dataset

    pid

    the PID

    autoPublish

    whether to immediately publish the dataset

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#import-a-dataset-into-a-dataverse

  38. def importDataset(s: String, pid: String): Try[DataverseResponse[DatasetCreationResult]]

    Import a dataset with an existing persistent identifier, which must be provided as a separate parameter.

    Import a dataset with an existing persistent identifier, which must be provided as a separate parameter. The dataset will be imported as a draft.

    s

    string with the JSON definition of the dataset

    pid

    the PID

  39. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  40. def isMetadataBlocksRoot: Try[DataverseResponse[Boolean]]

  41. def listFacets(): Try[DataverseResponse[List[String]]]

    Returns the list of active facets for a dataverse.

  42. def listGroups(): Try[DataverseResponse[List[Group]]]

  43. def listMetadataBocks(): Try[DataverseResponse[List[MetadataBlockSummary]]]

  44. def listRoleAssignments(): Try[DataverseResponse[List[RoleAssignmentReadOnly]]]

    List all the role assignments at the given dataverse.

  45. def listRoles(): Try[DataverseResponse[List[Role]]]

    Returns the roles defined in a dataverse.

    Returns the roles defined in a dataverse.

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#list-roles-defined-in-a-dataverse

  46. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
    Annotations
    @transient()
  47. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. def postFile[D](subPath: String, optFile: Option[File], optJsonMetadata: Option[String] = Option.empty, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]

    Posts a multi-part message with an optional file and optional JSON metadata part.

    Posts a multi-part message with an optional file and optional JSON metadata part. Probably at least one is required, but since this is an internal function, this is not validated.

    D

    the payload type for the DataverseResponse

    subPath

    subpath to post to

    optFile

    the optional file

    optJsonMetadata

    the optional metadata

    headers

    extra headers

    params

    extra query parameters

    returns

    a DataverseResponse

    Attributes
    protected
    Definition Classes
    HttpSupport
  51. def postJson[D](subPath: String = null, body: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty, isJsonLd: Boolean = false)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  52. def postText[D](subPath: String = null, body: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  53. def publish(): Try[DataverseResponse[Dataverse]]

    Publishes a dataverse.

  54. def put[D](subPath: String = null, body: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  55. def putJson[D](subPath: String = null, body: String = null, headers: Map[String, String] = Map.empty, params: Map[String, String] = Map.empty, isJsonLd: Boolean = false)(implicit arg0: Manifest[D]): Try[DataverseResponse[D]]
    Attributes
    protected
    Definition Classes
    HttpSupport
  56. val readTimeout: Int
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  57. val sendApiTokenViaBasicAuth: Boolean
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  58. def setDefaultRole(role: DefaultRole): Try[DataverseResponse[DataMessage]]

    Assigns a default role to a user creating a dataset in a dataverse.

    Assigns a default role to a user creating a dataset in a dataverse.

    Note: there does not seem to be a way to retrieve the current default role via the API.

    role

    the role to assign

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#assign-default-role-to-user-creating-a-dataset-in-a-dataverse

  59. def setFacets(facets: List[String]): Try[DataverseResponse[Nothing]]

    Sets the list of active facets for a dataverse.

    Sets the list of active facets for a dataverse.

    facets

    the list of facets

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#set-facets-for-a-dataverse

  60. def setMetadataBlocks(mdBlockIds: List[String]): Try[DataverseResponse[Nothing]]

  61. def setMetadataBlocksRoot(isRoot: Boolean): Try[DataverseResponse[Nothing]]

  62. def storageSize(): Try[DataverseResponse[DataMessage]]

    Return the data (file) size of a Dataverse.

  63. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. def trace[V](value: Text[V])(implicit enclosing: Name): Unit
    Definition Classes
    DebugEnhancedLogging
  66. val unblockKey: Option[String]
    Attributes
    protected
    Definition Classes
    DataverseApi → HttpSupport
  67. def updateGroup(groupAlias: String, group: Group): Try[DataverseResponse[Group]]

    groupAlias

    alias of the group to update

    group

    model object of the group

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#update-group-in-a-dataverse

  68. def updateGroup(groupAlias: String, s: String): Try[DataverseResponse[Group]]

    groupAlias

    alias of the group to update

    s

    JSON document with the definition of the group

    See also

    https://guides.dataverse.org/en/latest/api/native-api.html#update-group-in-a-dataverse

  69. def view(): Try[DataverseResponse[Dataverse]]

    Returns the definition of a dataverse.

  70. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  72. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from HttpSupport

Inherited from DebugEnhancedLogging

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped