class DataverseApi extends HttpSupport with DebugEnhancedLogging
- Alphabetic
- By Inheritance
- DataverseApi
- HttpSupport
- DebugEnhancedLogging
- LazyLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addRoleAssigneesToGroup(groupAlias: String, assignees: List[String]): Try[DataverseResponse[Group]]
- groupAlias
alias of the group
- assignees
assignees to add
-
val
apiPrefix: String
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
val
apiToken: Option[String]
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
val
apiVersion: Option[String]
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assignRole(roleAssignment: RoleAssignment): Try[DataverseResponse[RoleAssignmentReadOnly]]
- roleAssignment
object describing the assignment
-
val
baseUrl: URI
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
connectionTimeout: Int
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
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)
-
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
-
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
-
def
createDataset(dataset: Dataset): Try[DataverseResponse[DatasetCreationResult]]
- dataset
model object defining the dataset
-
def
createDatasetFromJsonLd(s: String): Try[DataverseResponse[Any]]
- s
the JSONLD document
-
def
createGroup(group: Group): Try[DataverseResponse[Group]]
- group
model object of the group
-
def
createGroup(s: String): Try[DataverseResponse[Group]]
- s
JSON document with the definition of the group
-
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
-
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
-
def
debug(msg: String)(implicit enclosing: Name): Unit
- Definition Classes
- DebugEnhancedLogging
-
def
delete(): Try[DataverseResponse[DataMessage]]
Deletes a dataverse.
Deletes a dataverse.
-
def
deleteAssigneeFromGroup(groupAlias: String, assignee: String): Try[DataverseResponse[Group]]
- groupAlias
alias of the group
- assignee
assignee to remove
-
def
deleteGroup(groupAlias: String): Try[DataverseResponse[DataMessage]]
- groupAlias
alias of the group to delete
-
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
-
def
deleteRoleAssignment(assignmentId: Int): Try[DataverseResponse[Nothing]]
Use DataverseApi#listRoleAssignments to get the ID.
Use DataverseApi#listRoleAssignments to get the ID.
- assignmentId
the ID of the assignment to delete
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getGroup(alias: String): Try[DataverseResponse[Group]]
-
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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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
-
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 totrue
.- s
string with the JSON definition of the dataset
- pid
the PID
- autoPublish
whether to immediately publish the dataset
-
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
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isMetadataBlocksRoot: Try[DataverseResponse[Boolean]]
-
def
listFacets(): Try[DataverseResponse[List[String]]]
Returns the list of active facets for a dataverse.
Returns the list of active facets for a dataverse.
- def listGroups(): Try[DataverseResponse[List[Group]]]
- def listMetadataBocks(): Try[DataverseResponse[List[MetadataBlockSummary]]]
-
def
listRoleAssignments(): Try[DataverseResponse[List[RoleAssignmentReadOnly]]]
List all the role assignments at the given dataverse.
List all the role assignments at the given dataverse.
-
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
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
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
-
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
-
def
publish(): Try[DataverseResponse[Dataverse]]
Publishes a dataverse.
Publishes a dataverse.
-
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
-
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
-
val
readTimeout: Int
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
val
sendApiTokenViaBasicAuth: Boolean
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
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
-
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
-
def
setMetadataBlocks(mdBlockIds: List[String]): Try[DataverseResponse[Nothing]]
- mdBlockIds
list of metadata block IDs
-
def
setMetadataBlocksRoot(isRoot: Boolean): Try[DataverseResponse[Nothing]]
- isRoot
whether to make the dataverse a metadata root
-
def
storageSize(): Try[DataverseResponse[DataMessage]]
Return the data (file) size of a Dataverse.
Return the data (file) size of a Dataverse.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trace[V](value: Text[V])(implicit enclosing: Name): Unit
- Definition Classes
- DebugEnhancedLogging
-
val
unblockKey: Option[String]
- Attributes
- protected
- Definition Classes
- DataverseApi → HttpSupport
-
def
updateGroup(groupAlias: String, group: Group): Try[DataverseResponse[Group]]
- groupAlias
alias of the group to update
- group
model object of the group
-
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
-
def
view(): Try[DataverseResponse[Dataverse]]
Returns the definition of a dataverse.
Returns the definition of a dataverse.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()