Server has been upgraded to GitLab release 13.9.6

DocumentsSearchDoc.kt 5.71 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
import com.fasterxml.jackson.annotation.JsonInclude

@JsonInclude(JsonInclude.Include.NON_EMPTY)
25
data class DocumentsSearchDoc(
Jonas Waeber's avatar
Jonas Waeber committed
26 27 28 29 30 31 32 33
    // 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
45 46 47 48
    val format: List<EnrichedFacetContainer>,
    val genre: List<EnrichedFacetContainer>,
    val language: List<EnrichedFacetContainer>,
    val keywords: LanguageContainer,
Jonas Waeber's avatar
Jonas Waeber committed
49 50

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

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

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

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

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

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

83 84 85 86 87
    val memoriavClaim: Boolean,

    // Digital Object
    val durationDigital: List<String>,
    val colourDigital: List<String>,
88
    val locator: String,
89 90 91 92 93 94
    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
95 96 97
    // enriched from digital object
    val digital: EnrichedDigitalMetadata,

98 99 100 101 102 103 104 105 106 107 108
    // 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>,

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

Jonas Waeber's avatar
Jonas Waeber committed
111 112 113
    // internal fields
    val published: Boolean,

Jonas Waeber's avatar
Jonas Waeber committed
114 115
    // auto complete source
    val suggest: SuggestContainer
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
) : Schema(recordId) {

    companion object {
        val DEFAULT = DocumentsSearchDoc(
            emptyList(),
            emptyList(),
            emptyList(),
            "NoDocumentTypeDefined",
            "NoSourceIdFound",
            "https://memobase.ch/record/TestIdentifier",
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
136
            LanguageContainer.EMPTY,
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            FacetContainer.placeholder("NoRecordSetInRecord"),
            false,
            emptyList(),
            emptyList(),
            "",
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            EnrichedDigitalMetadata(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            emptyList(),
            false,
            SuggestContainer(emptyList(), emptyList(), emptyList(), emptyList())
        )
    }
}