RecordSetSearchDoc.kt 4.65 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * search-doc-service
 * Copyright (C) 2020 Memoriav
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
18
19
20
21
22
23
24
25
26
27
28
package org.memobase.model

import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonInclude


@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class RecordSetSearchDoc(
    @JsonIgnore
    val recordSetId: String,
    val isPublished: Boolean,
Jonas Waeber's avatar
Jonas Waeber committed
29
    val name: LanguageContainer,
30

Jonas Waeber's avatar
Jonas Waeber committed
31
32
33
    // Display
    val keyVisualLink: String,
    val numberOfDocuments: Int,
34
    // Facets
35
    val documentType: List<FacetContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
36
    val periodOfTimeAsYear: IntegerRange?,
37
    val supportedByMemoriav: Boolean,
Jonas Waeber's avatar
Jonas Waeber committed
38
    val languageOfMetadata: List<FacetContainer>,
39
40
    val institution: FacetContainer,

41
42
43
    // Sort
    val lastUpdatedDate: String,

44
    // Search
Jonas Waeber's avatar
Jonas Waeber committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    val scopeAndContent: LanguageContainer?,
    val accessMemobase: LanguageContainer?,
    val context: LanguageContainer?,
    val originalTitle: LanguageContainer?,
    val extent: LanguageContainer?,
    val selection: LanguageContainer?,
    val indexing: LanguageContainer?,
    val rights: LanguageContainer?,
    val description: LanguageContainer?,
    val access: LanguageContainer?,
    val project: LanguageContainer?,
    val relatedRecordSets: LanguageContainer?,
    val relatedPublications: LanguageContainer?,
    val relatedDocuments: LanguageContainer?,
    val dataImport: LanguageContainer?
60
61
62
) : Schema(recordSetId) {

    companion object {
Jonas Waeber's avatar
Jonas Waeber committed
63
64
        const val lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
        const val placeholderTitle = "Placeholder Title"
65
66
67
68
        val DEFAULT = RecordSetSearchDoc(
            recordSetId = "NoRecordSetId",
            name = LanguageContainer.placeholder("TEST_RECORD_SET"),
            isPublished = false,
69
            documentType = listOf(FacetContainer(
70
71
72
                LanguageContainer.placeholder("TEST DOCUMENT TYPE"),
                filter = "",
                facet = emptyList()
73
            )),
74
            supportedByMemoriav = true,
Jonas Waeber's avatar
Jonas Waeber committed
75
            languageOfMetadata = listOf(FacetContainer(
76
77
78
                LanguageContainer.placeholder("TEST LANGUAGE"),
                filter = "",
                facet = emptyList()
Jonas Waeber's avatar
Jonas Waeber committed
79
            )),
80
81
            institution = FacetContainer(
                LanguageContainer.placeholder("TEST INSTITUTION"),
82
                filter = "INSTITUTION_IDENTIFIER",
83
84
                facet = emptyList()
            ),
85
            periodOfTimeAsYear = IntegerRange(2000, 2020),
86
            lastUpdatedDate = "2020-11-20T10:29:01.128",
87
            keyVisualLink = "https://mb-wf1.memobase.unibas.ch/sites/default/files/styles/teaser/public/2020-10/1.jpg?itok=5ncVBnVQ",
Jonas Waeber's avatar
Jonas Waeber committed
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
            numberOfDocuments = 100,
            scopeAndContent = LanguageContainer.placeholder(lorem),
            accessMemobase = LanguageContainer.placeholder(lorem),
            context = LanguageContainer.placeholder(lorem),
            originalTitle = LanguageContainer.placeholder(placeholderTitle),
            extent = LanguageContainer.placeholder(lorem),
            selection = LanguageContainer.placeholder(lorem),
            indexing = LanguageContainer.placeholder(lorem),
            rights = LanguageContainer.placeholder(lorem),
            description = LanguageContainer.placeholder(lorem),
            access = LanguageContainer.placeholder(lorem),
            project = LanguageContainer.placeholder(placeholderTitle),
            relatedRecordSets = LanguageContainer.placeholder(placeholderTitle),
            relatedPublications = LanguageContainer.placeholder(placeholderTitle),
            relatedDocuments = LanguageContainer.placeholder(placeholderTitle),
            dataImport = LanguageContainer.placeholder(lorem)
104
        )
Jonas Waeber's avatar
Jonas Waeber committed
105
106


107
108
    }
}