In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

DocumentsSearchDoc.kt 6.26 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
18
19
20
/*
 * 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/>.
 */

package org.memobase.model

21
import com.fasterxml.jackson.annotation.JsonIgnore
Jonas Waeber's avatar
Jonas Waeber committed
22
import com.fasterxml.jackson.annotation.JsonInclude
23
import org.memobase.model.SimpleFacetContainer.Companion
Jonas Waeber's avatar
Jonas Waeber committed
24
25

@JsonInclude(JsonInclude.Include.NON_EMPTY)
26
data class DocumentsSearchDoc(
Jonas Waeber's avatar
Jonas Waeber committed
27
28
29
30
31
32
    // Titles
    val title: List<LanguageContainer>,
    val seriesTitle: List<LanguageContainer>,
    val broadcastTitle: List<LanguageContainer>,

    // Datatype properties
33
    val type: FacetContainer,
Jonas Waeber's avatar
Jonas Waeber committed
34
    val sourceID: String,
Jonas Waeber's avatar
Jonas Waeber committed
35
    val oldMemobaseId: String,
36
37
    @JsonIgnore
    private val recordId: String,
Jonas Waeber's avatar
Jonas Waeber committed
38
39
40
41
42
43
    val abstract: List<LanguageContainer>,
    val descriptiveNote: List<LanguageContainer>,
    val scopeAndContent: List<LanguageContainer>,
    val source: List<LanguageContainer>,
    val relatedMaterial: List<LanguageContainer>,
    val rightsHolder: List<LanguageContainer>,
44
    val conditionsOfUse: List<LanguageContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
45
46
47
    val sameAs: List<String>,

    // Concepts
48
49
50
51
    val format: List<EnrichedFacetContainer>,
    val genre: List<EnrichedFacetContainer>,
    val language: List<EnrichedFacetContainer>,
    val keywords: LanguageContainer,
Jonas Waeber's avatar
Jonas Waeber committed
52
53

    // Agents
54
55
56
57
58
    val personSubject: List<AgentWithRelationContainer>,
    val personCreator: List<AgentWithRelationContainer>,
    val personContributor: List<AgentWithRelationContainer>,
    val personPublisher: List<AgentWithRelationContainer>,
    val personProducer: List<AgentWithRelationContainer>,
59
    val personsFacet: SimpleFacetContainer,
Jonas Waeber's avatar
Jonas Waeber committed
60

61
62
63
64
65
    val corporateBodySubject: List<AgentWithRelationContainer>,
    val corporateBodyCreator: List<AgentWithRelationContainer>,
    val corporateBodyContributor: List<AgentWithRelationContainer>,
    val corporateBodyPublisher: List<AgentWithRelationContainer>,
    val corporateBodyProducer: List<AgentWithRelationContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
66

67
68
69
70
71
    val agentSubject: List<AgentWithRelationContainer>,
    val agentCreator: List<AgentWithRelationContainer>,
    val agentContributor: List<AgentWithRelationContainer>,
    val agentPublisher: List<AgentWithRelationContainer>,
    val agentProducer: List<AgentWithRelationContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
72
73

    // Places
Jonas Waeber's avatar
Jonas Waeber committed
74
75
    val placeRelated: List<FacetContainer>,
    val placeCapture: List<FacetContainer>,
76
    val placeFacet: SimpleFacetContainer,
Jonas Waeber's avatar
Jonas Waeber committed
77
78
79
80
81
82

    // Dates
    val temporal: List<DateContainer>,
    val dateCreated: List<DateContainer>,
    val dateIssued: List<DateContainer>,

83
    // Relations
Jonas Waeber's avatar
Jonas Waeber committed
84
85
    val institution: List<FacetContainer>,
    val recordSet: FacetContainer,
Jonas Waeber's avatar
Jonas Waeber committed
86

87
88
89
90
91
    val memoriavClaim: Boolean,

    // Digital Object
    val durationDigital: List<String>,
    val colourDigital: List<String>,
Jonas Waeber's avatar
Jonas Waeber committed
92
    val locator: String?,
Jonas Waeber's avatar
Jonas Waeber committed
93
    val mediaLocation: String?,
94
    val accessDigital: List<FacetContainer>,
95
    val usageDigital: List<String>,
96
    val usageDigitalGroup: List<FacetContainer>,
97
98
99
    val digitalObjectNote: List<LanguageContainer>,
    val usageConditionsDigital: List<LanguageContainer>,

Jonas Waeber's avatar
Jonas Waeber committed
100
101
102
    // enriched from digital object
    val digital: EnrichedDigitalMetadata,

103
104
105
    // Physical Object
    val durationPhysical: List<String>,
    val callNumber: List<String>,
106
    val accessPhysical: List<FacetContainer>,
107
108
109
110
111
112
    val usagePhysical: List<String>,
    val physicalCharacteristics: List<LanguageContainer>,
    val colourPhysical: List<LanguageContainer>,
    val usageConditionsPhysical: List<LanguageContainer>,
    val physicalObjectNote: List<LanguageContainer>,

113
114
    // Combined Physical & Digital
    val access: List<FacetContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
115

Jonas Waeber's avatar
Jonas Waeber committed
116
117
118
    // internal fields
    val published: Boolean,

Jonas Waeber's avatar
Jonas Waeber committed
119
120
    // auto complete source
    val suggest: SuggestContainer
121
122
123
) : Schema(recordId) {

    companion object {
124
125
126
        private val otherDocumentTypeLanguageContainer =
            LanguageContainer(listOf("Andere"), listOf("Autres"), listOf("Altri"), emptyList())

127
128
129
130
        val DEFAULT = DocumentsSearchDoc(
            emptyList(),
            emptyList(),
            emptyList(),
131
132
            FacetContainer(
                otherDocumentTypeLanguageContainer,
133
                "Andere",
134
135
                emptyList()
            ),
136
            "NoSourceIdFound",
Jonas Waeber's avatar
Jonas Waeber committed
137
            "",
Jonas Waeber's avatar
Jonas Waeber committed
138
            "TestIdentifier",
139
140
141
142
143
144
145
146
147
148
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
149
            emptyList(),
150
            LanguageContainer.EMPTY,
151
152
153
154
155
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
156
            SimpleFacetContainer.EMPTY,
157
158
159
160
161
162
163
164
165
166
167
168
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
169
            SimpleFacetContainer.EMPTY,
170
171
172
            emptyList(),
            emptyList(),
            emptyList(),
173
174
            emptyList(),
            FacetContainer.EMPTY,
175
176
177
            false,
            emptyList(),
            emptyList(),
Jonas Waeber's avatar
Jonas Waeber committed
178
            null,
Jonas Waeber's avatar
Jonas Waeber committed
179
            null,
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            EnrichedDigitalMetadata(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            false,
            SuggestContainer(emptyList(), emptyList(), emptyList(), emptyList())
        )
    }
}