diff --git a/app/models/GndOntology.java b/app/models/GndOntology.java
index 6ab504b..6edefe1 100644
--- a/app/models/GndOntology.java
+++ b/app/models/GndOntology.java
@@ -67,6 +67,7 @@ public class GndOntology {
try {
process("conf/geographic-area-code.rdf");
process("conf/gender.rdf");
+ process("conf/description-level.rdf");
process("conf/gnd-sc.rdf");
process("conf/gnd.rdf");
process("conf/agrelon.rdf");
@@ -149,8 +150,10 @@ public static String type(String property) {
}
private static String ontologyLabel(String id) {
- String key = id.contains("#") ? id.split("#")[1] : id;
- String result = labels.get(key);
+ String result = labels.get(id);
+ if (result == null && id.contains("#")) {
+ result = labels.get(id.split("#")[1]);
+ }
return result == null ? id : result;
}
@@ -183,7 +186,9 @@ private static void process(String f) throws SAXException, IOException {
selector("label"), //
selector("prefLabel"))).filter(attr("lang", "de")).content();
if (label != null) {
- labels.put(shortId, label.replaceAll("\\s+", " ").replace("hat ", ""));
+ String value = label.replaceAll("\\s+", " ").replace("hat ", "");
+ labels.put(shortId, value);
+ labels.put(classId, value);
}
}
});
diff --git a/conf/description-level.rdf b/conf/description-level.rdf
new file mode 100644
index 0000000..d3b4d68
--- /dev/null
+++ b/conf/description-level.rdf
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+2022-09-03
+
+New Value Vocabulary
+
+ GND-Katalogisierungslevel ist ein RDF value vocabulary (skos:ConceptScheme),
+ das die möglichen Werte auflistet, die Angaben zum Katalogisierungslevel in der RDF-Ausgabe der Gemeinsamen
+ Normdatei (GND) haben können. Mehr Informationen dazu unter https://wiki.dnb.de/download/attachments/50759357/005.pdf
+ GND-Katalogisierungslevel
+ 2022-09-03
+
+ Copyright 2022 Deutsche Nationalbibliothek
+ https://d-nb.info/standards/vocab/gnd/description-level#
+ GND Description Level is a value vocabulary (skos:ConceptScheme) listing
+ the possible description level values used in the RDF encoding of the information in the Integrated
+ Authority File (Gemeinsame Normdatei, GND). More information on this scale at https://wiki.dnb.de/download/attachments/50759357/005.pdf (in german)
+
+ 2022-09-03T10:30:00+02:00
+ gnd-dl
+ GND Description Level
+
+ 1.0
+ 2022-09-03
+
+
+
+
+
+
+
+ Die möglichen Instanzen dieser Klasse sind beschränkt auf diejenigen
+ skos:Concepts, die zum Concept Scheme <https://d-nb.info/standards/vocab/gnd/description-level#> gehören.
+ The possible members of this class is restricted to those skos:Concepts
+ that are in the Concept Scheme <https://d-nb.info/standards/vocab/gnd/description-level#>.
+ Katalogisierungslevel
+ Description Level
+
+
+ Description Level 7
+ Katalogisierungslevel 7
+
+
+
+ Description Level z
+ Katalogisierungslevel z
+
+
+
+ Description Level 3
+ Katalogisierungslevel 3
+
+
+
+ Description Level 4
+ Katalogisierungslevel 4
+
+
+
+ Description Level 5
+ Katalogisierungslevel 5
+
+
+
+ Description Level 6
+ Katalogisierungslevel 6
+
+
+
+ Description Level 1
+ Katalogisierungslevel 1
+
+
+
+ Description Level 2
+ Katalogisierungslevel 2
+
+
+
diff --git a/test/models/GndOntologyLabelTests.java b/test/models/GndOntologyLabelTests.java
index a4ab568..4158b55 100644
--- a/test/models/GndOntologyLabelTests.java
+++ b/test/models/GndOntologyLabelTests.java
@@ -39,6 +39,7 @@ public static Collection