RICO.kt 3.72 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 * mapper-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.rdf

import org.apache.jena.rdf.model.Property
import org.apache.jena.rdf.model.Resource
import org.apache.jena.rdf.model.ResourceFactory

object RICO {

    // Classes

    val Record = res("Record")
    val Instantiation = res("Instantiation")
    val Title = res("Title")
    val Language = res("Language")
    val Identifier = res("Identifier")
    val Place = res("Place")
    val Agent = res("Agent")
    val Person = res("Person")
    val CorporateBody = res("CorporateBody")
    val Rule = res("Rule")

    val CreationRelation = res("CreationRelation")

    val SingleDate = res("SingleDate")
    val DateRange = res("DateRange")
    val DateSet = res("DateSet")

    // datatype properties

    val title: Property = prop("title")
    val source: Property = prop("source")
    val descriptiveNote: Property = prop( "descriptiveNote")
    val name: Property = prop( "name")
    val type: Property = prop( "type")
    val expressedDate: Property = prop( "expressedDate")
    val normalizedDateValue: Property = prop( "normalizedDateValue")
    val normalizedValue: Property = prop( "normalizedValue")
    val scopeAndContent: Property = prop( "scopeAndContent")
    val physicalCharacteristics: Property = prop( "physicalCharacteristics")
    val conditionsOfUse: Property = prop("conditionsOfUse")
    val conditionsOfAccess: Property = prop("conditionsOfAccess")

    // Object Properties

    val hasTitle: Property = prop( "hasTitle")
    val isTitleOf: Property = prop( "isTitleOf")
    val hasLanguage: Property = prop( "hasLanguage")
    val isLanguageOf: Property = prop( "isLanguageOf")

    val identifiedBy: Property = prop("identifiedBy")
    val identifies: Property = prop("identifies")
    val identifier: Property = prop("identifier")

    val hasSubject: Property = prop( "hasSubject")

    val publishedBy: Property = prop("publishedBy")

    val heldBy: Property = prop( "heldBy")
    val isPartOf: Property = prop( "isPartOf")
    val hasProvenance: Property = prop("hasProvenance")
79
    val hasLocation: Property = prop("hasLocation")
Jonas Waeber's avatar
Jonas Waeber committed
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

    val instantiates: Property = prop("instantiates")
    val hasInstantiation: Property = prop("hasInstantiation")
    val hasDerivedInstantiation: Property = prop("hasDerivedInstantiation")
    val isDerivedFromInstantiation: Property = prop("isDerivedFromInstantiation")

    val creationRelationHasSource: Property = prop("creationRelationHasSource")
    val creationRelationHasTarget: Property = prop("creationRelationHasTarget")
    val recordResourceOrInstantiationIsSourceOfCreationRelation: Property = prop("recordResourceOrInstantiationIsSourceOfCreationRelation")

    val regulates: Property = prop("regulates")
    val intellectualPropertyRightsHeldBy: Property = prop("intellectualPropertyRightsHeldBy")
    val regulatedBy: Property = prop("regulatedBy")

    private fun prop(name: String): Property {
        return ResourceFactory.createProperty(NS.rico, name)
    }

    private fun res(name: String): Resource {
        return ResourceFactory.createResource(NS.rico + name)
    }
}