Commit 5d49c75f authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

Merge branch 'release/3.1.1'

parents 1dd93b23 b28366c2
Pipeline #137412 passed with stages
in 7 minutes and 42 seconds
......@@ -66,6 +66,7 @@ package:
- build
except:
- master
- tags
release-image:
stage: package
......
......@@ -38,3 +38,14 @@ Running the tests requires internet access and the services at https://textgridl
Test output is written to `build/reports/tests/test/index.html`
## Development Server / Continuous Build
The gradle build file has the spring-boot-devtools included, which (allow live reloading when classpath changes)[https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-hotswapping]. This works fine when web resources like jsp files or the classpath change. It does not include automatic recompilation when Java code changes. This is what you IDE may do, or gradle with its (continuous build feature)[https://blog.gradle.org/introducing-continuous-build].
For the latter i recommend to open two terminal windows too run two commands parallel. One for the continuous build:
./gradlew classes -t
and one for running the spring-boot dev server:
./gradlew bootRun
......@@ -9,7 +9,7 @@ apply plugin: 'jacoco'
apply plugin: 'war'
group = 'info.textgrid.rep'
version = '3.1.0'
version = '3.1.1'
sourceCompatibility = '1.8'
repositories {
......@@ -28,6 +28,7 @@ dependencies {
implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider'
implementation 'com.atlassian.commonmark:commonmark:0.14.0'
implementation 'info.textgrid.middleware.clients:textgrid-clients:3.4.3'
developmentOnly("org.springframework.boot:spring-boot-devtools")
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
......
# TODO
\ No newline at end of file
# TODO
\ No newline at end of file
Das TextGrid Repository, ein Langzeitarchiv für geisteswissenschaftliche Forschungsdaten, liefert einen umfangreichen,
durchsuch- und nachnutzbaren Bestand XML/TEI-kodierter Texte, Bilder und Datenbanken. Zum stetig wachsenden Bestand
zählen mit der [Digitalen Bibliothek von TextGrid](https://textgrid.de/digitale-bibliothek) heute z.B. Werke von rund 600 Autorinnen und Autoren deutschsprachiger
Belletristik (Prosa, Lyrik, Dramen) und Sachliteratur von den Anfängen des Buchdrucks bis zum frühen 20. Jahrhundert,
die in verschiedenen Ausgabeformaten (z.B. XML, ePub, PDF) gespeichert, publiziert und durchsucht werden können.
Mit verschiedenen Werkzeugen, wie etwa zur Bildbetrachtung oder zur quantitativen Textanalyse, können die Texte
weiter erforscht und visualisiert werden.
Das TextGrid Repository ist ein Langzeitarchiv für geisteswissenschaftliche Forschungsdaten. Es liefert einen umfangreichen, durchsuch- und nachnutzbaren Bestand an Texten und Bildern. An den Grundsätzen von Open Access und den FAIR-Prinzipien orientiert, wurde das TextGrid Repository 2020 mit dem [CoreTrustSeal](https://www.coretrustseal.org/why-certification/certified-repositories/) versehen. Für Forschende bietet das TextGrid Repository eine nachhaltige, dauerhafte und sichere Möglichkeit, zur zitierfähigen Publikation ihrer Forschungsdaten und zur verständlichen Beschreibung derselben durch erforderliche Metadaten. Mehr zum Thema Nachhaltigkeit, FAIR und Open Access im [Mission Statement](/docs/mission-statement) des TextGrid Repository.
Das TextGrid Repository ist Teil der Virtuellen Forschungsumgebung [TextGrid](https://textgrid.de/), die neben dem fachwissenschaftlichen
Langzeitarchiv eine Open Source-Software für die kollaborative Erstellung und Publikation z.B. digitaler Editionen
auf XML/TEI-Basis anbietet.
Die überwiegende Anzahl der Texte ist neben dem Reintextformat auch XML/TEI-kodiert und ermöglicht so vielfältige Nachnutzung. Der Bestand wurde mit dem Erwerb der [Digitalen Bibliothek](https://textgrid.de/de/digitale-bibliothek) aufgebaut und entwickelt sich fortwährend auf der Basis der [TextGrid Community](https://textgrid.de/de/community). Durch zahlreiche Editionsprojekte, die in der virtuellen Forschungsumgebung des [TextGrid Laboratory](https://textgrid.de/de_DE/download) entstehen, sind sowohl Manuskripte (Bilder) als auch Transkriptionen (XML/TEI-kodierte Textdaten) vorhanden (z. B. die [Bibliothek der Neologie](/search?filter=project.value%3aNeologie) oder auch das Projekt zur deutsch-französischen Reisekorrespondenz [Architrave](/search?filter=project.value%3aArchitrave)).
Durch Eingabe eines Suchwortes kann direkt im Bestand gesucht werden; alternativ kann dieser über "Explore"
nach vordefinierten Kategorien (z.B. "Autor", "Genre") angezeigt und aufgerufen werden.
Die Inhalte sind demnach zum Teil projektspezifisch und wachsen im Laufe der Zeit. Grundstock bildet ein umfangreiches Korpus der Weltliteratur vom Beginn des Buchdrucks bis ins 20. Jahrhundert aus Texten von rund 600 Autorinnen und Autoren: die [Digitale Bibliothek](https://textgrid.de/de/digitale-bibliothek). Es handelt sich um Literatur, die in deutscher Sprache geschrieben oder übersetzt wurde. Dennoch hat das TextGrid Repository keine sprachliche Beschränkung und es werden je nach Projektkontext fremdsprachliche Texte hier veröffentlicht.
Die Suche unterstützt die Anfragesprache [Lucene](https://lucene.apache.org/core/); neben der Freitextsuche ermöglicht sie u.a. Anfragen nach
folgendem Muster:
Neben der erweiterten [Suche](/docs/syntax) sind die Inhalte des TextGrid Repository auch explorativ durch Filter [nach Autor](/facet/edition.agent.value?order=term:asc), [nach Genre](/facet/work.genre), [nach Dateityp](/facet/format) und [nach Projekt](https://textgridrep.org/facet/project.value) erkundbar.
[edition.agent.value:goethe AND pudel](/search?query=edition.agent.value%3Agoethe+AND+pudel)
Weitere Informationen zur Suchsyntax, zu Suchkategorien und -filtern finden Sie in der [Hilfe](/doc/syntax).
**Mitmachen**
Möchten Sie eigenes XML-erschlossenes Material im TextGrid Repository zitierfähig archivieren und zugänglich machen?
Nehmen Sie Kontakt mit uns auf: https://textgrid.de/kontakt/
Alle veröffentlichten Inhalte sind nach dem Open-Access-Prinzip frei zugänglich, sollten aber wie gewöhnlich nach dem jeweils angegeben Zitationsvorschlag nachgewiesen werden. Das TextGrid Repository bietet über die [Regalfunktion](/shelf) die Möglichkeit, individuelle Kollektionen zusammenzustellen. Diese können in den Formaten xml oder txt gesammelt heruntergeladen oder direkt mit einer Reihe von digitalen Werkzeugen untersucht werden.
\ No newline at end of file
# Mission Statement
The TextGrid Repository (TextGridRep) is a digital preservation archive for human sciences research data providing a variety of data for teaching and research purposes. It promotes open access to research data including open standards allowing an efficient reuse for research. The TextGridRep also provides researchers with a comprehensive and reliable service to store their data permanently, well described and with a stable reference for citation and reuse.
The TextGridRep is part of the [TextGrid](https://textgrid.de/en/) Virtual Research Environment (VRE), which offers besides digital preservation also open-source software for collaborative creation, analysis and publication of text and images. The TextGrid VRE is optimised for XML/TEI formats and editorial publication out of the TextGrid Laboratory (TextGridLab). An independent publication from the TextGridLab including other types of data and formats is equally possible by tools using the TextGridRep API such as TG-import.
The TextGrid Repository is a community orientated result of a national program to establish a Digital Humanities infrastructure in Germany and operates together with the DARIAH-DE Repository as part of the [Humanities Data Center](https://humanities-data-centre.de/) (HDC).
The mission of the TextGridRep is to serve national and international research, teaching and learning by providing long term preservation, further processing, openly sharing and dissemination of digital research data according to ethical and scientific standards of the international research community.
The repository's mission is in line with the [Open Access strategy of the University of Göttingen](https://www.uni-goettingen.de/en/221506.html) and its [research data policy](http://www.uni-goettingen.de/en/488918.html). It provides all necessary resources to promote and support making the research results of its researchers as widely accessible and usable as possible. This commitment to open access is reflected in the organisational and technical infrastructure as well as in its archiving procedures of the repository to allow the use of publications and data without any access restriction in order “to support research and innovation in science […] and society in a direct and lasting way”.
In terms of [data management](https://wiki.de.dariah.eu/display/TextGrid/Digital+Object+Management), publication and preservation workflows are based on the Open Archiving Information System, see [TextGrid Repository – Digital Object Management](https://wiki.de.dariah.eu/display/TextGrid/Digital+Object+Management#DigitalObjectManagement-TextGridandtheOpenArchivalInformationSystem(OAIS)).
The commitment is strongly supported by the two relevant institutions ensuring also the long-term sustainability of the repository and its data: The [Göttingen State and University Library](https://www.sub.uni-goettingen.de/en/about-us/portrait/) (SUB) and the [Gesellschaft für wissenschaftliche Datenverarbeitung Göttingen mbH](https://www.gwdg.de/about-us) (GWDG).
Both institutions share a commitment to the sustainability of services and to [FAIR principles](https://www.go-fair.org/fair-principles/) in research and its infrastructures. For the SUB research data management is an important aspect of the [strategic aims of Göttingen State and University Library](https://www.sub.uni-goettingen.de/en/about-us/portrait/strategy/#c13124). Not only for research data, but for all digital resources, Göttingen State and University Library follows a [policy](https://www.sub.uni-goettingen.de/en/about-us/portrait/goettingen-state-and-university-library-digital-policies-guiding-principles/), which contains guiding principles in order to ensure the quality for access, metadata and IT architecture.
In the context of open access, the Göttingen State and University Library also participates in national and international projects, such as the [Confederation of Open Access Repositories](https://www.coar-repositories.org/) (COAR) and [OpenAIRE](http://www.openaire.eu/). In this perspective the TextGrid Repository is also in line with open access requirements of important funders of the German research system as the German Research Foundation (DFG) (see <https://www.dfg.de/formulare/2_00/v/dfg_2_00_de_v1215.pdf>, p. 44, section 12.2.1) and the European Union. Mandates of the European Commission and the European Research Council require as stated e.g. in the European Open Access Pilot on Open Data all funded projects to publish their results in Open Access (see the [Horizon 2020 Online Manual](https://ec.europa.eu/research/participants/docs/h2020-funding-guide/cross-cutting-issues/open-access-data-management/open-access_en.htm)). The Research Department at Göttingen University offers detailed information about the [European Union Open Access Pilot](https://www.uni-goettingen.de/en/487290.html) also on its web pages.
# Mission Statement
The TextGrid Repository (TextGridRep) is a digital preservation archive for human sciences research data providing a variety of data for teaching and research purposes. It promotes open access to research data including open standards allowing an efficient reuse for research. The TextGridRep also provides researchers with a comprehensive and reliable service to store their data permanently, well described and with a stable reference for citation and reuse.
The TextGridRep is part of the [TextGrid](https://textgrid.de/en/) Virtual Research Environment (VRE), which offers besides digital preservation also open-source software for collaborative creation, analysis and publication of text and images. The TextGrid VRE is optimised for XML/TEI formats and editorial publication out of the TextGrid Laboratory (TextGridLab). An independent publication from the TextGridLab including other types of data and formats is equally possible by tools using the TextGridRep API such as TG-import.
The TextGrid Repository is a community orientated result of a national program to establish a Digital Humanities infrastructure in Germany and operates together with the DARIAH-DE Repository as part of the [Humanities Data Center](https://humanities-data-centre.de/) (HDC).
The mission of the TextGridRep is to serve national and international research, teaching and learning by providing long term preservation, further processing, openly sharing and dissemination of digital research data according to ethical and scientific standards of the international research community.
The repository's mission is in line with the [Open Access strategy of the University of Göttingen](https://www.uni-goettingen.de/en/221506.html) and its [research data policy](http://www.uni-goettingen.de/en/488918.html). It provides all necessary resources to promote and support making the research results of its researchers as widely accessible and usable as possible. This commitment to open access is reflected in the organisational and technical infrastructure as well as in its archiving procedures of the repository to allow the use of publications and data without any access restriction in order “to support research and innovation in science […] and society in a direct and lasting way”.
In terms of [data management](https://wiki.de.dariah.eu/display/TextGrid/Digital+Object+Management), publication and preservation workflows are based on the Open Archiving Information System, see [TextGrid Repository – Digital Object Management](https://wiki.de.dariah.eu/display/TextGrid/Digital+Object+Management#DigitalObjectManagement-TextGridandtheOpenArchivalInformationSystem(OAIS)).
The commitment is strongly supported by the two relevant institutions ensuring also the long-term sustainability of the repository and its data: The [Göttingen State and University Library](https://www.sub.uni-goettingen.de/en/about-us/portrait/) (SUB) and the [Gesellschaft für wissenschaftliche Datenverarbeitung Göttingen mbH](https://www.gwdg.de/about-us) (GWDG).
Both institutions share a commitment to the sustainability of services and to [FAIR principles](https://www.go-fair.org/fair-principles/) in research and its infrastructures. For the SUB research data management is an important aspect of the [strategic aims of Göttingen State and University Library](https://www.sub.uni-goettingen.de/en/about-us/portrait/strategy/#c13124). Not only for research data, but for all digital resources, Göttingen State and University Library follows a [policy](https://www.sub.uni-goettingen.de/en/about-us/portrait/goettingen-state-and-university-library-digital-policies-guiding-principles/), which contains guiding principles in order to ensure the quality for access, metadata and IT architecture.
In the context of open access, the Göttingen State and University Library also participates in national and international projects, such as the [Confederation of Open Access Repositories](https://www.coar-repositories.org/) (COAR) and [OpenAIRE](http://www.openaire.eu/). In this perspective the TextGrid Repository is also in line with open access requirements of important funders of the German research system as the German Research Foundation (DFG) (see <https://www.dfg.de/formulare/2_00/v/dfg_2_00_de_v1215.pdf>, p. 44, section 12.2.1) and the European Union. Mandates of the European Commission and the European Research Council require as stated e.g. in the European Open Access Pilot on Open Data all funded projects to publish their results in Open Access (see the [Horizon 2020 Online Manual](https://ec.europa.eu/research/participants/docs/h2020-funding-guide/cross-cutting-issues/open-access-data-management/open-access_en.htm)). The Research Department at Göttingen University offers detailed information about the [European Union Open Access Pilot](https://www.uni-goettingen.de/en/487290.html) also on its web pages.
# TODO
\ No newline at end of file
# TODO
\ No newline at end of file
......@@ -90,118 +90,161 @@ public class BrowseController {
String format = metadata.getObject().getGeneric().getProvided().getFormat();
model.addAttribute("format", format);
/*
* Deliver different browse pages based on content type of textgridobject:
* aggregation, xml or image
*/
if (format.contains("tg.aggregation") || format.contains("text/tg.work+xml")) {
handleAggregations(model, i18n, id, format, mode);
} else if (format.equals("text/xml")) {
handleXml(model, i18n, id, metadata, fragment);
} else if (format.contains("image")) {
handleImages(model, id);
}
List<ViewMode> viewmodes = new ArrayList<ViewMode>();
viewmodes
.add(new ViewMode(i18n.get("list"), Utils.browseUrl(id) + "?mode=list", mode.equals("list")));
viewmodes.add(new ViewMode(i18n.get("gallery"), Utils.browseUrl(id) + "?mode=gallery",
mode.equals("gallery")));
return "browse";
}
if (format.equals("text/tg.edition+tg.aggregation+xml")) {
viewmodes.add(new ViewMode("TEI-Corpus", Utils.browseUrl(id) + "?mode=xml", mode.equals("xml")));
/**
* setup browse page to show tools metadata and the like for xml type files, which are now METS/XML or TEI
*
* @param model
* @param i18n
* @param id
* @param metadata
* @param fragment
*/
private void handleXml(Model model, I18N i18n, String id, ResultType metadata, String fragment) {
List<ViewMode> tools = new ArrayList<ViewMode>();
// identifier@type of trier dfg-viewer mets is METSXMLID
// TODO: look into relation/tg:rootElementNamespace
if (!metadata.getObject().getGeneric().getProvided().getIdentifier().isEmpty()
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0) != null
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0)
.getType() != null
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0).getType()
.equals("METSXMLID")) {
try {
String tgcrudUrl4DFGViewer = URLEncoder.encode(
tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", "UTF-8");
tools.add(new ViewMode("DFG-Viewer",
"http://dfg-viewer.de/v3/?set[zoom]=min&set[mets]=" + tgcrudUrl4DFGViewer, false));
} catch (UnsupportedEncodingException e) {
log.error("error encoding url", e);
}
} else { // assume tei-xml
model.addAttribute("viewmodes", viewmodes);
if (mode != null && mode.equals("xml")) {
String teiHtml = this.aggregatorClient.renderTEI(id);
String teiHtml = "";
if (fragment != null) {
teiHtml = this.aggregatorClient.renderTEIFragment(id, fragment);
} else {
teiHtml = this.aggregatorClient.renderTEI(id);
String tocHtml = this.aggregatorClient.renderToc(id);
model.addAttribute("teiHtml", teiHtml);
model.addAttribute("tocHtml", tocHtml);
} else {
log.info("listing agg: " + id);
List<ResultType> results;
if (format.contains("text/tg.work+xml")) {
List<String> editionFilter =
Arrays.asList(new String[] {"format:text/tg.edition+tg.aggregation+xml"});
results = this.tgsearchClientService
.search("isEditionOf:\"" + id + "\"", "relevance", 0, 20, editionFilter, true)
.getResult();
} else {
results = this.tgsearchClientService.listAggregation(id).getResult();
}
model.addAttribute("results", results);
}
} else if (format.equals("text/xml")) {
model.addAttribute("teiHtml", teiHtml);
model.addAttribute("isTEI", true);
// TEI specific tools here
tools.addAll(addTeiTools(id));
}
List<ViewMode> tools = new ArrayList<ViewMode>();
// identifier@type of trier dfg-viewer mets is METSXMLID
// TODO: look into relation/tg:rootElementNamespace
if (!metadata.getObject().getGeneric().getProvided().getIdentifier().isEmpty()
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0) != null
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0)
.getType() != null
&& metadata.getObject().getGeneric().getProvided().getIdentifier().get(0).getType()
.equals("METSXMLID")) {
try {
String tgcrudUrl4DFGViewer = URLEncoder.encode(
tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", "UTF-8");
tools.add(new ViewMode("DFG-Viewer",
"http://dfg-viewer.de/v3/?set[zoom]=min&set[mets]=" + tgcrudUrl4DFGViewer, false));
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else { // assume tei-xml
String teiHtml = "";
if (fragment != "") {
teiHtml = this.aggregatorClient.renderTEIFragment(id, fragment);
} else {
teiHtml = this.aggregatorClient.renderTEI(id);
String tocHtml = this.aggregatorClient.renderToc(id);
model.addAttribute("tocHtml", tocHtml);
}
model.addAttribute("teiHtml", teiHtml);
model.addAttribute("isTEI", true);
}
// Mirador link may be shown for METS/MODS or TEI files (if manifest available for this file)
if (hasIiifManifest(metadata.getObject().getGeneric().getGenerated().getProject().getId())) {
tools.add(new ViewMode("Mirador", tgrepConfig.getToolMiradorHost() + "/?uri=" + id, false));
tools.add(new ViewMode(
"<img style='margin-top:2px; height: 21px;' title='Drop icon on Mirador to open manifest' src='" + tgrepConfig.getTextgridHost() + "/1.0/iiif/manifests/img/iiif-logo.svg'>",
tgrepConfig.getTextgridHost() + "/1.0/iiif/manifests/" + id + "/manifest.json", false
));
}
// CLARIN Language Resource Switchboard (LRS)
try {
// XML
String xml4switchboard = URLEncoder.encode(tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", "UTF-8");
tools.add(new ViewMode("Switchboard (TEI)", tgrepConfig.getToolSwitchboardHost() + "/" + xml4switchboard + "/application%2Ftei+xml", false));
// txt
String text4switchboard = URLEncoder.encode(tgrepConfig.getTextgridHost() + "/1.0/aggregator/text/" + id , "UTF-8");
tools.add(new ViewMode("Switchboard (txt)", tgrepConfig.getToolSwitchboardHost() + "/" + text4switchboard + "/text%2Fplain", false));
} catch (UnsupportedEncodingException e) {
log.error("error encoding url for switchboard", e);
}
model.addAttribute("tools", tools);
}
// Voyant
tools.add(new ViewMode("Voyant", tgrepConfig.getToolVoyantHost() + "/?input=" + tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", false));
/**
* Some tools only useful for browsing TEI (voyant, switchboard)
* @param tools
* @param id
*/
private List<ViewMode> addTeiTools(String id) {
// CLARIN Language Resource Switchboard (LRS)
List<ViewMode> tools = new ArrayList<ViewMode>();
try {
// XML
String xml4switchboard = URLEncoder.encode(tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", "UTF-8");
tools.add(new ViewMode("Switchboard (TEI)", tgrepConfig.getToolSwitchboardHost() + "/" + xml4switchboard + "/application%2Ftei+xml", false));
// txt
String text4switchboard = URLEncoder.encode(tgrepConfig.getTextgridHost() + "/1.0/aggregator/text/" + id , "UTF-8");
tools.add(new ViewMode("Switchboard (txt)", tgrepConfig.getToolSwitchboardHost() + "/" + text4switchboard + "/text%2Fplain", false));
} catch (UnsupportedEncodingException e) {
log.error("error encoding url for switchboard", e);
}
// Mirador
if (hasIiifManifest(metadata.getObject().getGeneric().getGenerated().getProject().getId())) {
tools.add(new ViewMode("Mirador", tgrepConfig.getToolMiradorHost() + "/?uri=" + id, false));
tools.add(new ViewMode(
"<img style='margin-top:2px; height: 21px;' title='Drop icon on Mirador to open manifest' src='" + tgrepConfig.getTextgridHost() + "'/iiif/manifests/img/iiif-logo.svg'>",
tgrepConfig.getTextgridHost() + "/1.0/iiif/manifests/" + id + "/manifest.json", false
));
}
// Voyant
tools.add(new ViewMode("Voyant", tgrepConfig.getToolVoyantHost() + "/?input=" + tgrepConfig.getTextgridHost() + "/1.0/tgcrud-public/rest/" + id + "/data", false));
// Annotate
tools.add(new ViewMode("Annotate", tgrepConfig.getToolAnnotateHost() + "/data.html?uri=" + id, false, "annotation-button"));
// Annotate
tools.add(new ViewMode("Annotate", tgrepConfig.getToolAnnotateHost() + "/data.html?uri=" + id, false, "annotation-button"));
return tools;
}
model.addAttribute("tools", tools);
/**
* setup browsing of aggreagtions
*
* @param model
* @param i18n
* @param id
* @param format
* @param mode
*/
private void handleAggregations(Model model, I18N i18n, String id, String format, String mode) {
List<ViewMode> viewmodes = new ArrayList<ViewMode>();
viewmodes
.add(new ViewMode(i18n.get("list"), Utils.browseUrl(id) + "?mode=list", mode.equals("list")));
viewmodes.add(new ViewMode(i18n.get("gallery"), Utils.browseUrl(id) + "?mode=gallery",
mode.equals("gallery")));
if (format.equals("text/tg.edition+tg.aggregation+xml")) {
viewmodes.add(new ViewMode("TEI-Corpus", Utils.browseUrl(id) + "?mode=xml", mode.equals("xml")));
}
// Digilib
else if (format.contains("image")) {
model.addAttribute("image", true);
List<ViewMode> tools = new ArrayList<ViewMode>();
tools.add(new ViewMode("Digilib", tgrepConfig.getToolDigilibHost() + "/digilib.html?fn=" + id, false));
model.addAttribute("tools", tools);
model.addAttribute("viewmodes", viewmodes);
if (mode != null && mode.equals("xml")) {
String teiHtml = this.aggregatorClient.renderTEI(id);
String tocHtml = this.aggregatorClient.renderToc(id);
model.addAttribute("teiHtml", teiHtml);
model.addAttribute("tocHtml", tocHtml);
} else {
log.info("listing agg: " + id);
List<ResultType> results;
if (format.contains("text/tg.work+xml")) {
List<String> editionFilter =
Arrays.asList(new String[] {"format:text/tg.edition+tg.aggregation+xml"});
results = this.tgsearchClientService
.search("isEditionOf:\"" + id + "\"", "relevance", 0, 20, editionFilter, true)
.getResult();
} else {
results = this.tgsearchClientService.listAggregation(id).getResult();
}
model.addAttribute("results", results);
}
}
return "browse";
/**
* browsing images, digilib link in tools
* @param model
* @param id
*/
private void handleImages(Model model, String id) {
model.addAttribute("image", true);
List<ViewMode> tools = new ArrayList<ViewMode>();
tools.add(new ViewMode("Digilib", tgrepConfig.getToolDigilibHost() + "/digilib.html?fn=" + id, false));
model.addAttribute("tools", tools);
}
private boolean hasIiifManifest(String id) {
......
......@@ -118,4 +118,5 @@ settings=Einstellungen
shelf=Regal
imprint=Impressum
privpol=Datenschutzerklärung
help=Hilfe
documentation=Dokumentation
content=Inhalte
......@@ -119,3 +119,5 @@ shelf=Shelf
imprint=Imprint
privpol=Privacy Policy
help=Help
documentation=Documentation
content=Content
......@@ -6,105 +6,105 @@
<form class="tgrep advanced-search">
<h1>${i18n['advanced-search']}</h1>
<fieldset class="tgrep advanced-search_fieldset"><legend class="tgrep advanced-search_legend">Metadata</legend>
<fieldset class="tgrep advanced-search_fieldset">
<ul class="tgrep advanced-search_grow-group">
<li class="tgrep advanced-search_grow-item metadata-searchgroup">
<span class="tgrep advanced-search_input-group -operator -block">AND </span>
<label class="tgrep advanced-search_input-group -type">
<span class="sr-only">Field name</span>
<select class="tgrep advanced-search_input -full-width" name="metadata-field">
<option value="title">Title</option>
<option value="edition.agent.value">Author</option>
<option value="edition.language">Language</option>
<option value="notes">Notes</option>
<option value="genre">Genre</option>
<option value="rightsHolder">Rights Holder</option>
<option value="format">Format</option>
<option value="work.dateOfCreation.date">Date</option>
<option value="work.dateOfCreation.notBefore">Date (not Before)</option>
<option value="work.dateOfCreation.noAfter">Date (note After)</option>
</select>
</label>
<label class="tgrep advanced-search_input-group -term">
<span class="sr-only">Search term</span>
<input class="tgrep advanced-search_input -full-width" name="metadata-term" type="text" />
</label>
<span class="tgrep advanced-search_input-group -operator"> OR </span>
<label class="tgrep advanced-search_input-group -term">
<span class="sr-only">Search term</span>
<input class="tgrep advanced-search_input -full-width" name="metadata-term" type="text" />
</label>
<span class="tgrep advanced-search_input-group -buttons">
<button class="tgrep advanced-search_button -item -add" type="button">
<span class="sr-only">Add another field</span>
</button>
<button class="tgrep advanced-search_button -item -remove" disabled="disabled" type="button">
<span class="sr-only">Remove this field</span>
</button>
</span>
</li>
</ul>
</fieldset>
<button class="tgrep advanced-search_button -toggle" data-target="content-types" type="button">Content Types</button>
<fieldset class="tgrep advanced-search_fieldset -toggle" id="content-types">
<p class="tgrep advanced-search_input-group -buttons">
<button class="tgrep advanced-search_button -select -all" data-target="content-types" type="button">Alle markieren</button>
<button class="tgrep advanced-search_button -select -none" data-target="content-types" type="button">Alle abwählen</button>
</p>
<ul>
<li><input id="content-type-0" name="contenttype" type="checkbox" value="text/tg.aggregation+xml" /> <label for="content-type-0">Aggregation (text/tg.aggregation+xml)</label></li>
<li><input id="content-type-1" name="contenttype" type="checkbox" value="text/css" /> <label for="content-type-1">Cascading Stylesheet (CSS) (text/css)</label></li>
<li><input id="content-type-2" name="contenttype" type="checkbox" value="text/tg.collection+tg.aggregation+xml" /> <label for="content-type-2">Collection (text/tg.collection+tg.aggregation+xml)</label></li>
<li><input id="content-type-3" name="contenttype" type="checkbox" value="application/xml-dtd" /> <label for="content-type-3">DTD (application/xml-dtd)</label></li>
<li><input id="content-type-4" name="contenttype" type="checkbox" value="text/tg.edition+tg.aggregation+xml" /> <label for="content-type-4">Edition (text/tg.edition+tg.aggregation+xml)</label></li>
<li><input id="content-type-5" name="contenttype" type="checkbox" value="image/x-unknown" /> <label for="content-type-5">Image (image/x-unknown)</label></li>
<li><input id="content-type-6" name="contenttype" type="checkbox" value="text/tg.imex+xml" /> <label for="content-type-6">Import / Export Mapping (text/tg.imex+xml)</label></li>
<li><input id="content-type-7" name="contenttype" type="checkbox" value="image/jpeg" /> <label for="content-type-7">JPEG image (image/jpeg)</label></li>
<li><input id="content-type-8" name="contenttype" type="checkbox" value="image/png" /> <label for="content-type-8">PNG image (image/png)</label></li>
<li><input id="content-type-9" name="contenttype" type="checkbox" value="text/plain" /> <label for="content-type-9">Plain Text (text/plain)</label></li>
<li><input id="content-type-10" name="contenttype" type="checkbox" value="text/tg.projectfile+xml" /> <label for="content-type-10">Project Configuration (text/tg.projectfile+xml)</label></li>
<li><input id="content-type-11" name="contenttype" type="checkbox" value="image/tiff" /> <label for="content-type-11">TIFF image (image/tiff)</label></li>
<li><input id="content-type-12" name="contenttype" type="checkbox" value="text/linkeditorlinkedfile" /> <label for="content-type-12">Text Image Link File (text/linkeditorlinkedfile)</label></li>
<li><input id="content-type-13" name="contenttype" type="checkbox" value="text/tg.servicedescription+xml" /> <label for="content-type-13">TextGrid Service Description (text/tg.servicedescription+xml)</label></li>
<li><input id="content-type-14" name="contenttype" type="checkbox" value="text/tg.inputform+rdf+xml" /> <label for="content-type-14">TextGrid TGForm RDF-Object (text/tg.inputform+rdf+xml)</label></li>
<li><input id="content-type-15" name="contenttype" type="checkbox" value="text/gwdl.workflow+xml" /> <label for="content-type-15">TextGrid Workflow Document (GWDL) (text/gwdl.workflow+xml)</label></li>
<li><input id="content-type-16" name="contenttype" type="checkbox" value="text/tg.workflow+xml" /> <label for="content-type-16">TextGrid Workflow Document (text/tg.workflow+xml)</label></li>
<li><input id="content-type-17" name="contenttype" type="checkbox" value="text/tg.work+xml" /> <label for="content-type-17">Work (text/tg.work+xml)</label></li>
<li><input id="content-type-18" name="contenttype" type="checkbox" value="text/xml" /> <label for="content-type-18">XML Document (text/xml)</label></li>
<li><input id="content-type-19" name="contenttype" type="checkbox" value="text/xsd+xml" /> <label for="content-type-19">XML Schema (text/xsd+xml)</label></li>
<li><input id="content-type-20" name="contenttype" type="checkbox" value="text/xml+xslt" /> <label for="content-type-20">XSLT Stylesheet (text/xml+xslt)</label></li>
<li><input id="content-type-21" name="contenttype" type="checkbox" value="application/zip" /> <label for="content-type-21">ZIP Archive (application/zip)</label></li>
<li><input id="content-type-22" name="contenttype" type="checkbox" value="text/tg.webpublisher+xml" /> <label for="content-type-22">webpublisher (text/tg.webpublisher+xml)</label></li>
</ul>
</fieldset>
</fieldset>
<fieldset class="tgrep advanced-search_fieldset"><legend class="tgrep advanced-search_legend">Fulltext</legend>
<fieldset class="tgrep advanced-search_fieldset">
<label class="sr-only" for="advanced-search_fulltext-input">Search terms</label>
<input class="tgrep advanced-search_input -full-width" id="advanced-search_fulltext-input" name="fulltext" type="text" />
</fieldset>
<button class="tgrep advanced-search_button -toggle" data-target="word-distance" type="button">Word distances</button>
<fieldset class="tgrep advanced-search_fieldset -toggle" id="word-distance">
<ul>
<li><input checked="checked" id="word-distance-0" name="wordDistanceSel" type="radio" value="false" /> <label for="word-distance-0"> in one document </label></li>
<li><input id="word-distance-1" name="wordDistanceSel" type="radio" value="true" /> <label for="word-distance-1"> no more than <input max="1000" min="1" name="wordDistance" step="1" type="number" value="40" /> words </label></li>
</ul>
</fieldset>
</fieldset>
<input class="tgrep advanced-search_submit" type="submit" value="Search" />
<h1>${i18n['advanced-search']}</h1>
<fieldset class="tgrep advanced-search_fieldset"><legend class="tgrep advanced-search_legend">Metadata</legend>
<fieldset class="tgrep advanced-search_fieldset">
<ul class="tgrep advanced-search_grow-group">
<li class="tgrep advanced-search_grow-item metadata-searchgroup">
<span class="tgrep advanced-search_input-group -operator -block">AND </span>
<label class="tgrep advanced-search_input-group -type">
<span class="sr-only">Field name</span>
<select class="tgrep advanced-search_input -full-width" name="metadata-field">
<option value="title">Title</option>
<option value="edition.agent.value">Author</option>
<option value="edition.language">Language</option>
<option value="notes">Notes</option>
<option value="genre">Genre</option>
<option value="rightsHolder">Rights Holder</option>
<option value="format">Format</option>
<option value="work.dateOfCreation.date">Date</option>
<option value="work.dateOfCreation.notBefore">Date (not Before)</option>
<option value="work.dateOfCreation.noAfter">Date (note After)</option>
</select>
</label>
<label class="tgrep advanced-search_input-group -term">
<span class="sr-only">Search term</span>
<input class="tgrep advanced-search_input -full-width" name="metadata-term" type="text" />
</label>
<span class="tgrep advanced-search_input-group -operator"> OR </span>
<label class="tgrep advanced-search_input-group -term">
<span class="sr-only">Search term</span>
<input class="tgrep advanced-search_input -full-width" name="metadata-term" type="text" />
</label>
<span class="tgrep advanced-search_input-group -buttons">
<button class="tgrep advanced-search_button -item -add" type="button">
<span class="sr-only">Add another field</span>
</button>
<button class="tgrep advanced-search_button -item -remove" disabled="disabled" type="button">
<span class="sr-only">Remove this field</span>
</button>
</span>
</li>
</ul>
</fieldset>
<button class="tgrep advanced-search_button -toggle" data-target="content-types" type="button">Content Types</button>
<fieldset class="tgrep advanced-search_fieldset -toggle" id="content-types">
<p class="tgrep advanced-search_input-group -buttons">
<button class="tgrep advanced-search_button -select -all" data-target="content-types" type="button">Alle markieren</button>
<button class="tgrep advanced-search_button -select -none" data-target="content-types" type="button">Alle abwählen</button>
</p>
<ul>
<li><input id="content-type-0" name="contenttype" type="checkbox" value="text/tg.aggregation+xml" /> <label for="content-type-0">Aggregation (text/tg.aggregation+xml)</label></li>
<li><input id="content-type-1" name="contenttype" type="checkbox" value="text/css" /> <label for="content-type-1">Cascading Stylesheet (CSS) (text/css)</label></li>
<li><input id="content-type-2" name="contenttype" type="checkbox" value="text/tg.collection+tg.aggregation+xml" /> <label for="content-type-2">Collection (text/tg.collection+tg.aggregation+xml)</label></li>
<li><input id="content-type-3" name="contenttype" type="checkbox" value="application/xml-dtd" /> <label for="content-type-3">DTD (application/xml-dtd)</label></li>
<li><input id="content-type-4" name="contenttype" type="checkbox" value="text/tg.edition+tg.aggregation+xml" /> <label for="content-type-4">Edition (text/tg.ed