eadpb

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ViewType_name = map[int32]string{
		0: "DOWNLOADONLY",
		1: "DZI",
		2: "JPEG",
		3: "PDF",
		4: "AUDIO",
		5: "VIDEO",
	}
	ViewType_value = map[string]int32{
		"DOWNLOADONLY": 0,
		"DZI":          1,
		"JPEG":         2,
		"PDF":          3,
		"AUDIO":        4,
		"VIDEO":        5,
	}
)

Enum value maps for ViewType.

View Source
var File_hub3_ead_eadpb_scan_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type File

type File struct {
	View ViewType `protobuf:"varint,1,opt,name=view,proto3,enum=eadpb.ViewType" json:"view,omitempty"`
	// For scans this is the NL-HaNA_1.01.02_11_P1 type filename.
	Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	// The file-uuid from GAF
	Fileuuid string `protobuf:"bytes,4,opt,name=fileuuid,proto3" json:"fileuuid,omitempty"`
	// The duuid is not needed for the frontend as of now I think, but could be useful.
	FileSize int32 `protobuf:"varint,6,opt,name=fileSize,proto3" json:"fileSize,omitempty"`
	// Absolute web accessible url to the file source so internet web clients can access them.
	// These urls are examples and not the real url patterns.
	// For DZI example: [https://test.nationaalarchief.nl/gaf/iip/1.04.02_1.dzi]
	// Or JPEG thumb example: [https://test.nationaalarchief.nl/gaf/iip/thumb-100x100.jpg]
	// Or PDF file example: [https://test.nationaalarchief.nl/gaf/file/1.04.02.pdf]
	ThumbnailURI string `protobuf:"bytes,2,opt,name=thumbnailURI,proto3" json:"thumbnailURI,omitempty"`
	// Optional uri for downloading the DZI XML description.
	DeepzoomURI string `protobuf:"bytes,7,opt,name=deepzoomURI,proto3" json:"deepzoomURI,omitempty"`
	// Optional uri for downloading the original.
	DownloadURI string `protobuf:"bytes,8,opt,name=downloadURI,proto3" json:"downloadURI,omitempty"`
	// Mime-Type of the file
	MimeType string `protobuf:"bytes,9,opt,name=mimeType,proto3" json:"mimeType,omitempty"`
	// The relative sort order of the File within the inventoryID
	SortKey int32 `protobuf:"varint,10,opt,name=sortKey,proto3" json:"sortKey,omitempty"`
	// Extra file metadata like collection, creator, date.
	MetaData map[string]*Values `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func DecodePBFile

func DecodePBFile(hit json.RawMessage) (*File, error)

DecodePBFile decodes a pb.File from an json.RawMessage. This is used to parse the protobuf from an ElasticSearch response.

func (*File) Descriptor deprecated

func (*File) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetDeepzoomURI

func (x *File) GetDeepzoomURI() string

func (*File) GetDownloadURI

func (x *File) GetDownloadURI() string

func (*File) GetFileSize

func (x *File) GetFileSize() int32

func (*File) GetFilename

func (x *File) GetFilename() string

func (*File) GetFileuuid

func (x *File) GetFileuuid() string

func (*File) GetMetaData added in v0.2.1

func (x *File) GetMetaData() map[string]*Values

func (*File) GetMimeType

func (x *File) GetMimeType() string

func (*File) GetSortKey

func (x *File) GetSortKey() int32

func (*File) GetThumbnailURI

func (x *File) GetThumbnailURI() string

func (*File) GetView

func (x *File) GetView() ViewType

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type FindingAid

type FindingAid struct {

	// The dataset identifier and EAD identifier.
	ArchiveID string `protobuf:"bytes,1,opt,name=archiveID,proto3" json:"archiveID,omitempty"`
	// The long title for the Archive.
	ArchiveTitle string `protobuf:"bytes,2,opt,name=archiveTitle,proto3" json:"archiveTitle,omitempty"`
	// The unit idendifier for a given c-level.
	InventoryID string `protobuf:"bytes,3,opt,name=inventoryID,proto3" json:"inventoryID,omitempty"`
	// The tree-path under which the inventory is stored.
	InventoryPath string `protobuf:"bytes,4,opt,name=inventoryPath,proto3" json:"inventoryPath,omitempty"`
	// The unit-title of the inventory.
	InventoryTitle string `protobuf:"bytes,5,opt,name=inventoryTitle,proto3" json:"inventoryTitle,omitempty"`
	// The deliverable uuid of the METS file where all the Files are extracted from.
	Duuid string `protobuf:"bytes,6,opt,name=duuid,proto3" json:"duuid,omitempty"`
	// Return true if the files in the WHOLE (not just the current page) set are DZI tiles.
	HasOnlyTiles bool `protobuf:"varint,7,opt,name=hasOnlyTiles,proto3" json:"hasOnlyTiles,omitempty"`
	// Sorted array of mime-types for current deliverable-uuid
	MimeTypes map[string]int32 `` /* 160-byte string literal not displayed */
	// number of linked digital objects
	FileCount int32 `protobuf:"varint,9,opt,name=fileCount,proto3" json:"fileCount,omitempty"`
	// the linked Files to the FindingAid
	Files []*File `protobuf:"bytes,10,rep,name=files,proto3" json:"files,omitempty"`
	// filter keys
	FilterTypes []string `protobuf:"bytes,11,rep,name=filterTypes,proto3" json:"filterTypes,omitempty"`
	// scan navigation
	HasScanNavigation bool `protobuf:"varint,12,opt,name=hasScanNavigation,proto3" json:"hasScanNavigation,omitempty"`
	// contains filtered or unexported fields
}

func DecodePBFindingAid

func DecodePBFindingAid(hit json.RawMessage) (*FindingAid, error)

DecodePBFindingAid decodes a pb.FindingAid from an json.RawMessage. This is used to parse the protobuf from an ElasticSearch response.

func (*FindingAid) Descriptor deprecated

func (*FindingAid) Descriptor() ([]byte, []int)

Deprecated: Use FindingAid.ProtoReflect.Descriptor instead.

func (*FindingAid) GetArchiveID

func (x *FindingAid) GetArchiveID() string

func (*FindingAid) GetArchiveTitle

func (x *FindingAid) GetArchiveTitle() string

func (*FindingAid) GetDuuid

func (x *FindingAid) GetDuuid() string

func (*FindingAid) GetFileCount

func (x *FindingAid) GetFileCount() int32

func (*FindingAid) GetFiles

func (x *FindingAid) GetFiles() []*File

func (*FindingAid) GetFilterTypes added in v0.2.1

func (x *FindingAid) GetFilterTypes() []string

func (*FindingAid) GetHasOnlyTiles

func (x *FindingAid) GetHasOnlyTiles() bool

func (*FindingAid) GetHasScanNavigation added in v0.3.0

func (x *FindingAid) GetHasScanNavigation() bool

func (*FindingAid) GetInventoryID

func (x *FindingAid) GetInventoryID() string

func (*FindingAid) GetInventoryPath

func (x *FindingAid) GetInventoryPath() string

func (*FindingAid) GetInventoryTitle

func (x *FindingAid) GetInventoryTitle() string

func (*FindingAid) GetMimeTypes

func (x *FindingAid) GetMimeTypes() map[string]int32

func (*FindingAid) ProtoMessage

func (*FindingAid) ProtoMessage()

func (*FindingAid) ProtoReflect

func (x *FindingAid) ProtoReflect() protoreflect.Message

func (*FindingAid) Reset

func (x *FindingAid) Reset()

func (*FindingAid) String

func (x *FindingAid) String() string

type Pager

type Pager struct {
	HasNext      bool  `protobuf:"varint,1,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	HasPrevious  bool  `protobuf:"varint,2,opt,name=hasPrevious,proto3" json:"hasPrevious,omitempty"`
	TotalCount   int32 `protobuf:"varint,3,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	NrPages      int32 `protobuf:"varint,4,opt,name=nrPages,proto3" json:"nrPages,omitempty"`
	PageCurrent  int32 `protobuf:"varint,5,opt,name=pageCurrent,proto3" json:"pageCurrent,omitempty"`
	PageNext     int32 `protobuf:"varint,6,opt,name=pageNext,proto3" json:"pageNext,omitempty"`
	PagePrevious int32 `protobuf:"varint,7,opt,name=pagePrevious,proto3" json:"pagePrevious,omitempty"`
	PageSize     int32 `protobuf:"varint,8,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// Optional property where the result is centered around.
	ActiveFilename string `protobuf:"bytes,9,opt,name=activeFilename,proto3" json:"activeFilename,omitempty"`
	// The index of the place of the active File in the Files array.
	ActiveSortKey int32 `protobuf:"varint,10,opt,name=activeSortKey,proto3" json:"activeSortKey,omitempty"`
	// Optional. When the request was a paging request, i.e. without the FindingAid block.
	Paging bool `protobuf:"varint,11,opt,name=paging,proto3" json:"paging,omitempty"`
	// contains filtered or unexported fields
}

