EntityClient

uk.gov.nationalarchives.dp.client.EntityClient
See theEntityClient companion object
trait EntityClient[F[_], S]

A client to create, get and update entities in Preservica

Type parameters

F

Type of the effect

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def addEntity(addEntityRequest: AddEntityRequest): F[UUID]

Adds an entity to Preservica

Adds an entity to Preservica

Value parameters

addEntityRequest

An instance of EntityClient.AddEntityRequest with the details of the entity to add

Attributes

Returns

The reference of the new entity wrapped in the F effect.

def addIdentifierForEntity(entityRef: UUID, entityType: EntityType, identifier: Identifier): F[String]

Adds an identifier for an entity

Adds an identifier for an entity

Value parameters

entityRef

The reference of the entity

entityType

The type of the entity

identifier

The identifier to add to the entity

Attributes

Returns

The string "The Identifier was added"

def entitiesByIdentifier(identifier: Identifier): F[Seq[Entity]]

Find entities for an identifier

Find entities for an identifier

Value parameters

identifier

The identifier to use to find the entities

Attributes

Returns

A Seq of Entities.Entity

def entitiesUpdatedSince(dateTime: ZonedDateTime, startEntry: Int, maxEntries: Int): F[Seq[Entity]]

Returns any entity updated since the provided dateTime

Returns any entity updated since the provided dateTime

Value parameters

dateTime

The date and time to pass to the API

maxEntries

The maximum number of entries to return. Defaults to 1000

startEntry

The entry to start from. Used for pagination

Attributes

Returns

A Seq of Entities.Entity wrapped in the F effect

def entityEventActions(entity: Entity, startEntry: Int, maxEntries: Int): F[Seq[EventAction]]

Returns a list of event actions for an entity

Returns a list of event actions for an entity

Value parameters

entity

The entity to return the actions for

maxEntries

The maximum number of entries to return. Defaults to 1000

startEntry

The entry to start from. Used for pagination

Attributes

Returns

A Seq of DataProcessor.EventAction

def getBitstreamInfo(contentRef: UUID): F[Seq[BitStreamInfo]]

Returns a list of Client.BitStreamInfo representing the bitstreams for the content object reference

Returns a list of Client.BitStreamInfo representing the bitstreams for the content object reference

Value parameters

contentRef

The reference of the content object

Attributes

Returns

A Seq of Client.BitStreamInfo containing the bitstream details

def getContentObjectsFromRepresentation(ioEntityRef: UUID, representationType: RepresentationType, repTypeIndex: Int): F[Seq[Entity]]

Returns a Seq of Entities.Entity for the given ref and representationType

Returns a Seq of Entities.Entity for the given ref and representationType

Value parameters

ioEntityRef

The reference of the Information Object

repTypeIndex

The index of the Representation.

representationType

The EntityClient.RepresentationType of the entity.

Attributes

Returns

A Seq of Entities.Entity wrapped in the F effect

def getEntity(entityRef: UUID, entityType: EntityType): F[Entity]

Returns an Entities.Entity for the given ref and type

Returns an Entities.Entity for the given ref and type

Value parameters

entityRef

The reference of the entity

entityType

The EntityClient.EntityType of the entity.

Attributes

Returns

An Entities.Entity wrapped in the F effect

Returns a list of Entities.IdentifierResponse for a given entity

Returns a list of Entities.IdentifierResponse for a given entity

Value parameters

entity

The entity to find the identifiers for

Attributes

Returns

A Seq of Entities.IdentifierResponse wrapped in the F effect

def getPreservicaNamespaceVersion(endpoint: String): F[Float]

Gets the version of Preservica in the namespace

Gets the version of Preservica in the namespace

Value parameters

endpoint

The Entity endpoint to be called (this should exclude the baseUrl and path)

Attributes

Returns

The version of Preservica in the namespace as a Float

def getUrlsToIoRepresentations(ioEntityRef: UUID, representationType: Option[RepresentationType]): F[Seq[String]]

Returns a String for the given ref and representationType

Returns a String for the given ref and representationType

Value parameters

ioEntityRef

The reference of the Information Object

representationType

The EntityClient.RepresentationType of the entity.

Attributes

Returns

A String wrapped in the F effect

Returns metadata as an XML Elem for the provided entity

Returns metadata as an XML Elem for the provided entity

Value parameters

entity

The entity to return metadata for

Attributes

Returns

An EntityMetadata object containing the metadata (Entity node, Identifiers and metadata) wrapped in the F effect

def streamBitstreamContent[T](stream: Streams[S])(url: String, streamFn: stream.BinaryStream => F[T]): F[T]

Streams the bitstream from the provided url into streamFn

Streams the bitstream from the provided url into streamFn

Type parameters

T

The return type of the stream function, wrapped in the F effect

Value parameters

stream

An instance of the sttp Stream type

streamFn

The function to stream the data to

url

The url to stream the data from

Attributes

Returns

The return type of the stream function, wrapped in the F effect

def updateEntity(updateEntityRequest: UpdateEntityRequest): F[String]

Updates an entity in Preservice

Updates an entity in Preservice

Value parameters

updateEntityRequest

An instance of EntityClient.UpdateEntityRequest with the details of the entity to update

Attributes

Returns

The string "Entity was updated"

def updateEntityIdentifiers(entity: Entity, identifiers: Seq[IdentifierResponse]): F[Seq[IdentifierResponse]]

Updates identifiers for an entity

Updates identifiers for an entity

Value parameters

entity

The entity to update

identifiers

A list of identifiers to update on the entity

Attributes

Returns

The original identifiers argument.

Abstract fields

val dateFormatter: DateTimeFormatter

Used to format dates.

Used to format dates.

Attributes