diff --git a/app/controllers/nwbib/Lobid.java b/app/controllers/nwbib/Lobid.java index e3209a7c..0cfab6a0 100644 --- a/app/controllers/nwbib/Lobid.java +++ b/app/controllers/nwbib/Lobid.java @@ -678,6 +678,24 @@ private static String locationPolygon(String location) { return location.contains("|") ? location.split("\\|")[1] : location; } + /** + * @param doc The result JSON doc + * @return A mapping of item IDs (URIs) to item details (JSON strings) + */ + public static Map itemDetails(String doc) { + JsonNode items = Json.parse(doc).findValue("hasItem"); + Map result = new HashMap<>(); + if (items != null && (items.isArray() || items.isTextual())) { + Iterator elements = + items.isArray() ? items.elements() : Arrays.asList(items).iterator(); + while (elements.hasNext()) { + JsonNode nextItem = elements.next(); + result.put(nextItem.get("id").asText(), nextItem.toString()); + } + } + return result; + } + /** * @param doc The result JSON doc * @return A mapping of ISILs to item URIs diff --git a/app/views/advanced.scala.html b/app/views/advanced.scala.html index 55b3d6d2..9b789c62 100644 --- a/app/views/advanced.scala.html +++ b/app/views/advanced.scala.html @@ -6,6 +6,6 @@ @import play.api.libs.json.Json @import play.api.libs.json.JsValue -@main("RPB - Erweiterte Suche") { +@main("BiblioVino - Erweiterte Suche") { @tags.search_advanced("Suchen", person="_", name="_", subject="_") } diff --git a/app/views/details.scala.html b/app/views/details.scala.html index 372d905b..72ac4def 100644 --- a/app/views/details.scala.html +++ b/app/views/details.scala.html @@ -13,6 +13,10 @@ @import play.mvc.Controller.session @import play.cache.Cache +@idAndLabelLink(e: JsValue) = { + @((e\"label").asOpt[String].getOrElse("--")) +} + @pageLink(last: Seq[String], key: String, label: String, tip: String) = { @defining((last.indexOf(session(key))-1,last.indexOf(session(key))+1)) { case (prev,next) =>
  • @@ -66,9 +70,9 @@ *@ @tags.search_form(q)
    - @defining(Lobid.items(doc.toString)) { items => - @defining(!(doc\\"containedIn").isEmpty && (doc\"type").toString.contains("Article")){superordination => -
    + @defining((Lobid.items(doc.toString), Lobid.itemDetails(doc.toString))) { case (items, itemDetails) => + @defining(items.isEmpty && !(doc\\"containedIn").isEmpty && (doc\"type").toString.contains("Article")){superordination => +
    @defining((doc\"rpbId").asOpt[String].getOrElse(q)){ id =>
    @tags.star_button(id) Titeldetails: @@ -80,6 +84,45 @@ }
    + @if(!items.isEmpty || doc.toString.contains("fulltextOnline") || superordination){ +
    +
    + @if(doc.toString.contains("fulltextOnline")){ +
    Online-Ressource:
    +
    + + + + + + @result_field("Link", "fulltextOnline", doc, TableRow.LINKS) +
    +
    + } + @if(superordination){ +
    Bestandsangaben:
    +
    + + + + + + + + + +
    Zum Bestand siehe:@idAndLabelLink((doc\"containedIn").as[Seq[JsValue]].head)
    +
    + } + @if(!superordination && !items.isEmpty && !doc.toString.contains("fulltextOnline")){ + @defining(items.size){num => +
    Bestand in @num Bibliothek@if(num>1){en}:
    + } +
    @tags.items_map(items, itemDetails)
    + } +
    +
    + } } }
    diff --git a/app/views/index.scala.html b/app/views/index.scala.html index bf6078a7..23dacffd 100644 --- a/app/views/index.scala.html +++ b/app/views/index.scala.html @@ -7,7 +7,7 @@ @import play.api.libs.json.JsValue @import controllers.nwbib.Lobid -@main("RPB") { +@main("BiblioVino") { @tags.search_form("")
    @*
    @@ -37,22 +37,26 @@ *@

    - Die Rheinland-Pfälzische Bibliographie (RPB) ist eine regionale Literaturdokumentation des Landes Rheinland-Pfalz, die seit 1991 im Auftrag des damaligen - Ministeriums für Wissenschaft und Weiterbildung erstellt wird. Sie erfasst Literaturnachweise von Büchern, Aufsätzen aus Zeitschriften, Jahrbüchern, Tages- - und Wochenzeitungen sowie Einzelbeiträgen aus Sammelwerken. + Die Bibliographie zur Geschichte und Kultur des Weines ist eine Literaturdokumentation der deutschsprachigen Weinliteratur. Sie erfasst + Literaturnachweise von Büchern, Aufsätzen aus Zeitschriften, Jahrbüchern, Tages- und Wochenzeitungen sowie Einzelbeiträgen aus Sammelwerken. + Wo möglich werden Volltexte als frei zugängliche Digitalisate eingebunden.

    - Die Bibliographie wird von Mitarbeitern des Landesbibliothekszentrums an den Standorten Speyer und Koblenz sowie den wissenschaftlichen Stadtbibliotheken in - Mainz und Trier gemeinsam erarbeitet. Die einzelnen Bibliotheken sind schwerpunktmäßig für die Literatur aus ihrer und über ihre Region zuständig. Rund 1400 - Zeitschriften des Berichtszeitraums 1991 bis heute und andere fortlaufende Werke werden durchgesehen. Die Titel werden in den einzelnen Bibliotheken dezentral - erfasst. Die Rheinische Landesbibliothek des lbz führt das Titelmaterial redaktionell zusammen und betreut mit dem hbz die für die Herstellung der Bibliographie - erforderliche Datenverarbeitung. -

    -

    - Um an die Artikel oder Bücher selbst heranzukommen, empfiehlt es sich, diese über die eigene Bibliothek vor Ort zu beschaffen (z.B. als Buchfernleihe oder als - Aufsatzbestellung über die Fernleihe). -

    -
    + Die Bibliographie wird von Mitarbeitern des Landesbibliothekszentrums bearbeitet. Für die Verzeichnung in der Weinbibliographie werden alle + Veröffentlichungen aus allen Epochen berücksichtigt, die einen inhaltlichen Bezug zu kulturellen und geschichtlichen Aspekten des Weins + haben. Nicht erfasst werden moderne, praktische Aspekte des Weinbaus. Im Wesentlichen wird deutschsprachiges Schrifttum (bei älteren Schriften auch + Latein) ausgewertet. Fremdsprachige Literatur ist vereinzelt zu finden, wird jedoch nicht systematisch erschlossen. Das Landesbibliothekszentrums führt + das Titelmaterial redaktionell zusammen und betreut mit dem hbz die für die Herstellung der Bibliographie erforderliche Datenverarbeitung. +

    +

    + Grundlage der sachlichen Erschließung sind die Schlagwörter gemäß der bundeseinheitlichen Normdatei (GND), die in Kooperation der wissenschaftlichen + Bibliotheken des deutschsprachigen Raumes erstellt und von der Deutschen Nationalbibliothek verwaltet werden. +

    +

    + Um an die Artikel oder Bücher selbst heranzukommen, empfiehlt es sich, diese über die eigene Bibliothek vor Ort zu beschaffen (z.B. als Buchfernleihe + oder als Aufsatzbestellung über die Fernleihe). +

    +
    @* @@ -35,28 +35,26 @@ - RPB + BiblioVino
    @content diff --git a/app/views/search.scala.html b/app/views/search.scala.html index 3c41e220..b176132f 100644 --- a/app/views/search.scala.html +++ b/app/views/search.scala.html @@ -60,7 +60,7 @@ (json\"rpbId").asOpt[String].getOrElse((json\"id").asOpt[String].map(_.replaceAll("https?://lobid.org/resources/","").replaceAll("#!","")).getOrElse("")) } -@main("RPB - Ergebnisliste") { +@main("BiblioVino - Ergebnisliste") { @if(Seq(person, name, subject, id, publisher, issued, word, corporation).exists(!_.isEmpty)){ @tags.search_advanced("Suche aktualisieren", q, person, name, subject, rpbspatial, rpbsubject, id, publisher, issued, sortParam, word=word, corporation=corporation) } else { diff --git a/app/views/stars.scala.html b/app/views/stars.scala.html index dcd8a9fe..27380511 100644 --- a/app/views/stars.scala.html +++ b/app/views/stars.scala.html @@ -18,7 +18,7 @@ } } -@main("RPB - Merkliste") { +@main("BiblioVino - Merkliste") { @if(ids.isEmpty){
    Keine gemerkten Titel. Sie können Titel in der Trefferliste oder der Einzeltrefferanzeige durch Klicken des Sterns hinzufügen. diff --git a/app/views/tags/facets.scala.html b/app/views/tags/facets.scala.html index 8fe2a3e4..40e6bd3c 100644 --- a/app/views/tags/facets.scala.html +++ b/app/views/tags/facets.scala.html @@ -132,12 +132,12 @@

    -
    @facets("Regionen", Application.NWBIB_SPATIAL_FIELD, rpbspatial)
    -
    @facets("Sachgebiete", Application.RPB_SUBJECT_FIELD, rpbsubject)
    @facets("Schlagwörter", Application.SUBJECT_FIELD, if(!urisOnly(subject).isEmpty) urisOnly(subject) else "", "dropup")
    @facets("Publikationstypen", Application.TYPE_FIELD, t, "dropup")
    @facets("Medientypen", Application.MEDIUM_FIELD, medium, "dropup")
    @* +
    @facets("Sachgebiete", Application.RPB_SUBJECT_FIELD, nwbibsubject)
    +
    @facets("Regionen", Application.NWBIB_SPATIAL_FIELD, nwbibspatial)

    @facetToggle("coverage-map"){Raumbezug} @facetLabel(location, locationLabel(location.split("\\|")(0)))

    @coverage_map(q,person,name,subject,id,publisher,issued,medium,rpbspatial,rpbsubject,owner,t,sortParam,location,word,corporation,raw,from,size)
    diff --git a/app/views/tags/items_map.scala.html b/app/views/tags/items_map.scala.html new file mode 100644 index 00000000..7b78fa47 --- /dev/null +++ b/app/views/tags/items_map.scala.html @@ -0,0 +1,134 @@ +@* Copyright 2014-2024 Fabian Steeg, hbz. Licensed under the GPLv2 *@ + +@(items: Map[String,List[String]], itemDetails: Map[String,String]) + +@import play.api.libs.ws.WS +@import play.api.libs.json.JsArray +@import play.api.libs.json.Json +@import play.api.libs.json.JsValue +@import scala.concurrent._ +@import ExecutionContext.Implicits.global +@import scala.concurrent.duration._ +@import play.api.Play.current +@import controllers.nwbib._ +@import play.api.cache.Cache + +@string(value: JsValue) = { @value.asOpt[String].getOrElse("--") } + + + +@**@ + + + +
    + +
    +

    +

    +@map_credits() +

    + + +@if(items.size > 1){Details zum Bestand als Liste anzeigen} + + +@markers(items: Map[String,List[String]]) = { + @for((key,i) <- items.keySet.toList.sortWith((k1:String,k2:String)=>Lobid.compareIsil(k1,k2)).zipWithIndex; + owner = Application.CONFIG.getString("orgs.api")+"/"+key; + json = Json.parse(Lobid.cachedJsonCall(owner).toString); + ownerUrl = if((json\\"url").isEmpty) owner else (json\\"url")(0).as[String]; + ownerName = if((json\\"name").isEmpty) "" else (json\\"name")(0).as[String]) { + @for((itemId,i) <- items(key).zipWithIndex; + shortItemId = itemId.substring(itemId.lastIndexOf(":") + 1, itemId.lastIndexOf("#")); + itemJson = Json.parse(itemDetails(itemId)); + owners = (itemJson\\"heldBy"); + if(!owners.isEmpty); + signatures = (itemJson\\"callNumber"); + signature = if(signatures.isEmpty) "" else signatures(0).as[String]; + urls = (itemJson\\"electronicLocator"); + url = if(urls.isEmpty) "" else urls(0).as[String]; + seeAlso = (itemJson\\"seeAlso"); + opacLink = if(seeAlso.isEmpty) null else seeAlso(0).as[Seq[JsValue]].map(_.as[String])) { + var details = 'Bibliothek:'+ + '@if(!ownerName.isEmpty){@ownerName}else{<Keine Angabe>}' + @if(opacLink!=null){+'Verfügbarkeit:'+'Lokalen Katalog abfragen'}; + tableDetails = details; + if(allTableDetails=='') + allTableDetails += tableDetails; + else + allTableDetails += '' + tableDetails; + var sig = '@if(!signature.isEmpty){Signatur:}@if(!urls.isEmpty){Elektronische Ressource:}'+ + '@if(!url.isEmpty){@shortItemId} else {@if(!signature.isEmpty){@signature}}'; + @for(noteSeq <- (itemJson\"note").asOpt[Seq[String]]; note = noteSeq(0)) {sig += 'Notiz:' + '@note' + '';} + tableDetails += sig; + allTableDetails += sig; + } + @if( + !(json \\ "lon").isEmpty && (json \\ "lon").head.asOpt[String].isDefined && + !(json \\ "lat").isEmpty && (json \\ "lat").head.asOpt[String].isDefined) { + @defining(i) { id => + var lat = @string((json \\ "lat").head) + var lon = @string((json \\ "lon").head) + var latlng@(id) = L.latLng(lat, lon); + var icon@(id) = L.icon({ + iconUrl: '@controllers.routes.Assets.at("javascripts/images/marker-icon-red.png")', + iconSize: [20, 30], + iconAnchor: [10, 30], + popupAnchor: [0, -30] + }); + var marker@(id) = L.marker([lat, lon],{ + title: "@ownerName (@key)", + icon: icon@(id) + }); + markers[latlng@(id).toString()] = marker@(id); + bindPopup@(id)(tableDetails); + marker@(id).on('click', function(e) { + zoomDetails@(id)(); + }); + marker@(id).on('popupclose', function(e) { + map.setView(rlp, 7); + }); + marker@(id).addTo(map); + markerCount++; + if(@items.size == 1){ + bindPopup@(id)(allTableDetails); + zoomDetails@(id)(); + } + function zoomDetails@(id)() { + map.setView(latlng@(id), 17); + marker@(id).openPopup(); + } + function bindPopup@(id)(content) { + marker@(id).bindPopup( + ''+ + content+ + '
    ', + { + keepInView: true, + maxWidth: 250 + }); + } + } + } + } +} diff --git a/app/views/tags/map_credits.scala.html b/app/views/tags/map_credits.scala.html index 3ef0a9d6..7ff669d7 100644 --- a/app/views/tags/map_credits.scala.html +++ b/app/views/tags/map_credits.scala.html @@ -1,9 +1,7 @@ @* Copyright 2015 Fabian Steeg, hbz. Licensed under the GPLv2 *@ -

    - Katalog- und Bestandsdaten von lobid.org unter - CC0 | - Kartenbilder von Wikimedia, - Kartendaten von OpenStreetMap - unter CC-BY-SA -

    \ No newline at end of file +
    + Kartenbilder & -daten von Wikimedia & + OpenStreetMap, + CC-BY-SA +
    \ No newline at end of file diff --git a/app/views/tags/result_doc.scala.html b/app/views/tags/result_doc.scala.html index 67be7015..a49e7b55 100644 --- a/app/views/tags/result_doc.scala.html +++ b/app/views/tags/result_doc.scala.html @@ -131,7 +131,7 @@ types = (agents(0) \ "type").asOpt[Seq[String]].getOrElse(Seq())) { @label - @if(id.isDefined && !id.get.contains("/sw/")){} + @if(id.isDefined && id.get.startsWith("http") && !id.get.contains("/sw/")){} @if(c!=cs.last){ | } } @@ -146,10 +146,6 @@ @for(subject <- subjects; components = (subject \ "componentList").asOpt[Seq[JsValue]].getOrElse(Seq(subject)); component <- components; - sourceLabel = (component\"source"\"label").asOpt[String]; - if !sourceLabel.getOrElse("").contains("Nordrhein-Westfälischen"); - if !sourceLabel.getOrElse("").contains("Rheinland-Pfälzischen"); - if !sourceLabel.getOrElse("").contains("Dewey"); label <- (component \ "label").asOpt[String]; id = (component \ "id").asOpt[String].getOrElse("")) { @label @@ -275,7 +271,7 @@ @raumsystematik("https://rpb.lobid.org/spatial") @sachsystematik("http://purl.org/lobid/rpb") - @subjects((doc \ "subject").asOpt[Seq[JsValue]].getOrElse(Seq()).filter(v => !(v \ "source").toString.contains("Systematik"))) + @subjects((doc \ "subject").asOpt[Seq[JsValue]].getOrElse(Seq()).filter(v => !(v \ "source").toString.matches(".*(Systematik|Notationen|Dewey).*"))) @result_field("Schlagwortfolge", "subjectChain", doc, TableRow.VALUES, valueLabel = Option(Seq())) diff --git a/app/views/tags/search_form.scala.html b/app/views/tags/search_form.scala.html index 0317e3c2..d9dc5621 100644 --- a/app/views/tags/search_form.scala.html +++ b/app/views/tags/search_form.scala.html @@ -12,8 +12,8 @@

    - Aufgrund einer technischen Störung musste die Rheinland-Pfälzische Bibliographie in ihrer bisherigen Form abgeschaltet - werden und auf eine neue Oberfläche umziehen. Bitte beachten Sie, dass es sich hierbei um eine Version handelt, in der - noch nicht alle Funktionen umgesetzt sind. Wir sind bestrebt, dies fortlaufend zu verbessern. + Aufgrund einer technischen Störung musste BiblioVino in seiner bisherigen Form abgeschaltet werden und auf eine neue Oberfläche umziehen. + Bitte beachten Sie, dass es sich hierbei um eine Version handelt, in der noch nicht alle Funktionen umgesetzt sind. + Wir sind bestrebt, dies fortlaufend zu verbessern.
    } \ No newline at end of file diff --git a/conf/nwbib.conf b/conf/nwbib.conf index 23343b86..d4e1e0a2 100644 --- a/conf/nwbib.conf +++ b/conf/nwbib.conf @@ -3,7 +3,7 @@ indexUrlFormat="http://quaoar1:1990/resources/search?q=rpbId:%s&format=json" item.api="http://lobid.org/items" hbz01.api="http://lobid.org/hbz01" orgs.api="http://lobid.org/organisations" -nwbib.filter="inCollection.id:\"http://lobid.org/resources/HT013494180#!\"" +nwbib.filter="inCollection.id:\"http://lobid.org/resources/HT013678171#!\"" secret="" # Embedded Elasticsearch index for classification data diff --git a/public/images/bibliovino.png b/public/images/bibliovino.png new file mode 100644 index 00000000..152138da Binary files /dev/null and b/public/images/bibliovino.png differ diff --git a/public/javascripts/images/marker-icon-red.png b/public/javascripts/images/marker-icon-red.png new file mode 100644 index 00000000..49076928 Binary files /dev/null and b/public/javascripts/images/marker-icon-red.png differ