func NewPager

func NewPager(total int64, request *ViewRequest) (Pager, error)

NewPager creates a new Pager with all navigation settings.

func (*Pager) Descriptor deprecated

func (*Pager) Descriptor() ([]byte, []int)

Deprecated: Use Pager.ProtoReflect.Descriptor instead.

func (*Pager) GetActiveFilename

func (x *Pager) GetActiveFilename() string

func (*Pager) GetActiveSortKey

func (x *Pager) GetActiveSortKey() int32

func (*Pager) GetHasNext

func (x *Pager) GetHasNext() bool

func (*Pager) GetHasPrevious

func (x *Pager) GetHasPrevious() bool

func (*Pager) GetNrPages

func (x *Pager) GetNrPages() int32

func (*Pager) GetPageCurrent

func (x *Pager) GetPageCurrent() int32

func (*Pager) GetPageNext

func (x *Pager) GetPageNext() int32

func (*Pager) GetPagePrevious

func (x *Pager) GetPagePrevious() int32

func (*Pager) GetPageSize

func (x *Pager) GetPageSize() int32

func (*Pager) GetPaging

func (x *Pager) GetPaging() bool

func (*Pager) GetTotalCount

func (x *Pager) GetTotalCount() int32

func (*Pager) ProtoMessage

func (*Pager) ProtoMessage()

