Added useful VC to resources.json (#800).
Dummy id and pid have been generated from title. We need better pids and
English titles for the VC.
Change-Id: I0981c078cd3506fd7d198bc24230def2b7741342
diff --git a/src/main/java/de/ids_mannheim/korap/annotation/ResourceParser.java b/src/main/java/de/ids_mannheim/korap/annotation/ResourceParser.java
index e5cc73c..7f741a1 100644
--- a/src/main/java/de/ids_mannheim/korap/annotation/ResourceParser.java
+++ b/src/main/java/de/ids_mannheim/korap/annotation/ResourceParser.java
@@ -92,8 +92,9 @@
}
}
catch (Exception e) {
- log.warn("Failed creating resource: " + e.getMessage());
- }
+ log.warn("Failed creating resource: " + resourceId + ". Cause: "
+ + e.getMessage());
+ }
}
}
diff --git a/src/main/resources/data/resources.json b/src/main/resources/data/resources.json
index cc9942f..07b6241 100644
--- a/src/main/resources/data/resources.json
+++ b/src/main/resources/data/resources.json
@@ -50,5 +50,422 @@
],
"corpus_query":"corpusSigle=WUD17",
"institution" : "IDS Mannheim"
-}
+},
+
+ {
+ "id": "Romane",
+ "pid": "Romane",
+ "de_title": "Romane",
+ "en_title": "Roman",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /.*[Rr]oman/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Literatur",
+ "pid": "Literatur",
+ "de_title": "Literatur",
+ "en_title": "Literature",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /(.*[Rr]oman|[Bb]iographie|[Dd]rama|[Ss]schauspiel)/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Usenet-News",
+ "pid": "Usenet-News",
+ "de_title": "Usenet-News",
+ "en_title": "Usenet-News",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle = /NG[A-Z]+/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Wikipedia-Diskussionsseiten",
+ "pid": "Wikipedia-Diskussionsseiten",
+ "de_title": "Wikipedia-Diskussionsseiten",
+ "en_title": "Wikipedia Talk Pages",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle = /W[UD]D[0-9]+/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Zeitungen",
+ "pid": "Zeitungen",
+ "de_title": "Zeitungen",
+ "en_title": "Newletters",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /[^:]*[Zz]eitung.*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Zeitschriften",
+ "pid": "Zeitschriften",
+ "de_title": "Zeitschriften",
+ "en_title": "Magazines",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /(Zeitschrift|Magazin).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Zeitungen_und_Zeitschriften",
+ "pid": "Zeitungen_und_Zeitschriften",
+ "de_title": "Zeitungen und Zeitschriften",
+ "en_title": "Newsletters and Magazines",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /([^:]*[Zz]eitung|Zeitschrift|Magazin).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Agenturmeldungen",
+ "pid": "Agenturmeldungen",
+ "de_title": "Agenturmeldungen",
+ "en_title": "Agenturmeldungen",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = /Agenturmeldung.*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Plenarprotokolle",
+ "pid": "Plenarprotokolle",
+ "de_title": "Plenarprotokolle",
+ "en_title": "Plenarprotokolle",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textTypeRef = /Plenarprotokoll/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Publikumszeitschriften",
+ "pid": "Publikumszeitschriften",
+ "de_title": "Publikumszeitschriften",
+ "en_title": "Publikumszeitschriften",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = \"Zeitschrift: Publikumszeitschrift\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Fachzeitschriften",
+ "pid": "Fachzeitschriften",
+ "de_title": "Fachzeitschriften",
+ "en_title": "Fachzeitschriften",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = \"Zeitschrift: Fachzeitschrift\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "IT-Zeitschriften",
+ "pid": "IT-Zeitschriften",
+ "de_title": "IT-Zeitschriften",
+ "en_title": "IT-Zeitschriften",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textType = \"Zeitschrift: Fachzeitschrift: IT-Magazin\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Wirtschaftsressorts",
+ "pid": "Wirtschaftsressorts",
+ "de_title": "Wirtschaftsressorts",
+ "en_title": "Wirtschaftsressorts",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textDomain = \"Wirtschaft\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Kulturressorts",
+ "pid": "Kulturressorts",
+ "de_title": "Kulturressorts",
+ "en_title": "Kulturressorts",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textDomain = \"Kultur\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Sportressorts",
+ "pid": "Sportressorts",
+ "de_title": "Sportressorts",
+ "en_title": "Sportressorts",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textDomain = \"Sport\"",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Politikressorts",
+ "pid": "Politikressorts",
+ "de_title": "Politikressorts",
+ "en_title": "Politikressorts",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "textDomain = /Politik.*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Stuttgart-21-Dialoge",
+ "pid": "Stuttgart-21-Dialoge",
+ "de_title": "Stuttgart-21-Dialoge (Transkripte aus FOLK)",
+ "en_title": "Stuttgart-21-Dialoge (Transcripts from FOLK)",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle=FOLK",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Kinder-_und_Jugendliteratur",
+ "pid": "Kinder-_und_Jugendliteratur",
+ "de_title": "Kinder- und Jugendliteratur",
+ "en_title": "Kinder- und Jugendliteratur",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle=KJL",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Fußballlinguistik-Korpora",
+ "pid": "Fußballlinguistik-Korpora",
+ "de_title": "Fußballlinguistik-Korpora",
+ "en_title": "Fußballlinguistik-Korpora",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "title=Fußballlinguistik-Korpora",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Orthografisches_Kernkorpus_(OKK)",
+ "pid": "Orthografisches_Kernkorpus_(OKK)",
+ "de_title": "Orthografisches Kernkorpus (OKK)",
+ "en_title": "Orthografisches Kernkorpus (OKK)",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "referTo ratskorpus",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Gingko-Korpus",
+ "pid": "Gingko-Korpus",
+ "de_title": "Gingko-Korpus",
+ "en_title": "Gingko-Korpus",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle=/[AM]TZ.*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "DE_Presse",
+ "pid": "DE_Presse",
+ "de_title": "DE Presse",
+ "en_title": "DE Presse",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "pubPlaceKey=DE and textType = /([^:]*[Zz]eitung|Zeitschrift|Magazin).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "AT_Presse",
+ "pid": "AT_Presse",
+ "de_title": "AT Presse",
+ "en_title": "AT Presse",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "pubPlaceKey=AT and textType = /([^:]*[Zz]eitung|Zeitschrift|Magazin).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "CH_Presse",
+ "pid": "CH_Presse",
+ "de_title": "CH Presse",
+ "en_title": "CH Presse",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "pubPlaceKey=CH and textType = /([^:]*[Zz]eitung|Zeitschrift|Magazin).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Fachzeitschriften_Ingenieur_und_Technik",
+ "pid": "Fachzeitschriften_Ingenieur_und_Technik",
+ "de_title": "Fachzeitschriften Ingenieur und Technik",
+ "en_title": "Fachzeitschriften Ingenieur und Technik",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle=/(ATZ|MTZ|KEM|CAV|MAV|ELI|TER|CHM|CHT|DNV|AUI|IEE|KE|EID|MET|EPP|TUE|ET|PRD|WWT|AUP|AUT|QE|VKU|AUE|EMA|FK|AIT|CHO|EMT).*/",
+ "institution": "IDS Mannheim"
+ },
+ {
+ "id": "Belletristik/Trivialliteratur",
+ "pid": "Belletristik/Trivialliteratur",
+ "de_title": "Belletristik/Trivialliteratur",
+ "en_title": "Belletristik/Trivialliteratur",
+ "layers": [
+ "corenlp/p",
+ "marmot/m",
+ "marmot/p",
+ "opennlp/p",
+ "tt/l",
+ "tt/p"
+ ],
+ "corpus_query": "corpusSigle=/(BIH|BIO|DIV|GOE|GR1|GRI|HES|KJL|LES|THM|WAM)/ or docSigle=/MK1\\/[LMTW].*/ or docSigle=/MK2\\/TRI/",
+ "institution": "IDS Mannheim"
+ }
]
\ No newline at end of file
diff --git a/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java b/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
index 23c8bd7..71df3f1 100644
--- a/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/controller/ResourceControllerTest.java
@@ -20,7 +20,7 @@
.request().get();
String entity = response.readEntity(String.class);
JsonNode n = JsonUtils.readTree(entity);
- assertEquals(3, n.size());
+ assertEquals(29, n.size());
JsonNode n0 = n.get(0);
assertEquals("http://hdl.handle.net/10932/00-03B6-558F-4E10-6201-1",
@@ -49,5 +49,20 @@
assertEquals("https://korap.ids-mannheim.de?cq=corpusSigle=WDD17",
n1.at("/landingPage").asText());
assertEquals("FREE", n1.at("/requiredAccess").asText());
+
+ JsonNode n4 = n.get(4);
+ assertEquals("Literatur",
+ n4.at("/resourceId").asText());
+ assertEquals(n4.at("/titles/de").asText(),
+ "Literatur");
+ assertEquals(n4.at("/titles/en").asText(),
+ "Literature");
+ assertEquals(1, n4.at("/languages").size());
+ assertEquals(6, n4.at("/layers").size());
+ assertEquals("IDS Mannheim", n4.at("/institution").asText());
+ assertEquals("https://korap.ids-mannheim.de?cq=textType = /(.*[Rr]oman|"
+ + "[Bb]iographie|[Dd]rama|[Ss]schauspiel)/",
+ n4.at("/landingPage").asText());
+ assertEquals("FREE", n4.at("/requiredAccess").asText());
}
}
diff --git a/src/test/resources/log4j2-test.properties b/src/test/resources/log4j2-test.properties
index 54fbc8b..ddfeb60 100644
--- a/src/test/resources/log4j2-test.properties
+++ b/src/test/resources/log4j2-test.properties
@@ -20,7 +20,7 @@
rootLogger.appenderRefs = console
rootLogger.appenderRef.stdout.ref = STDOUT
-loggers=hibernate,auth,ldap,krill
+loggers=resource,hibernate,auth,ldap,krill
#loggers=console
#logger.console.name=com.sun.jersey.test.framework.spi.container
#logger.console.level = info
@@ -35,6 +35,11 @@
#logger.file.appenderRef.file.ref = ERRORLOG
#logger.file.additivity=false
+logger.resource.name=de.ids_mannheim.korap.annotation.ResourceParser
+logger.resource.level = warn
+logger.resource.appenderRefs = file
+logger.resource.appenderRef.file.ref = MAIN_LOG
+logger.resource.additivity=false
logger.hibernate.name=org.hibernate
logger.hibernate.level = error