WD.kt 930 Bytes
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
7
8
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 WD {

Jonas Waeber's avatar
Jonas Waeber committed
9
10
    val location = res("Q17334923")
    val switzerland = res("Q39")
Jonas Waeber's avatar
Jonas Waeber committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31


    val isil = prop("P791")
    val street = prop("P669")
    val streetNumber = prop("P670")
    val streetAddress = prop("P6375")
    val adminUnit = prop("P131")
    val postalCode = prop("P281")
    val country = prop("P17")
    val website = prop("P856")
    val emailAddress = prop("P968")
    val onlineArchive = prop("P2699")
    val coordinates = prop("P625")
    val image = prop("P18")
    val logo = prop("P154")
    val typeOfInstitution = prop("P31")

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

Jonas Waeber's avatar
Jonas Waeber committed
32
    fun res(name: String): Resource {
Jonas Waeber's avatar
Jonas Waeber committed
33
34
35
36
        return ResourceFactory.createResource(NS.wd + name)
    }

}