func (*Pager) ProtoReflect

func (x *Pager) ProtoReflect() protoreflect.Message

func (*Pager) Reset

func (x *Pager) Reset()

func (*Pager) SetPage

func (p *Pager) SetPage(sortKey int32)

SetPage takes a sortKey and gives back on which page this can be found.

func (*Pager) String

func (x *Pager) String() string

type Values added in v0.2.1

type Values struct {

	// The display label
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// List of metadata string values
	Text []string `protobuf:"bytes,2,rep,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Values) Descriptor deprecated added in v0.2.1

func (*Values) Descriptor() ([]byte, []int)

Deprecated: Use Values.ProtoReflect.Descriptor instead.

func (*Values) GetLabel added in v0.2.1

func (x *Values) GetLabel() string

func (*Values) GetText added in v0.2.1

func (x *Values) GetText() []string

func (*Values) ProtoMessage added in v0.2.1

func (*Values) ProtoMessage()

func (*Values) ProtoReflect added in v0.2.1

func (x *Values) ProtoReflect() protoreflect.Message

func (*Values) Reset added in v0.2.1

func (x *Values) Reset()

func (*Values) String added in v0.2.1

func (x *Values) String() string

type ViewRequest

type ViewRequest struct {

	// Required; example 2.13.39
	ArchiveID string `protobuf:"bytes,1,opt,name=archiveID,proto3" json:"archiveID,omitempty"`
	// Either InventoryID or InventoryPath is Required; e.g. 3.1.
	InventoryID string `protobuf:"bytes,2,opt,name=inventoryID,proto3" json:"inventoryID,omitempty"`
	// Either InventoryID or InventoryPath is Required; e.g. @3~3.1.
	InvertoryPath string `protobuf:"bytes,3,opt,name=invertoryPath,proto3" json:"invertoryPath,omitempty"`
	// Optional, defaults to 50 tiledImages per set.
	PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// Optional, defaults to 1.
	Page int32 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"`
	// Optional to jump into a set with this file centered.
	Fileuuid string `protobuf:"bytes,6,opt,name=fileuuid,proto3" json:"fileuuid,omitempty"`
	// Optional to jump into a set with this file centered.
	Filename string `protobuf:"bytes,7,opt,name=filename,proto3" json:"filename,omitempty"`
	// Optional thumbnail configuration options.
	ThumbnailConf string `protobuf:"bytes,8,opt,name=thumbnailConf,proto3" json:"thumbnailConf,omitempty"`
	// Optional. When paging is true the FindingAid block is not included in the response.
	Paging bool `protobuf:"varint,9,opt,name=paging,proto3" json:"paging,omitempty"`
	// Optional. sortKey is an integer representing the order of the file in the files array.
	// Note: starts at 1, i.e. not zero-based.
	SortKey int64 `protobuf:"varint,10,opt,name=sortKey,proto3" json:"sortKey,omitempty"`
	// contains filtered or unexported fields
}

