SearchDoc.kt 4.04 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
23
24
25
26
27
28
29
30
31
32
33
import com.fasterxml.jackson.annotation.JsonInclude

@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class SearchDoc(
    // Titles
    val title: List<LanguageContainer>,
    val seriesTitle: List<LanguageContainer>,
    val broadcastTitle: List<LanguageContainer>,

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

    // Concepts
Jonas Waeber's avatar
Jonas Waeber committed
45
46
    val genre: List<FacetContainer>,
    val keywords: List<FacetContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
47
48
    val languageContent: List<LanguageContainer>,
    val languageCaption: List<LanguageContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
49
    val language: List<FacetContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
50
51

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

59
60
61
62
63
    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
64

65
66
67
68
69
    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
70
71

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

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

Jonas Waeber's avatar
Jonas Waeber committed
81
82
    val institution: List<FacetContainer>,
    val recordSet: FacetContainer,
Jonas Waeber's avatar
Jonas Waeber committed
83

84
85
86
87
88
    val memoriavClaim: Boolean,

    // Digital Object
    val durationDigital: List<String>,
    val colourDigital: List<String>,
89
    val locator: String,
90
91
92
93
94
95
    val accessDigital: List<String>,
    val usageDigital: List<String>,
    val usageDigitalGroup: List<String>,
    val digitalObjectNote: List<LanguageContainer>,
    val usageConditionsDigital: List<LanguageContainer>,

Jonas Waeber's avatar
Jonas Waeber committed
96
97
98
    // enriched from digital object
    val digital: EnrichedDigitalMetadata,

99
100
101
102
103
104
105
106
107
    // Physical Object
    val durationPhysical: List<String>,
    val callNumber: List<String>,
    val accessPhysical: List<String>,
    val usagePhysical: List<String>,
    val physicalCharacteristics: List<LanguageContainer>,
    val colourPhysical: List<LanguageContainer>,
    val usageConditionsPhysical: List<LanguageContainer>,
    val physicalObjectNote: List<LanguageContainer>,
Jonas Waeber's avatar
Jonas Waeber committed
108
    val format: List<FacetContainer>,
109
110

    // Combined
Jonas Waeber's avatar
Jonas Waeber committed
111
112
    val access: List<String>,

Jonas Waeber's avatar
Jonas Waeber committed
113
114
115
    // internal fields
    val published: Boolean,

Jonas Waeber's avatar
Jonas Waeber committed
116
117
    // auto complete source
    val suggest: SuggestContainer
118
) : Schema(recordId)