func (*ViewRequest) Descriptor deprecated

func (*ViewRequest) Descriptor() ([]byte, []int)

Deprecated: Use ViewRequest.ProtoReflect.Descriptor instead.

func (*ViewRequest) GetArchiveID

func (x *ViewRequest) GetArchiveID() string

func (*ViewRequest) GetFilename

func (x *ViewRequest) GetFilename() string

func (*ViewRequest) GetFileuuid

func (x *ViewRequest) GetFileuuid() string

func (*ViewRequest) GetInventoryID

func (x *ViewRequest) GetInventoryID() string

func (*ViewRequest) GetInvertoryPath

func (x *ViewRequest) GetInvertoryPath() string

func (*ViewRequest) GetPage

func (x *ViewRequest) GetPage() int32

func (*ViewRequest) GetPageSize

func (x *ViewRequest) GetPageSize() int32

func (*ViewRequest) GetPaging

func (x *ViewRequest) GetPaging() bool

func (*ViewRequest) GetSortKey

func (x *ViewRequest) GetSortKey() int64

func (*ViewRequest) GetThumbnailConf

func (x *ViewRequest) GetThumbnailConf() string

func (*ViewRequest) ProtoMessage

func (*ViewRequest) ProtoMessage()

func (*ViewRequest) ProtoReflect

func (x *ViewRequest) ProtoReflect() protoreflect.Message

func (*ViewRequest) Reset

func (x *ViewRequest) Reset()

func (*ViewRequest) String

func (x *ViewRequest) String() string

type ViewResponse

type ViewResponse struct {

	// The block with the page
	Pager *Pager `protobuf:"bytes,1,opt,name=pager,proto3" json:"pager,omitempty"`
	// Optional. The FindingAid is only shown on the first request and is empty for paging requests.
	FindingAid *FindingAid `protobuf:"bytes,2,opt,name=findingAid,proto3" json:"findingAid,omitempty"`
	// Sorted by filename.
	Files []*File `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

func (*ViewResponse) Descriptor deprecated

func (*ViewResponse) Descriptor() ([]byte, []int)

Deprecated: Use ViewResponse.ProtoReflect.Descriptor instead.

func (*ViewResponse) GetFiles

func (x *ViewResponse) GetFiles() []*File

func (*ViewResponse) GetFindingAid

func (x *ViewResponse) GetFindingAid() *FindingAid

func (*ViewResponse) GetPager

func (x *ViewResponse) GetPager() *Pager

func (*ViewResponse) ProtoMessage

func (*ViewResponse) ProtoMessage()

func (*ViewResponse) ProtoReflect

func (x *ViewResponse) ProtoReflect() protoreflect.Message

func (*ViewResponse) Reset

func (x *ViewResponse) Reset()

func (*ViewResponse) String

func (x *ViewResponse) String() string

type ViewType

type ViewType int32
const (
	// Default type.
	ViewType_DOWNLOADONLY ViewType = 0
	// DZI tiles.
	ViewType_DZI ViewType = 1
	// JPEG files for thumbnails.
	ViewType_JPEG  ViewType = 2
	ViewType_PDF   ViewType = 3
	ViewType_AUDIO ViewType = 4
	ViewType_VIDEO ViewType = 5
)

func (ViewType) Descriptor

func (ViewType) Descriptor() protoreflect.EnumDescriptor

func (ViewType) Enum

func (x ViewType) Enum() *ViewType

func (ViewType) EnumDescriptor deprecated

func (ViewType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ViewType.Descriptor instead.

func (ViewType) Number

func (x ViewType) Number() protoreflect.EnumNumber

func (ViewType) String

func (x ViewType) String() string

func (ViewType) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL