Picker includes Order Mode now. Several Changes

This commit is contained in:
cbu615
2025-11-24 09:39:46 +01:00
commit b771298280
121 changed files with 26539 additions and 0 deletions

81
.classpath Normal file
View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="res"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/cbu615/.m2/repository/org/apache/poi/poi/4.1.2/poi-4.1.2.jar" sourcepath="C:/Users/cbu615/.m2/repository/org/apache/poi/poi/4.1.2/poi-4.1.2-sources.jar">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="maven.groupId" value="org.apache.poi"/>
<attribute name="maven.artifactId" value="poi"/>
<attribute name="maven.version" value="4.1.2"/>
<attribute name="maven.scope" value="compile"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.base.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.controls.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.fxml.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.graphics.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.media.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.swing.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx.web.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/java/javafx/javafx-sdk-18.0.1/lib/javafx-swt.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/cbu615/.m2/repository/org/python/jython/2.7.0/jython-2.7.0.jar" sourcepath="C:/Users/cbu615/.m2/repository/org/python/jython/2.7.0/jython-2.7.0-sources.jar">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="maven.groupId" value="org.python"/>
<attribute name="maven.artifactId" value="jython"/>
<attribute name="maven.version" value="2.7.0"/>
<attribute name="maven.scope" value="compile"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

23
.project Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>reiheAPicker_v2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

0
data.sqlite Normal file
View File

10
help.properties Normal file
View File

@@ -0,0 +1,10 @@
#Properties
#Fri Jan 28 09:12:14 CET 2022
PropertiesApiKey=
PropertiesFileImportColumnDefintion=
PropertiesCallApiViaTitleIfIssnMissing=
PropertiesShowDetailsIfJsonTagMissing=
PropertiesFileImportFileTypDefintion=
PropertiesExportDataInSeparateColumns=
MultiApiCallChooseFile=
PropertiesWhitelistExport=

110
pom.xml Normal file
View File

@@ -0,0 +1,110 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>reiheAPicker</groupId>
<artifactId>reiheAPicker</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.41.2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.swinglabs/pdf-renderer -->
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>pdf-renderer</artifactId>
<version>1.0.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.python/jython -->
<dependency>
<groupId>org.python</groupId>
<artifactId>jython</artifactId>
<version>2.7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>11</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
</dependency>
<dependency>
<groupId>com.logaritex.ai</groupId>
<artifactId>assistant-api</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId> org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>0.8.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
</dependencies>
</project>

42
reiheAconfig.properties Normal file
View File

@@ -0,0 +1,42 @@
#Properties
#Wed Nov 12 09:36:03 CET 2025
settings_RemoveDuplicates=true
settings_f4searchCtrl=
settings_f3search=https\://rds.ibs-bw.de/phfreiburg/opac/RDSIndex/Search?type0%5B%5D\=allfields&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=au&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ti&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ct&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=isn&lookfor0%5B%5D\=[{[isbn]}]&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ta&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=co&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=py&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pp&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pu&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=si&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=zr&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=cc&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND
settings_API_RemoveOA=true
settings_RemoveSchoolBooks=true
settings_PickerName=CB
settings_PublisherBlacklist=swiboo.ch;OSIRIS Verlag;Verlag Der Islam;Merano Verlag;Kampenwand Verlag;Fontis;Literareon;Happy Science;Goldmann;Heliakon;Jeremia Verlag;Reclam;Darulkitab;frommann-holzboog;Marie Steiner Verlag;Info3;Leuchtstruktur Verlag;Frank & Frei;Verlag Goldenes Zeitalter;Herzprojekt;Hirnkost;Goetheanum;Daniel Verlag;Samenkorn;Bibellesebund Verlag;glaubwürdig;Parvis-Verlag;Gut-Nawo;Nawo-Verlag;Residenz Verlag;Verlag Edition Geheimes Wissen;Ares Verlag;Info 3 Verlag;Gabriele Publishing House;Gabriele-Verlag Das Wort;Golden Shore;Eulogia;Dreifalter;Esoterische Philosophie;August von Goethe Literaturverlag;GloryWorld-Medien;Wort im Bild;FinanzBuch;Verlag Freies Geistesleben;Kopp;Info3 Verlag;Lichtbewusstsein;Rediroma-Verlag;Advent-Verlag;Christliche Verlagsgesellschaft;Nymphenburger;Lichtzeichen Verlag;Siebenten-Tags-Adventisten;Spirit Rainbow Verlag;Voice of Hope;Advent Verlag;Rudolf Steiner;Novalis;Greuthof;rigatio Stiftung GmbH;Ares Verlag;Info 3 Verlag;Gabriele Publishing House;Gabriele-Verlag Das Wort;Golden Shore;Eulogia;Dreifalter;Esoterische Philosophie;August von Goethe Literaturverlag;GloryWorld-Medien;Wort im Bild;FinanzBuch;Verlag Freies Geistesleben;Kopp;Info3 Verlag;Lichtbewusstsein;Rediroma-Verlag;Advent-Verlag;Christliche Verlagsgesellschaft;Nymphenburger;Lichtzeichen Verlag;Siebenten-Tags-Adventisten;Spirit Rainbow Verlag;Voice of Hope;Advent Verlag;Rudolf Steiner;Novalis;Greuthof;rigatio Stiftung GmbH;Urachhaus;Anthroposophie;Amadeus Verlag
settings_API_sigil=DE-Frei129
settings_f2searchCtrl=
settings_RemoveTitlesWithoutISBNsInQueue=true
settings_FontSize=20
settings_f1searchShift=https\://kvk.bibliothek.kit.edu/hylib-bin/kvk/nph-kvk2.cgi?maske\=kvk-redesign&lang\=de&title\=KIT-Bibliothek%3A+Karlsruher+Virtueller+Katalog+KVK+%3A+Ergebnisanzeige&head\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fhead.html&header\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fheader.html&spacer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fspacer.html&footer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Ffooter.html&css\=none&input-charset\=utf-8&ALL\=&TI\=[{[title]}]&AU\=&CI\=&ST\=&PY\=&SB\=&SS\=&PU\=&kataloge\=K10PLUS&kataloge\=BVB&kataloge\=NRW&kataloge\=HEBIS&kataloge\=HEBIS_RETRO&kataloge\=KOBV_SOLR&kataloge\=DDB&kataloge\=STABI_BERLIN&ref\=direct&client-js\=yes
settings_API_CheckApiAfterImport=true
settings_RemoveJuvenileLiterature=true
settings_f1search=https\://www.google.com/search?&q\=[{[author]}]
settings_BlockBelletristik=true
settings_SaveFileFolder=C\:\\ReiheA\\Save\\
settings_stichwortmarkierungGruen=Unterricht;Kind,Schule;Päd;Erziehung;Datenträger\:Band;Freiburg
settings_stichwortmarkierungRot=vertrag;law;Verfassung;Recht;Ansicht;Gesetz;Datenträger\:Blatt;Dissertation;Auflage\:Unver;Rudolf Steiner;Anthroposo;schaman;Masterarbeit;Auflage
settings_QueueBoxWidth=626.0
settings_ExportFileFolder=Y\:\\Gruppen\\Bibliothek-Oeffentliches\\7. Erwerbung\\7.16 Rückstau Reihe-A\\PickerExport\\
settings_f4searchShift=https\://kvk.bibliothek.kit.edu/hylib-bin/kvk/nph-kvk2.cgi?maske\=kvk-redesign&lang\=de&title\=KIT-Bibliothek%3A+Karlsruher+Virtueller+Katalog+KVK+%3A+Ergebnisanzeige&head\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fhead.html&header\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fheader.html&spacer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fspacer.html&footer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Ffooter.html&css\=none&input-charset\=utf-8&ALL\=&TI\=&AU\=&CI\=&ST\=&PY\=&SB\=&SS\=&PU\=[{[publisher]}]&kataloge\=K10PLUS&kataloge\=BVB&kataloge\=NRW&kataloge\=HEBIS&kataloge\=HEBIS_RETRO&kataloge\=KOBV_SOLR&kataloge\=DDB&kataloge\=STABI_BERLIN&ref\=direct&client-js\=yes
settings_API_isbnSeparator=+or+pica.isb%3D
settings_API_RemoveHoldings=true
settings_FieldDisplaySettings=>FieldName>Titel<FieldName<>FieldAlias>TITEL <FieldAlias<>FieldContent><FieldContent<\n>cr<\n>FieldName>Hinweis<FieldName<>FieldAlias>Hinweis <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Verlag<FieldName<>FieldAlias>VERLAG <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Erscheinungsjahr<FieldName<>FieldAlias>ERJAHR <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Auflage<FieldName<>FieldAlias>AUFL <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Verfasser<FieldName<>FieldAlias>AUTOR <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Preis<FieldName<>FieldAlias>PREIS <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Schlagworte<FieldName<>FieldAlias>SW <FieldAlias<>FieldContent><FieldContent<\n>FieldName>Hochschulschriftenvermerk<FieldName<>FieldAlias>DISHAB <FieldAlias<>FieldContent><FieldContent<\n>cr<\nTitel\nDateipfad\nHinweis\nBestand\nGewaehltVon\nBearbeitetVon\nStatus\nWerktitel\nVerfasser\nVerlag\nVerlagsort\nErscheinungsjahr\nErscheinungstermin\nISBN\nAuflage\nPreis\nSeiten\nMaß\nBegleitmaterial\nReihe\nFußnote\nParalleleAusgabe\nHochschulschriftenvermerk\nDatenträger\nWochenverzeichnisnummer\nDDC-Sachgruppe\nSchlagworte\nVollständigeDDC-Notation\nInhaltsverzeichnis\nInhaltstext\nLinks\nDesiderat\n>cr<\nKommentar\nZeitschrift\n>cr<\nE-Mail\nVorname\nNachname\nOrcid\nTelefon\nEingereicht am\nErscheint am\nAPC\nWaehrung\nKostenstelle\nStatus\nHaushaltsBVM\nHinweis\n
settings_f4search=https\://rds.ibs-bw.de/phfreiburg/opac/RDSIndex/Search?type0%5B%5D\=allfields&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=au&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ti&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ct&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=isn&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ta&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=co&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=py&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pp&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pu&lookfor0%5B%5D\=[{[publisher]}]&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=si&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=zr&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=cc&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND
settings_API_link=https\://sru.bsz-bw.de/swb?version\=1.1&query\=pica.isb%3D[{[isbn]}]&operation\=searchRetrieve&maximumRecords\=10&recordSchema\=marcxmlk10os
settings_DDCWhitelist=
settings_f3searchCtrl=
settings_Order_ImportVerzeichnisNameTextField=Y\:\\Gruppen\\Bibliothek-Oeffentliches\\7. Erwerbung\\7.16 Rückstau Reihe-A\\PickerExport\\
settings_f3searchShift=https\://kvk.bibliothek.kit.edu/hylib-bin/kvk/nph-kvk2.cgi?maske\=kvk-redesign&lang\=de&title\=KIT-Bibliothek%3A+Karlsruher+Virtueller+Katalog+KVK+%3A+Ergebnisanzeige&head\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fhead.html&header\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fheader.html&spacer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fspacer.html&footer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Ffooter.html&css\=none&input-charset\=utf-8&ALL\=&TI\=&AU\=&CI\=&ST\=&PY\=&SB\=[{[isbn]}]&SS\=&PU\=&kataloge\=K10PLUS&kataloge\=BVB&kataloge\=NRW&kataloge\=HEBIS&kataloge\=HEBIS_RETRO&kataloge\=KOBV_SOLR&kataloge\=DDB&kataloge\=STABI_BERLIN&ref\=direct&client-js\=yes
settings_Order_DoneVerzeichnisNameTextField=Y\:\\Gruppen\\Bibliothek-Oeffentliches\\7. Erwerbung\\7.16 Rückstau Reihe-A\\PickerDone\\
settings_OtherOrdererNames=TestCB2
settings_API_markOA=true
settings_f1searchCtrl=
settings_RemoveDuplicatesByTitle=true
settings_DDCBlacklist=
settings_f2searchShift=https\://kvk.bibliothek.kit.edu/hylib-bin/kvk/nph-kvk2.cgi?maske\=kvk-redesign&lang\=de&title\=KIT-Bibliothek%3A+Karlsruher+Virtueller+Katalog+KVK+%3A+Ergebnisanzeige&head\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fhead.html&header\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fheader.html&spacer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Fspacer.html&footer\=%2F%2Fkvk.bibliothek.kit.edu%2Fasset%2Fhtml%2Ffooter.html&css\=none&input-charset\=utf-8&ALL\=&TI\=[{[title]}]&AU\=[{[author]}]&CI\=&ST\=&PY\=&SB\=&SS\=&PU\=&kataloge\=K10PLUS&kataloge\=BVB&kataloge\=NRW&kataloge\=HEBIS&kataloge\=HEBIS_RETRO&kataloge\=KOBV_SOLR&kataloge\=DDB&kataloge\=STABI_BERLIN&ref\=direct&client-js\=yes
settings_f2search=https\://rds.ibs-bw.de/phfreiburg/opac/RDSIndex/Search?type0%5B%5D\=allfields&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=au&lookfor0%5B%5D\=[{[author]}]&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ti&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ct&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=isn&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=ta&lookfor0%5B%5D\=[{[title]}]&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=co&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=py&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pp&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=pu&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=si&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=zr&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND&type0%5B%5D\=cc&lookfor0%5B%5D\=&join\=AND&bool0%5B%5D\=AND
settings_QueueBoxHeight=492.0

BIN
res/IHT.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
res/IHV.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
res/Reihe-A-Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 KiB

BIN
res/admin_variante.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

BIN
res/alt-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
res/backspace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
res/broken-link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
res/chat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

BIN
res/closed-eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
res/ctrl-control-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
res/down-arrow-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
res/enter-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
res/enter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
res/excel_tsv_example.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
res/f1-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
res/f2-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
res/f3-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
res/f4-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
res/f5-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
res/f6-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
res/f7-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
res/folder-search-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
res/fontSmaller.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

BIN
res/fontTaller.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

BIN
res/import.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
res/info-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
res/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

BIN
res/interesting-facts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
res/left-arrow-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
res/legal-info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 KiB

BIN
res/logo_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
res/logo_square.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
res/lupe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

BIN
res/planet-saturn-space.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
res/query-what-how-why.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
res/question.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

BIN
res/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
res/regulations.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
res/remote-control.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
res/resize_narrower.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

BIN
res/resize_smaller.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

BIN
res/resize_taller.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

BIN
res/resize_wider.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

BIN
res/right-arrow-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
res/rocks-falling-sign.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
res/save-all-files-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
res/shift-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
res/snake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
res/space-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
res/transmission.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
res/up-arrow-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
res/vertical-line.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

BIN
res/whiteListFilter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
res/wos_export_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -0,0 +1,961 @@
package launcher;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.control.TextInputDialog;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Screen;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import logic_reiheAPicker.GetButtonPics;
import logic_reiheAPicker.PropertyFileHandler;
import models_reiheAPicker.FondsManager_applicationModel;
import models_reiheAPicker.ListEnum;
import userInterface_reiheAPicker.Database_OpenOrdersTab;
import userInterface_reiheAPicker.FondsManagerFundingTab;
import userInterface_reiheAPicker.FondsManagerSettingsTab;
import userInterface_reiheAPicker.FondsManagerTab;
import userInterface_reiheAPicker.ISBNCheckerTab;
import userInterface_reiheAPicker.ImportSettingsTab;
import userInterface_reiheAPicker.LegalInformationScene;
import userInterface_reiheAPicker.OrderSettingsTab;
import userInterface_reiheAPicker.OrderTab;
import userInterface_reiheAPicker.PickerTab;
import var_reiheAPicker.Constants;
public class MainWindow extends Application{
private Scene reiheAPickerScene = null;
private Scene isbnCheckerScene = null;
private Scene viviScene = null;
private Scene toolChooserScene = null;
private int shiftPressed = 0;
public boolean modePickerTruemodeOrderFalse = false;
private OrderTab orderTab;
private Database_OpenOrdersTab database_OpenOrdersTab;
private PickerTab pickerTab;
private FondsManagerTab fondsManagerTab;
private FondsManagerFundingTab fondsManagerFundingTab;
boolean gridOrFontChanged = false;
Image gridIImageI = null;
Image gridIImageII = null;
Image gridIImageIII = null;
Image gridIImageIV = null;
Image fontTallerImage = null;
Image fontSmallerImage = null;
Image saveGridFontSettingsImage = null;
Button importButton = null;
Button legalInformationButton = null;
Button gridIButton = null;
Button gridIIButton = null;
Button gridIIIButton = null;
Button gridIVButton = null;
Button fontTallerButton = null;
Button fontSmallerButton = null;
Button saveGridFontSettingsButton = null;
private PropertyFileHandler propertyFileHandler = PropertyFileHandler.getInstance();
public static void startWindow(String[] args)
{
launch(args);
}
@Override
public void start(Stage primaryStage) throws IOException {
Image tooltipIcon = GetButtonPics.getButtonImage_TooltipIcon();
if (tooltipIcon != null)
{
primaryStage.getIcons().add(tooltipIcon);
}
if (this.propertyFileHandler.propertyFileModel.get_settingsLaunchMode() == 0)
{ primaryStage.setTitle(var_reiheAPicker.Constants.ProgramName);
initiateReiheAPicker(primaryStage);
} else if (this.propertyFileHandler.propertyFileModel.get_settingsLaunchMode() == 1)
{
primaryStage.setTitle(var_reiheAPicker.Constants.ProgramName_orderMode);
initiateReiheAOrder(primaryStage);
} else if (this.propertyFileHandler.propertyFileModel.get_settingsLaunchMode() == 2)
{ primaryStage.setTitle(var_reiheAPicker.Constants.ProgramName_fondsManager);
initiateFondsManager(primaryStage);
}
primaryStage.setMaximized(true);
primaryStage.show();
primaryStage.addEventFilter(KeyEvent.KEY_RELEASED, keyEvent -> {
if (keyEvent.getCode() == KeyCode.ESCAPE)
{
primaryStage.setScene(reiheAPickerScene);
}
if (keyEvent.getCode() == KeyCode.SHIFT)
{
this.shiftPressed ++;
if (this.shiftPressed > 4)
{
initiateISBNChecker(primaryStage);
this.shiftPressed = 0;
}
} else
{
this.shiftPressed = 0;
}
});
}
private void initiateISBNChecker(Stage primaryStage)
{
if (this.isbnCheckerScene == null)
{
ISBNCheckerTab isbnChecker = new ISBNCheckerTab();
TabPane mainTabPane = new TabPane();
mainTabPane.getTabs().add(isbnChecker.isbnCheckerTab);
VBox vBoxMenu = new VBox(mainTabPane);
this.isbnCheckerScene = new Scene(vBoxMenu);
}
Stage isbnCheckerStage = new Stage();
isbnCheckerStage.setScene(isbnCheckerScene);
isbnCheckerStage.show();
}
private void setChangeFontGridSettingsButtonSetVisibleInvisible(boolean setChangedFlagTrue)
{
this.gridOrFontChanged = setChangedFlagTrue;
if (setChangedFlagTrue)
{
this.saveGridFontSettingsButton.setVisible(true);
} else
{
this.saveGridFontSettingsButton.setVisible(false);
}
}
private void saveFontGridSizeSettings(String fontSize, String boxWith, String boxHeight) throws IOException
{
this.propertyFileHandler.propertyFileModel.set_settings_FontSize(fontSize);
this.propertyFileHandler.propertyFileModel.set_settings_QueueBoxWidth(boxWith);
this.propertyFileHandler.propertyFileModel.set_settings_QueueBoxHeight(boxHeight);
this.propertyFileHandler.setConfigDetail();
}
private void initiateFondsManager(Stage primaryStage) throws IOException
{
this.importButton = new Button();
this.legalInformationButton = new Button();
this.gridIButton = new Button();
this.gridIIButton = new Button();
this.gridIIIButton = new Button();
this.gridIVButton = new Button();
this.fontTallerButton = new Button();
this.fontSmallerButton = new Button();
this.saveGridFontSettingsButton = new Button();
this.gridIButton.setVisible(false);
this.gridIIButton.setVisible(false);
this.gridIIIButton.setVisible(false);
this.gridIVButton.setVisible(false);
this.fontTallerButton.setVisible(false);
this.fontSmallerButton.setVisible(false);
this.saveGridFontSettingsButton.setVisible(false);
this.gridIImageI = GetButtonPics.getButtonImage_Narrower();
if (gridIImageI != null)
{
gridIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageI));
}
this.gridIImageII = GetButtonPics.getButtonImage_Smaller();
if (gridIImageII != null)
{
gridIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageII));
}
this.gridIImageIII = GetButtonPics.getButtonImage_Taller();
if (gridIImageIII != null)
{
gridIIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIII));
}
this.gridIImageIV = GetButtonPics.getButtonImage_Wider();
if (gridIImageIV != null)
{
gridIVButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIV));
}
this.fontTallerImage = GetButtonPics.getButtonImage_FontTaller();
if (fontTallerImage != null)
{
fontTallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontTallerImage));
}
this.fontSmallerImage = GetButtonPics.getButtonImage_FontSmaller();
if (fontSmallerImage != null)
{
fontSmallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontSmallerImage));
}
this.saveGridFontSettingsImage = GetButtonPics.getButtonImage_saveButton();
if (saveGridFontSettingsImage != null)
{
this.saveGridFontSettingsButton.setGraphic(GetButtonPics.turnPicIntoImageView(saveGridFontSettingsImage));
}
Tooltip saveGridFontTooltip = new Tooltip();
saveGridFontTooltip.setText("Schriftgröße und Layout speichern");
saveGridFontSettingsButton.setTooltip(saveGridFontTooltip);
Image legalInfoButtonImage = GetButtonPics.getButtonImage_LegalInfo();
if (legalInfoButtonImage != null)
{
legalInformationButton.setGraphic(GetButtonPics.turnPicIntoImageView(legalInfoButtonImage));
}
Tooltip legalTooltip = new Tooltip();
legalTooltip.setText("Impressum und Lizeninformationen");
legalInformationButton.setTooltip(legalTooltip);
Image importButtonImage = GetButtonPics.getButtonImage_importButton();
if (importButtonImage != null)
{
importButton.setGraphic(GetButtonPics.turnPicIntoImageView(importButtonImage));
}
Tooltip importTooltip = new Tooltip();
importTooltip.setText("Datensätze aktualisieren");
importButton.setTooltip(importTooltip);
Region region = new Region();
HBox.setHgrow(region, Priority.ALWAYS);
HBox controlsHBox = new HBox(importButton, region, this.saveGridFontSettingsButton, fontTallerButton, fontSmallerButton, new Label(" "), gridIButton, gridIIButton, gridIIIButton, gridIVButton, new Label(" "), legalInformationButton);
controlsHBox.setMinHeight(35);
HBox.setMargin(importButton, new Insets(5,5,5,5));
HBox.setMargin(legalInformationButton, new Insets(5,5,5,5));
controlsHBox.setAlignment(Pos.CENTER_LEFT);
this.fondsManagerTab = new FondsManagerTab(primaryStage);
this.fondsManagerFundingTab = new FondsManagerFundingTab(primaryStage);
TabPane mainTabPane = new TabPane();
FondsManagerSettingsTab fondsManagerSettingsTab = new FondsManagerSettingsTab(primaryStage, fondsManagerTab);
legalInformationButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
openLegalInformationScene();
}
});
importButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
List<FondsManager_applicationModel> publicationModels = null;
mainTabPane.getTabs().remove(fondsManagerTab.oaTab);
mainTabPane.getTabs().remove(fondsManagerFundingTab.oaTab);
try {
publicationModels = fondsManagerSettingsTab.openFileAndLoad();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
if (publicationModels != null)
{
fondsManagerTab.rebuild(publicationModels);
fondsManagerFundingTab.rebuild(publicationModels);
}
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
mainTabPane.getTabs().add(fondsManagerTab.oaTab);
mainTabPane.getTabs().add(fondsManagerFundingTab.oaTab);
setFondsManagerTabActive(mainTabPane, fondsManagerTab, fondsManagerSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
}});
mainTabPane.getTabs().add(fondsManagerSettingsTab.importSettingsTab);
VBox vBoxMenu = new VBox(controlsHBox, mainTabPane);
this.reiheAPickerScene = new Scene(vBoxMenu);
fontTallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.adjustFontSizeTaller();
}
});
fontSmallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.adjustFontSizeSmaller();
}
});
gridIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.changeGridI();
}
});
gridIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.changeGridII();
}
});
gridIIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.changeGridIII();
}
});
gridIVButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
fondsManagerTab.changeGridIV();
}
});
this.saveGridFontSettingsButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(false);
try {
saveFontGridSizeSettings(fondsManagerTab.getFontsize(), fondsManagerTab.getGridWidth(), fondsManagerTab.getGridHeight());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//do the saving
}
});
primaryStage.setScene(this.reiheAPickerScene);
}
private void initiateReiheAOrder(Stage primaryStage) throws IOException
{
this.importButton = new Button();
this.legalInformationButton = new Button();
this.gridIButton = new Button();
this.gridIIButton = new Button();
this.gridIIIButton = new Button();
this.gridIVButton = new Button();
this.fontTallerButton = new Button();
this.fontSmallerButton = new Button();
this.saveGridFontSettingsButton = new Button();
this.gridIButton.setVisible(false);
this.gridIIButton.setVisible(false);
this.gridIIIButton.setVisible(false);
this.gridIVButton.setVisible(false);
this.fontTallerButton.setVisible(false);
this.fontSmallerButton.setVisible(false);
this.saveGridFontSettingsButton.setVisible(false);
this.gridIImageI = GetButtonPics.getButtonImage_Narrower();
if (gridIImageI != null)
{
gridIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageI));
}
this.gridIImageII = GetButtonPics.getButtonImage_Smaller();
if (gridIImageII != null)
{
gridIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageII));
}
this.gridIImageIII = GetButtonPics.getButtonImage_Taller();
if (gridIImageIII != null)
{
gridIIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIII));
}
this.gridIImageIV = GetButtonPics.getButtonImage_Wider();
if (gridIImageIV != null)
{
gridIVButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIV));
}
this.fontTallerImage = GetButtonPics.getButtonImage_FontTaller();
if (fontTallerImage != null)
{
fontTallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontTallerImage));
}
this.fontSmallerImage = GetButtonPics.getButtonImage_FontSmaller();
if (fontSmallerImage != null)
{
fontSmallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontSmallerImage));
}
this.saveGridFontSettingsImage = GetButtonPics.getButtonImage_saveButton();
if (saveGridFontSettingsImage != null)
{
this.saveGridFontSettingsButton.setGraphic(GetButtonPics.turnPicIntoImageView(saveGridFontSettingsImage));
}
Tooltip saveGridFontTooltip = new Tooltip();
saveGridFontTooltip.setText("Schriftgröße und Layout speichern");
saveGridFontSettingsButton.setTooltip(saveGridFontTooltip);
Image legalInfoButtonImage = GetButtonPics.getButtonImage_LegalInfo();
if (legalInfoButtonImage != null)
{
legalInformationButton.setGraphic(GetButtonPics.turnPicIntoImageView(legalInfoButtonImage));
}
Tooltip legalTooltip = new Tooltip();
legalTooltip.setText("Impressum und Lizeninformationen");
legalInformationButton.setTooltip(legalTooltip);
Image importButtonImage = GetButtonPics.getButtonImage_importButton();
if (importButtonImage != null)
{
importButton.setGraphic(GetButtonPics.turnPicIntoImageView(importButtonImage));
}
Tooltip importTooltip = new Tooltip();
importTooltip.setText("Datensätze aktualisieren");
importButton.setTooltip(importTooltip);
Region region = new Region();
HBox.setHgrow(region, Priority.ALWAYS);
HBox controlsHBox = new HBox(importButton, region, this.saveGridFontSettingsButton, fontTallerButton, fontSmallerButton, new Label(" "), gridIButton, gridIIButton, gridIIIButton, gridIVButton, new Label(" "), legalInformationButton);
controlsHBox.setMinHeight(35);
HBox.setMargin(importButton, new Insets(5,5,5,5));
HBox.setMargin(legalInformationButton, new Insets(5,5,5,5));
controlsHBox.setAlignment(Pos.CENTER_LEFT);
this.orderTab = new OrderTab(primaryStage);
this.database_OpenOrdersTab = new Database_OpenOrdersTab();
TabPane mainTabPane = new TabPane();
OrderSettingsTab orderSettingsTab = new OrderSettingsTab(primaryStage, orderTab);
legalInformationButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
openLegalInformationScene();
}
});
importButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
mainTabPane.getTabs().remove(orderTab.orderTab);
try {
orderSettingsTab.openFileAndLoad();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
List<String> columns = orderSettingsTab.titles.get(0);
orderSettingsTab.titles.remove(0);
try {
orderTab.rebuild(columns,
orderSettingsTab.titles
);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
mainTabPane.getTabs().add(orderTab.orderTab);
mainTabPane.getTabs().add(database_OpenOrdersTab.database_OpenOrdersTab);
setOrderTabActive(mainTabPane, orderTab, orderSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
}});
mainTabPane.getTabs().add(orderSettingsTab.importSettingsTab);
VBox vBoxMenu = new VBox(controlsHBox, mainTabPane);
this.reiheAPickerScene = new Scene(vBoxMenu);
fontTallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.adjustFontSizeTaller();
}
});
fontSmallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.adjustFontSizeSmaller();
}
});
gridIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.changeGridI();
}
});
gridIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.changeGridII();
}
});
gridIIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.changeGridIII();
}
});
gridIVButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
orderTab.changeGridIV();
}
});
this.saveGridFontSettingsButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(false);
try {
saveFontGridSizeSettings(orderTab.getFontsize(), orderTab.getGridWidth(), orderTab.getGridHeight());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
//do the saving
}
});
primaryStage.setScene(this.reiheAPickerScene);
}
private void initiateReiheAPicker(Stage primaryStage) throws IOException
{
if (this.reiheAPickerScene == null)
{
this.importButton = new Button();
this.legalInformationButton = new Button();
this.gridIButton = new Button();
this.gridIIButton = new Button();
this.gridIIIButton = new Button();
this.gridIVButton = new Button();
this.fontTallerButton = new Button();
this.fontSmallerButton = new Button();
this.saveGridFontSettingsButton = new Button();
this.gridIButton.setVisible(false);
this.gridIIButton.setVisible(false);
this.gridIIIButton.setVisible(false);
this.gridIVButton.setVisible(false);
this.fontTallerButton.setVisible(false);
this.fontSmallerButton.setVisible(false);
this.saveGridFontSettingsButton.setVisible(false);
Label progressLabel = new Label("");
ProgressIndicator progressIndicator = new ProgressIndicator(0);
Tooltip tooltip = new Tooltip();
tooltip.setText("Prüfe Titel auf Bestand und Open-Access-Status. Bitte warten!");
progressIndicator.setTooltip(tooltip);
this.orderTab = new OrderTab(primaryStage);
this.database_OpenOrdersTab = new Database_OpenOrdersTab();
this.gridIImageI = GetButtonPics.getButtonImage_Narrower();
if (gridIImageI != null)
{
gridIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageI));
}
this.gridIImageII = GetButtonPics.getButtonImage_Smaller();
if (gridIImageII != null)
{
gridIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageII));
}
this.gridIImageIII = GetButtonPics.getButtonImage_Taller();
if (gridIImageIII != null)
{
gridIIIButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIII));
}
this.gridIImageIV = GetButtonPics.getButtonImage_Wider();
if (gridIImageIV != null)
{
gridIVButton.setGraphic(GetButtonPics.turnPicIntoImageView(gridIImageIV));
}
this.fontTallerImage = GetButtonPics.getButtonImage_FontTaller();
if (fontTallerImage != null)
{
fontTallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontTallerImage));
}
fontSmallerImage = GetButtonPics.getButtonImage_FontSmaller();
if (fontSmallerImage != null)
{
fontSmallerButton.setGraphic(GetButtonPics.turnPicIntoImageView(fontSmallerImage));
}
this.saveGridFontSettingsImage = GetButtonPics.getButtonImage_saveButton();
if (saveGridFontSettingsImage != null)
{
this.saveGridFontSettingsButton.setGraphic(GetButtonPics.turnPicIntoImageView(saveGridFontSettingsImage));
}
Tooltip saveGridFontTooltip = new Tooltip();
saveGridFontTooltip.setText("Schriftgröße und Layout speichern");
saveGridFontSettingsButton.setTooltip(saveGridFontTooltip);
Image legalInfoButtonImage = GetButtonPics.getButtonImage_LegalInfo();
if (legalInfoButtonImage != null)
{
legalInformationButton.setGraphic(GetButtonPics.turnPicIntoImageView(legalInfoButtonImage));
}
Tooltip legalTooltip = new Tooltip();
legalTooltip.setText("Impressum und Lizeninformationen");
legalInformationButton.setTooltip(legalTooltip);
Image importButtonImage = GetButtonPics.getButtonImage_importButton();
if (importButtonImage != null)
{
importButton.setGraphic(GetButtonPics.turnPicIntoImageView(importButtonImage));
}
Tooltip importTooltip = new Tooltip();
importTooltip.setText("Import (CSV/TSV oder PSF-Dateien)");
importButton.setTooltip(importTooltip);
//Button tutorialButton = new Button();
//tutorialButton.setText("Tutorial");
//Button exportButton = new Button();
//exportButton.setText("Export");
Region region = new Region();
HBox.setHgrow(region, Priority.ALWAYS);
HBox controlsHBox = new HBox(importButton, region, progressLabel, progressIndicator, this.saveGridFontSettingsButton, fontTallerButton, fontSmallerButton, new Label(" "), gridIButton, gridIIButton, gridIIIButton, gridIVButton, new Label(" "), legalInformationButton);
controlsHBox.setMinHeight(35);
HBox.setMargin(importButton, new Insets(5,5,5,5));
HBox.setMargin(legalInformationButton, new Insets(5,5,5,5));
controlsHBox.setAlignment(Pos.CENTER_LEFT);
this.pickerTab = new PickerTab(primaryStage);
TabPane mainTabPane = new TabPane();
ImportSettingsTab importSettingsTab = new ImportSettingsTab(primaryStage, pickerTab);
mainTabPane.getTabs().add(database_OpenOrdersTab.database_OpenOrdersTab);
progressIndicator.setVisible(false);
legalInformationButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
openLegalInformationScene();
}
});
importButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
try {
if (mainTabPane.getTabs().contains(pickerTab.pickerTab))
{
Alert alert =
new Alert(AlertType.WARNING,
"Daten erneut importieren? Aktueller Fortschritt geht verloren!",
ButtonType.OK,
ButtonType.CANCEL);
alert.setTitle("Aktuellen Fortschritt überschreiben?");
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK) {
mainTabPane.getTabs().remove(pickerTab.pickerTab);
importSettingsTab.openFileAndLoad();
if (importSettingsTab.isSaveFileLoad)
{
pickerTab.rebuild(importSettingsTab.ColumnNamesFromSaveFile,
importSettingsTab.nopeTitlesFromSaveFile,
importSettingsTab.queueTitlesFromSaveFile,
importSettingsTab.pickTitlesFromSaveFile);
mainTabPane.getTabs().add(pickerTab.pickerTab);
setPickerTabActive(mainTabPane, pickerTab, importSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
} else
{
pickerTab.rebuild(importSettingsTab.titles, progressIndicator, progressLabel);
mainTabPane.getTabs().add(pickerTab.pickerTab);
setPickerTabActive(mainTabPane, pickerTab, importSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
}
}
}
else
{
importSettingsTab.openFileAndLoad();
if (importSettingsTab.isSaveFileLoad)
{
pickerTab.rebuild(importSettingsTab.ColumnNamesFromSaveFile,
importSettingsTab.nopeTitlesFromSaveFile,
importSettingsTab.queueTitlesFromSaveFile,
importSettingsTab.pickTitlesFromSaveFile);
mainTabPane.getTabs().add(pickerTab.pickerTab);
setPickerTabActive(mainTabPane, pickerTab, importSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
} else
{
pickerTab.rebuild(importSettingsTab.titles, progressIndicator, progressLabel);
mainTabPane.getTabs().add(pickerTab.pickerTab);
setPickerTabActive(mainTabPane, pickerTab, importSettingsTab);
fontTallerButton.setVisible(true);
fontSmallerButton.setVisible(true);
gridIButton.setVisible(true);
gridIIButton.setVisible(true);
gridIIIButton.setVisible(true);
gridIVButton.setVisible(true);
}
mainTabPane.getTabs().add(database_OpenOrdersTab.database_OpenOrdersTab);
}
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
fontTallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.adjustFontSizeTaller();
}
});
fontSmallerButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.adjustFontSizeSmaller();
}
});
gridIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.changeGridI();
}
});
gridIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.changeGridII();
}
});
gridIIIButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.changeGridIII();
}
});
gridIVButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(true);
pickerTab.changeGridIV();
}
});
this.saveGridFontSettingsButton.setOnAction(new EventHandler<ActionEvent>() {
@Override public void handle(ActionEvent e) {
setChangeFontGridSettingsButtonSetVisibleInvisible(false);
try {
saveFontGridSizeSettings(pickerTab.getFontsize(), pickerTab.getGridWidth(), pickerTab.getGridHeight());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
mainTabPane.getTabs().add(importSettingsTab.importSettingsTab);
VBox vBoxMenu = new VBox(controlsHBox, mainTabPane);
this.reiheAPickerScene = new Scene(vBoxMenu);
}
primaryStage.setScene(this.reiheAPickerScene);
}
private void openLegalInformationScene()
{
new LegalInformationScene();
}
public void setFondsManagerTabActive(TabPane mainTabPane, FondsManagerTab fondsManagerTab, FondsManagerSettingsTab fondsManagerSettingsTab)
{
// if active tab in importSettingsTab == 4 (field settings): dont change tabs. User is obviously making changes.
if (fondsManagerSettingsTab.importSettingsTabSubSettingsTabPane.getSelectionModel().getSelectedIndex() != 4)
{
mainTabPane.getSelectionModel().select(mainTabPane.getTabs().indexOf(fondsManagerTab.oaTab));
}
//load Field Settings in fieldSettingsTab
fondsManagerSettingsTab.setCurrentColumns();
}
public void setOrderTabActive(TabPane mainTabPane, OrderTab orderTab, OrderSettingsTab orderSettingsTab)
{
// if active tab in importSettingsTab == 4 (field settings): dont change tabs. User is obviously making changes.
if (orderSettingsTab.importSettingsTabSubSettingsTabPane.getSelectionModel().getSelectedIndex() != 4)
{
mainTabPane.getSelectionModel().select(mainTabPane.getTabs().indexOf(orderTab.orderTab));
}
//load Field Settings in fieldSettingsTab
orderSettingsTab.setCurrentColumns();
}
public void setPickerTabActive(TabPane mainTabPane, PickerTab pickerTab, ImportSettingsTab importSettingsTab)
{
// if active tab in importSettingsTab == 4 (field settings): dont change tabs. User is obviously making changes.
if (importSettingsTab.importSettingsTabSubSettingsTabPane.getSelectionModel().getSelectedIndex() != 4)
{
mainTabPane.getSelectionModel().select(mainTabPane.getTabs().indexOf(pickerTab.pickerTab));
}
//load Field Settings in fieldSettingsTab
importSettingsTab.setCurrentColumns();
}
}

25
src/launcher/Startup.java Normal file
View File

@@ -0,0 +1,25 @@
package launcher;
import logic_reiheAPicker.PropertyFileHandler;
public class Startup {
public static void main(String[] args) {
// TODO Auto-generated method stub
PropertyFileHandler propertyFilehandler = PropertyFileHandler.getInstance();
if (args != null && args.length > 0)
{
if (args[0].contains("OrderMode"))
{
propertyFilehandler.propertyFileModel.set_settingsOrderLaunchMode();
} else if (args[0].contains("PubFundMode"))
{
propertyFilehandler.propertyFileModel.set_settingsPubFundMode();
}
}
MainWindow.startWindow(args);
}
//xyz
}

View File

@@ -0,0 +1,119 @@
package logic_reiheAPicker;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.CookieHandler;
import java.net.CookieManager;
import java.net.CookiePolicy;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.LocalDateTime;
/*
* Class containing all functions related to API-Interaction
*/
public class ApiCallerClass {
//execute Post
private LocalDateTime timeStamp;
public ApiCallerClass()
{
this.timeStamp = LocalDateTime.now();
}
public String callUrlLimitedWaitTime(URL targetURL) throws InterruptedException {
HttpURLConnection connection = null;
if (timeStamp != null && Duration.between(timeStamp, LocalDateTime.now()).getSeconds() < 0.100)
{
Thread.sleep(100);
}
this.timeStamp = LocalDateTime.now();
try {
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
connection = (HttpURLConnection) targetURL.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept-Charset", StandardCharsets.UTF_8.name());
InputStream is = connection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
StringBuilder response = new StringBuilder();
String line;
while ((line = rd.readLine()) != null) {
response.append(line);
response.append(System.lineSeparator());
}
rd.close();
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if (connection != null) {
//connection.disconnect();
}
}
}
public String callUrl(URL targetURL) throws InterruptedException {
HttpURLConnection connection = null;
if (timeStamp != null && Duration.between(timeStamp, LocalDateTime.now()).getSeconds() < .5)
{
Thread.sleep(500);
}
this.timeStamp = LocalDateTime.now();
try {
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
connection = (HttpURLConnection) targetURL.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Accept-Charset", StandardCharsets.UTF_8.name());
InputStream is = connection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
StringBuilder response = new StringBuilder();
String line;
while ((line = rd.readLine()) != null) {
response.append(line);
response.append(System.lineSeparator());
}
rd.close();
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if (connection != null) {
//connection.disconnect();
}
}
}
}

View File

@@ -0,0 +1,104 @@
package logic_reiheAPicker;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
public class ChatGPTApiCallerClass {
public static String chatGPT(String prompt) {
String url = "https://api.openai.com/v1/chat/completions";
String apiKey = var_reiheAPicker.Constants.ChatGPTApiKey;
String model = "gpt-4o";
prompt = "You are assessing the relevance of books for a school-focused educational library. " +
"The target audience includes students and educators in all school-related disciplines (such as mathematics, science, languages, history, geography, social studies, arts, physical education, computer science, etc.). " +
"Your task is to rate each book's relevance using this fixed output format: " +
"'87; highly relevant but in English.' " +
"Format rules: " +
"- First, a number from 0 to 100 indicating the relevance. " +
"- Then, a short explanation in plain language. " +
"- Only use German or English titles. " +
"- German books are preferred. " +
"- English books are acceptable only if highly relevant. " +
"- Ignore books in other languages (output: '0; not in German or English.') " +
"Always follow this format. Dont include anything else. " +
"Now evaluate the following title: " + prompt; try {
Thread.sleep(3000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
HttpURLConnection connection = null;
try {
URL obj = new URL(url);
connection = (HttpURLConnection) obj.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Bearer " + apiKey);
connection.setRequestProperty("Content-Type", "application/json");
// The request body
String body = "{\"model\": \"" + model + "\", \"messages\": [{\"role\": \"user\", \"content\": \"" + prompt + "\"}]}";
connection.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
writer.write(body);
writer.flush();
writer.close();
// Response from ChatGPT
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder response = new StringBuilder();
while ((line = br.readLine()) != null) {
response.append(line);
}
br.close();
// Call the method to extract the message
return extractMessageFromJSONResponse(response.toString());
} catch (IOException e) {
// Handle errors and print the API response if available
if (connection != null) {
try {
InputStream errorStream = connection.getErrorStream();
if (errorStream != null) {
BufferedReader errorReader = new BufferedReader(new InputStreamReader(errorStream));
StringBuilder errorResponse = new StringBuilder();
String line;
while ((line = errorReader.readLine()) != null) {
errorResponse.append(line);
}
errorReader.close();
System.err.println("Error response from OpenAI API: " + errorResponse.toString());
// Log and continue without throwing
return "skipped due to error"; // Or handle it gracefully based on your program's needs
}
} catch (IOException ex) {
System.err.println("Failed to read error stream from OpenAI API");
ex.printStackTrace();
// Log and continue without throwing
return "skipped due to error"; // Or handle it gracefully
}
}
System.err.println("Error occurred while connecting to OpenAI API: " + e.getMessage());
e.printStackTrace();
// Log and continue without throwing
return "skipped due to error"; // Or handle it gracefully
}
}
public static String extractMessageFromJSONResponse(String response) {
int start = response.indexOf("content")+ 11;
int end = response.indexOf("\"", start);
return response.substring(start, end);
}
}

View File

@@ -0,0 +1,567 @@
package logic_reiheAPicker;
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import javafx.scene.control.Alert;
import models_reiheAPicker.FondsManager_applicationModel;
import var_reiheAPicker.Constants;
public class DataBaseHandler {
public void fetchDataFromMailAndSave(String mailtext) throws SQLException
{
String x = mailtext;
FondsManager_applicationModel applicationModel = new FondsManager_applicationModel(mailtext);
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
String queryPublicationAlreadyExists = "Select count() from publication where title = '" + applicationModel.publicationModel.title + "'";
Statement stmtPublication = connection.createStatement();
ResultSet resultSet = stmtPublication.executeQuery(queryPublicationAlreadyExists);
if (resultSet.getInt(1) == 0)
{
String queryPublication = String.format(Constants.baseQueryInsertPublication, "'" + applicationModel.publicationModel.title + "'",
"'" + applicationModel.publicationModel.publisher + "'", "'" + applicationModel.publicationModel.journalTitle + "'",
"'" + applicationModel.publicationModel.submitDate + "'",
"'" + applicationModel.publicationModel.releaseDate + "'", "'" + applicationModel.publicationModel.costPrognosed + "'",
"'" + applicationModel.publicationModel.currency + "'", "'" + applicationModel.publicationModel.costLoc + "'",
"'" + applicationModel.publicationModel.correspondingAuthorIsPhMember + "'",
"'" + applicationModel.publicationModel.partialFeesAccepted + "'", "'" + applicationModel.publicationModel.fundingAcknowledgemetAccepted + "'",
"'" + applicationModel.publicationModel.oaGreenAccepted + "'", "'" + applicationModel.publicationModel.applicationStage + "'",
"'" + applicationModel.publicationModel.initialEmail + "'", "'" + applicationModel.publicationModel.notes + "'",
"'" + applicationModel.publicationModel.emailCostPersonResponsible + "'", "DATE('now')" + ");");
stmtPublication = connection.createStatement();
stmtPublication.execute(queryPublication);
Statement getLastID = connection.createStatement();
resultSet = getLastID.executeQuery("select last_insert_rowid()");
while (resultSet.next()) {
applicationModel.publicationModel.id = resultSet.getInt(1);
}
Statement checkIfAuthorNew = connection.createStatement();
resultSet = getLastID.executeQuery(String.format("Select rowid from authors where email = '%s';", applicationModel.authorModel.email));
while (resultSet.next()) {
applicationModel.authorModel.id = resultSet.getInt(1);
}
if (applicationModel.authorModel.id > 0)
{
//do nothing
} else
{
String queryAuthor = String.format(Constants.baseQueryInsertAuthor, "'" + applicationModel.authorModel.email + "'",
"'" + applicationModel.authorModel.firstname + "'","'" + applicationModel.authorModel.lastname + "'",
"'" + "'","'" + applicationModel.authorModel.orcid + "'",
"'" + applicationModel.authorModel.isPhMember + "'", "'" + applicationModel.authorModel.phone + "'" + ");");
Statement stmtAuthor = connection.createStatement();
stmtAuthor.execute(queryAuthor);
getLastID = connection.createStatement();
resultSet = getLastID.executeQuery("select last_insert_rowid()");
while (resultSet.next()) {
applicationModel.authorModel.id = resultSet.getInt(1);
}
}
String query_publicationAuthors = String.format(Constants.baseQuery_publicationAuthors,
"'" + applicationModel.publicationModel.id + "'","'" + applicationModel.authorModel.id + "'" + ");");
Statement stmt_publicationAuthors = connection.createStatement();
stmt_publicationAuthors.execute(query_publicationAuthors);
} else
{
System.out.println("Datensatz mit diesem Titel existiert bereits! Eintrag in Datenbank wurde nicht vorgenommen.");
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public String getFilePathForBillByPublicationId(String id) throws SQLException
{
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
String getFilePathQuery = String.format(Constants.baseQuery_getBillPathByPublicationID, id);
Statement stmt = connection.createStatement();
ResultSet resultset = stmt.executeQuery(getFilePathQuery);
while (resultset.next()) {
return resultset.getString("path");
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
return "";
}
public void saveBill_basic(String pubId, String path) throws SQLException
{
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
//publicationID, path, amountTotal, amountTotalCurrency, amountTotalEuro, paidTotal, paidTotalBooked, deptInstitue, deptInstituteBooked
String insertBillData = String.format(Constants.baseQuery_insertBill_basic, pubId, path);
Statement stmtPublication = connection.createStatement();
stmtPublication.execute(insertBillData);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public void saveBill(String pubId, String path, String amountTotal, String amountTotalCurrency, String amountTotalEuro, String paidTotal, String paidTotalBookedDate, String deptInstitue, String deptInstituteBookedDate) throws SQLException
{
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
//publicationID, path, amountTotal, amountTotalCurrency, amountTotalEuro, paidTotal, paidTotalBooked, deptInstitue, deptInstituteBooked
String insertBillData = String.format(Constants.baseQuery_insertBill, pubId, path, amountTotal, amountTotalCurrency, amountTotalEuro, amountTotalEuro, paidTotal, paidTotalBookedDate, deptInstitue, deptInstituteBookedDate);
Statement stmtPublication = connection.createStatement();
stmtPublication.execute(insertBillData);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public String pickerSafetyDBgetAmountOfOpenOrders() throws SQLException
{
File f = new File(Constants.safetyDBPath);
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return "";
}
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath);
if ( connection != null ){
String getOpenOrders = Constants.getAmountOpenOrdersFromOrderInc;
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
ResultSet resultset = stmt_baseQuery_getAllDatasets.executeQuery(getOpenOrders);
while (resultset.next()) {
{
return resultset.getString("anz");
}
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
return "0";
}
public void pickerSafetyDBSaveExportAndClose(String created, String title,String chosenBy,String Data, String hinweis) throws SQLException
{
File f = new File(Constants.safetyDBPath);
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return;
}
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath);
if ( connection != null ){
String insertIntoSafetyDB = String.format(Constants.insertIntoOrder_inc, created, title, chosenBy, Data.replaceAll("'", "").replaceAll(",", "").replaceAll("\r\n", " ").replaceAll("\n", " "), hinweis);
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
stmt_baseQuery_getAllDatasets.execute(insertIntoSafetyDB);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public void pickerSafetyDBUpdate(String updatedDate, String orderedBy, String title, String hinweis) throws SQLException
{
File f = new File(Constants.safetyDBPath);
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return;
}
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath);
if ( connection != null ){
String updateSafetyDB = String.format(Constants.updateOrderInc, updatedDate, orderedBy, hinweis, title);
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
stmt_baseQuery_getAllDatasets.execute(updateSafetyDB);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public void pickerSafetyDBUpdate_onlyComment(String title, String hinweis) throws SQLException
{
File f = new File(Constants.safetyDBPath);
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return;
}
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath);
if ( connection != null ){
String updateSafetyDB = String.format(Constants.updateOrderInc_commentOnly, hinweis, title);
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
stmt_baseQuery_getAllDatasets.execute(updateSafetyDB);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
}
public List<List<String>> pickerSafetyDB_getAllDatasets(String person) throws SQLException
{
File f = new File(Constants.safetyDBPath);
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return null;
}
List<List<String>> data = new ArrayList<List<String>>();
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath );
if ( connection != null ){
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
ResultSet resultset = null;
if (person.isBlank())
{
resultset = stmt_baseQuery_getAllDatasets.executeQuery(Constants.getAllDataFromOrderSafetyDB_all);
} else
{
resultset = stmt_baseQuery_getAllDatasets.executeQuery(Constants.getAllDataFromOrderSafetyDB_chosenBy.replace("[chosenBy]", person));
}
while (resultset.next()) {
List<String> dataset = new ArrayList<String>();
dataset.add(resultset.getString("created"));
dataset.add(resultset.getString("ordered"));
dataset.add(resultset.getString("title"));
dataset.add(resultset.getString("chosenBy"));
dataset.add(resultset.getString("orderedBy"));
dataset.add(resultset.getString("Data"));
dataset.add(resultset.getString("hinweis"));
data.add(dataset);
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
return data;
}
public List<List<String>> pickerSafetyDB_getAllDatasetsByTitle(String title) throws SQLException
{
File f = new File(Constants.safetyDBPath);
System.out.println("a");
if(!f.exists()) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Datenbank konnte nicht gefunden werden!");
alert.setHeaderText("Stellen Sie bitte sicher, dass Sie mit dem Netzlaufwerk verbunden sind!");
alert.setContentText(null);
alert.showAndWait();
return null;
}
List<List<String>> data = new ArrayList<List<String>>();
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.safetyDBPath );
if ( connection != null ){
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
ResultSet resultset = stmt_baseQuery_getAllDatasets.executeQuery(Constants.getAllDataByTitleFromOrderSafetyDB.replace("[title]", title));
while (resultset.next()) {
List<String> dataset = new ArrayList<String>();
dataset.add(resultset.getString("created"));
dataset.add(resultset.getString("ordered"));
dataset.add(resultset.getString("title"));
dataset.add(resultset.getString("chosenBy"));
dataset.add(resultset.getString("orderedBy"));
dataset.add(resultset.getString("Data"));
dataset.add(resultset.getString("hinweis"));
data.add(dataset);
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
return data;
}
public List<FondsManager_applicationModel> loadDatabaseData() throws SQLException
{
List<FondsManager_applicationModel> applicationModels = new ArrayList<FondsManager_applicationModel>();
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
ResultSet resultset = stmt_baseQuery_getAllDatasets.executeQuery(Constants.baseQuery_getAllDatasets);
while (resultset.next()) {
applicationModels.add(new FondsManager_applicationModel(
resultset.getInt("applicationID"),
resultset.getString("initialEmail"),
resultset.getString("notes"),
resultset.getString("title"),
resultset.getString("publisher"),
resultset.getString("journalTitle"),
resultset.getString("submitDate"),
resultset.getString("releaseDate"),
resultset.getString("costPrognosed"),
resultset.getString("currency"),
resultset.getString("costLoc"),
resultset.getString("correspondingAuthorIsPhMember"),
resultset.getString("partialFeesAccepted"),
resultset.getString("fundingAcknowledgemetAccepted"),
resultset.getString("oaGreenAccepted"),
resultset.getString("applicationStage"),
resultset.getString("emailCostPersonResponsible"),
resultset.getString("comment_intern"),
resultset.getInt("authorID"),
resultset.getString("email"),
resultset.getString("firstname"),
resultset.getString("lastname"),
resultset.getString("orcid"),
resultset.getString("phone")
));
}
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
connection.close();
}
return applicationModels;
}
public void updateComment_Intern(String id, String comment)
{
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
String query = String.format(Constants.updateComment_Intern, comment, id);
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
stmt_baseQuery_getAllDatasets.execute(query);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
try {
connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public void updateApplicationStage(String id, String stage)
{
Connection connection = null;
try{
connection = DriverManager.getConnection( "jdbc:sqlite:" + Constants.dbLocation );
if ( connection != null ){
String query = String.format(Constants.updateApplicationStage, stage, id);
Statement stmt_baseQuery_getAllDatasets = connection.createStatement();
stmt_baseQuery_getAllDatasets.execute(query);
}
}
catch ( Exception ex ) {
System.err.println( ex.getClass().getName() + ": " + ex.getMessage() );
System.out.println("y");
} finally
{
try {
connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
/*
Statement stmt = connection.createStatement();
stmt.execute("create table IF NOT EXISTS test(id integer, value text);");
Statement stmt1 = connection.createStatement();
stmt1.execute("insert into test values (2, 'xyz');");
Statement stmt2 = connection.createStatement();
ResultSet resultset = stmt2.executeQuery("select * from test;");
while (resultset.next()) {
System.out.println(resultset.getInt("id") + "\t" +
resultset.getString("value") + "\t");
}
*/
}

View File

@@ -0,0 +1,573 @@
package logic_reiheAPicker;
import java.util.Date;
public class FondsManager_getDataFromEmail {
private static String[] splitEmailText(String text)
{
return text.split("\r\n");
}
private static String convertDate(String mailDate)
{
return mailDate.substring(6)+"-"+mailDate.substring(3,5)+"-"+mailDate.substring(0,2);
}
public static String get_notes(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Anmerkungen:";
boolean isOneLineField = false;
String endMarker = "This email was sent by";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
} else if (line.contains(endMarker))
{
return returnString;
}
}
return returnString;
}
public static String get_publisher(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Verlag:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_journalTitle(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Zeitschrift:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_submitDate(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Datum der Einreichung:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return convertDate(returnString);
}
public static String get_releaseDate(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "(Voraussichtliches) Erscheinungsdatum:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return convertDate(returnString);
}
public static String get_costPrognosed(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Erwartete Kosten:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_currency(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Währung:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_costLoc(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Kostenstelle:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_correspondingAuthorIsPhMember(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Corresponding/Submitting Author ist Mitglied der Pädagogischen Hochschule Freiburg:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_partialFeesAccepted(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Die Übernahme der anteiligen Publikationskosten ist gewährleistet:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_fundingAcknowledgemetAccepted(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Im Falle einer Förderung werde ich der Publikation ein Funding Acknowledgement beifügen:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_oaGreenAccepted(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Mit der Zweitveröffentlichung auf OPUS erkläre ich mich einverstanden:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_applicationStage(String text)
{
return "0";
}
public static String get_email(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Ihre PH-E-Mail-Adresse:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_firstname(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Vorname:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_lastname(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Nachname:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_title(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "Titel des Aufsatzes:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_orcid(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "ORCID:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
public static String get_emailCostResponsiblePerson(String text)
{
String[] textArray = splitEmailText(text);
String startMarker = "E-Mail Adresse des Haushaltsbevollmächtigten bzw. des Projektleiters der angegebenen Kostenstelle:";
boolean isOneLineField = true;
String endMarker = "This email was sent by Pädagogische Hochschule Freiburg from URL:";
String returnString = "";
boolean startMakerDetected = false;
for (String line : textArray)
{
if (line.contains(startMarker))
{
if (isOneLineField)
{
return line.substring(startMarker.length()+1);
} else
{
returnString = line.substring(startMarker.length()+1);
startMakerDetected = true;
}
} else if (startMakerDetected && !isOneLineField && !line.contains(endMarker))
{
returnString += "\r\n" + line;
}
}
return returnString;
}
}

View File

@@ -0,0 +1,304 @@
package logic_reiheAPicker;
import java.io.File;
import java.io.FileInputStream;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import var_reiheAPicker.Constants;
public class GetButtonPics {
private static Image getImage(String resName)
{
File f = new File(resName);
if(f.exists() && !f.isDirectory()) {
FileInputStream inputStream;
Image image = null;
try
{
inputStream = new FileInputStream(resName);
image = new Image(inputStream);
}
catch (Exception e)
{
return null;
}
return image;
}
return null;
}
public static Image getButtonImage_ctrl()
{
if (Constants.ShowPicsInsteadOfButton)
{
return getImage(Constants.ResFolder+Constants.ResImageNamectrlPic);
} else
{
return getImage(Constants.ResFolder+Constants.ResImageNamectrlButton);
}
}
public static Image getButtonImage_Regulations()
{
return getImage(Constants.ResFolder+Constants.ResImageNameRegulations);
}
public static Image getButtonImage_SearchFolderOrFile()
{
return getImage(Constants.ResFolder+Constants.ResImageSearchFolderFile);
}
public static Image getButtonImage_LegalInfo()
{
return getImage(Constants.ResFolder+Constants.ResImageNameLegalInfo);
}
public static Image getButtonImage_arrowDown()
{
return getImage(Constants.ResFolder+Constants.ResImageNamearrowDown);
}
public static Image getButtonImage_arrowUp()
{
return getImage(Constants.ResFolder+Constants.ResImageNamearrowUp);
}
public static Image getButtonImage_arrowLeft()
{
return getImage(Constants.ResFolder+Constants.ResImageNamearrowLeft);
}
public static Image getButtonImage_arrowRight()
{
return getImage(Constants.ResFolder+Constants.ResImageNamearrowRight);
}
public static Image getButtonImage_F1()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef1);
}
public static Image getButtonImage_F2()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef2);
}
public static Image getButtonImage_F3()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef3);
}
public static Image getButtonImage_F4()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef4);
}
public static Image getButtonImage_F5()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef5);
}
public static Image getButtonImage_F6()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef6);
}
public static Image getButtonImage_F7()
{
return getImage(Constants.ResFolder+Constants.ResImageNamef7);
}
public static Image getButtonImage_refresh()
{
return getImage(Constants.ResFolder+Constants.ResImageRefresh);
}
public static Image getButtonImage_importButton()
{
return getImage(Constants.ResFolder+Constants.ResImageNameimport);
}
public static Image getButtonImage_backspace()
{
return getImage(Constants.ResFolder+Constants.ResImageNameBackspace);
}
public static Image getButtonImage_verticalLine()
{
return getImage(Constants.ResFolder+Constants.ResImageVerticalLine);
}
public static Image getButtonImage_closedEye()
{
return getImage(Constants.ResFolder+Constants.ResImageclosedEye);
}
public static Image getButtonImage_TooltipIcon()
{
return getImage(Constants.ResFolder+Constants.ResImageTooltipIcon);
}
public static Image getButtonImage_Narrower() {
return getImage(Constants.ResFolder+Constants.ResImageNarrower);
}
public static Image getButtonImage_Smaller() {
return getImage(Constants.ResFolder+Constants.ResImageSmaller);
}
public static Image getButtonImage_Taller() {
return getImage(Constants.ResFolder+Constants.ResImageTaller);
}
public static Image getButtonImage_Wider() {
return getImage(Constants.ResFolder+Constants.ResImageWider);
}
public static Image getButtonImage_FontTaller() {
return getImage(Constants.ResFolder+Constants.ResImageFontTaller);
}
public static Image getButtonImage_FontSmaller() {
return getImage(Constants.ResFolder+Constants.ResImageFontSmaller);
}
public static Image getButtonImage_ResImageHelpbestandsliteratur() {
return getImage(Constants.ResFolder+Constants.ResImageHelpbestandsliteratur);
}
public static Image getButtonImage_ResImageHelpCatSearch1() {
return getImage(Constants.ResFolder+Constants.ResImageHelpCatSearch1);
}
public static Image getButtonImage_ResImageHelpDDCWhitelist() {
return getImage(Constants.ResFolder+Constants.ResImageHelpDDCWhitelist);
}
public static Image getButtonImage_ResImageHelpmarkings() {
return getImage(Constants.ResFolder+Constants.ResImageHelpmarkings);
}
public static Image getButtonImage_ResImageHelpOpenAccess() {
return getImage(Constants.ResFolder+Constants.ResImageHelpOpenAccess);
}
public static Image getButtonImage_ResImageHelpprogress() {
return getImage(Constants.ResFolder+Constants.ResImageHelpprogress);
}
public static Image getButtonImage_ResImageHelpPublisherBlacklist() {
return getImage(Constants.ResFolder+Constants.ResImageHelpPublisherBlacklist);
}
public static Image getButtonImage_ResImageHelpFieldSettings() {
return getImage(Constants.ResFolder+Constants.ResImageHelpFieldSettings);
}
public static Image getButtonImage_QuestionMark_importSettings()
{
return getImage(Constants.ResFolder+Constants.ResImageQuestionMarkImportSettings);
}
public static Image getButtonImage_QuestionMark_general()
{
return getImage(Constants.ResFolder+Constants.ResImageQuestionMarkgeneral);
}
public static Image getButtonImage_IHV()
{
return getImage(Constants.ResFolder+Constants.ResImageIHV);
}
public static Image getButtonImage_IHT()
{
return getImage(Constants.ResFolder+Constants.ResImageIHT);
}
public static Image getButtonImage_QuestionMark()
{
return getImage(Constants.ResFolder+Constants.ResImageQuestionMark);
}
public static Image getButtonImage_Alt()
{
return getImage(Constants.ResFolder+Constants.ResImageAlt);
}
public static Image getButtonImage_reiheAPicker()
{
return getImage(Constants.ResFolder+Constants.ResImageReiheAPicker);
}
public static Image getButtonImage_saveButton()
{
return getImage(Constants.ResFolder+Constants.ResImageSaveButton);
}
public static Image getButtonImage_isbnChecker()
{
return getImage(Constants.ResFolder+Constants.ResImageIsbnChecker);
}
public static Image getButtonImage_viviButton()
{
return getImage(Constants.ResFolder+Constants.ResImageViviButton);
}
public static Image getButtonImage_snakeButton()
{
return getImage(Constants.ResFolder+Constants.ResImageSnakeButton);
}
public static Image getButtonImage_enter()
{
if (Constants.ShowPicsInsteadOfButton)
{
return getImage(Constants.ResFolder+Constants.ResImageNameenterPic);
} else
{
return getImage(Constants.ResFolder+Constants.ResImageNameenterButton);
}
}
public static Image getButtonImage_space()
{
if (Constants.ShowPicsInsteadOfButton)
{
return getImage(Constants.ResFolder+Constants.ResImageNamespacePic);
} else
{
return getImage(Constants.ResFolder+Constants.ResImageNamespaceButton);
}
}
public static Image getButtonImage_shift()
{
if (Constants.ShowPicsInsteadOfButton)
{
return getImage(Constants.ResFolder+Constants.ResImageNameshiftPic);
} else
{
return getImage(Constants.ResFolder+Constants.ResImageNameshiftButton);
}
}
public static ImageView turnPicIntoImageView(Image image, int height)
{
if (image != null)
{ ImageView view = new ImageView(image);
view.setFitHeight(height);
view.setPreserveRatio(true);
return view;
}
return null;
}
public static ImageView turnPicIntoImageView(Image image)
{
return turnPicIntoImageView(image, Constants.TooltipDefaultHeight);
}
}

View File

@@ -0,0 +1,514 @@
package logic_reiheAPicker;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.nio.file.CopyOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.io.ByteOrderMark;
import org.apache.commons.io.input.BOMInputStream;
import org.apache.commons.lang.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;
import var_reiheAPicker.Constants;
import javafx.stage.Stage;
//handles imports and exports for multipApiCall: Excel/csv/tsv import and Excel export
public class ImportExportFileHandler {
public static List<List<String>> importCsvOrTsvOrPsf() throws IOException
{
File file = getFileOrFolder(true);
return(getFileStringListFromFile(file));
}
public String copyFileToLocationReturnPath(File from, String toPathNoFileName) throws IOException
{
Path fromFile = Paths.get(from.getAbsolutePath());
Path toFile = Paths.get(toPathNoFileName + from.getName());
Files.copy(fromFile, toFile);
return toPathNoFileName + from.getName();
}
public static void exportFile(String contentString, String location)
{
try{
/*
javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
fileChooser.getExtensionFilters().addAll(new ExtensionFilter("All Files", "*.*"));
File userSelection = fileChooser.showSaveDialog(new Stage());
*/
File file = new File(location);
Writer fstream = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);
BufferedWriter out = new BufferedWriter(fstream);
out.write(contentString);
//Close the output stream
out.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
public static void saveFileList(List<String> list, String location)
{
try{
File file = new File(location);
Writer fstream = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);
BufferedWriter out = new BufferedWriter(fstream);
//FileWriter fstream = new FileWriter(location);
//BufferedWriter out = new BufferedWriter(fstream);
String saveString = "";
for(String column : list)
{
saveString += column;
saveString += "\t";
}
out.write(saveString);
//Close the output stream
out.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
public static void saveFileListList(List<List<String>> list, String location)
{
try{
File file = new File(location);
Writer fstream = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8);
BufferedWriter out = new BufferedWriter(fstream);
String saveString = "";
for (List<String> line : list)
{
for(String column : line)
{
saveString += column;
saveString += "\t";
}
saveString += "\n";
}
out.write(saveString);
//Close the output stream
out.close();
}catch (Exception e){//Catch exception if any
System.err.println("Error: " + e.getMessage());
}
}
public void openExportFileFolder() throws IOException
{
PropertyFileHandler propertyFileHandler = PropertyFileHandler.getInstance();
Runtime.getRuntime().exec("explorer " + propertyFileHandler.propertyFileModel.get_settings_ExportFileFolder());
}
public static void openSaveFileFolder() throws IOException
{
PropertyFileHandler propertyFileHandler = PropertyFileHandler.getInstance();
Runtime.getRuntime().exec("explorer " + propertyFileHandler.propertyFileModel.get_settings_SaveFileFolder());
}
public static String getTimeStamp()
{
SimpleDateFormat formatter= new SimpleDateFormat("yyyyMMdd_HHmmss");
String date = formatter.format(System.currentTimeMillis());
return date;
}
public static File getFileOrFolder(boolean folderFalseFileTrue)
{
//text: User input;
File fileChosen = null;
if (folderFalseFileTrue)
{
FileChooser chooser = new javafx.stage.FileChooser();
chooser.getExtensionFilters().addAll(new ExtensionFilter("Alle Dateien", "*.*"),
new ExtensionFilter("CSV", "*.csv*"),
new ExtensionFilter("TSV", "*.tsv*"),
new ExtensionFilter("Picker Save Files", "*.psv*"));
chooser.setTitle("Bitte Zieldatei auswählen");
fileChosen = chooser.showOpenDialog(new Stage());
} else
{
DirectoryChooser directoryChooser = new javafx.stage.DirectoryChooser();
directoryChooser.setTitle("Bitte Zielordner auswählen");
fileChosen = directoryChooser.showDialog(new Stage());
}
if (fileChosen == null)
{
System.out.println("Vorgang abgebrochen oder Datei nicht gefunden.");
return null;
}
return fileChosen;
}
//global import method, will handle csv/tsv
//will create and return a list (lines) of a List (columns)
//the subsequent mechanism all handle that specific file.
/*
public static String getFileStringListFromFile(String fileString) throws IOException
{
List<List<String>> rows = new ArrayList<List<String>>();
InputStream inputStream = new FileInputStream(new File(fileString));
String defaultEncoding = "UTF-8";
String separator = "";
BOMInputStream bOMInputStream = new BOMInputStream(inputStream);
ByteOrderMark bom = bOMInputStream.getBOM();
String charsetName = bom == null ? defaultEncoding : bom.getCharsetName();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(bOMInputStream), charsetName));
String line;
String file = "";
while ((line = bufferedReader.readLine()) != null) {
file += line;
}
inputStream.close();
bufferedReader.close();
return file;
}
*/
public static void importFondsManagerFilesFromImportLocation() throws IOException
{
PropertyFileHandler propertyFileHandler = PropertyFileHandler.getInstance();
List<String> importFiles;
String defaultEncoding = "UTF-8";
List<List<String>> rows = new ArrayList<List<String>>();
try (Stream<Path> walk = Files.walk(Paths.get(Constants.importLocation), 2)) {
importFiles = walk
.filter(p -> !Files.isDirectory(p)) // not a directory
.map(p -> p.toString().toLowerCase()) // convert path to string
.filter(f -> f.endsWith("eml")) // check end with
.collect(Collectors.toList()); // collect all matched to a List
}
boolean columnsAreSet = false;
for (String file : importFiles)
{
File currentFile = new File(file);
InputStream inputStream = new FileInputStream(currentFile.getAbsolutePath());
BOMInputStream bOMInputStream = new BOMInputStream(inputStream);
ByteOrderMark bom = bOMInputStream.getBOM();
String charsetName = bom == null ? defaultEncoding : bom.getCharsetName();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(bOMInputStream), charsetName));
String line;
boolean filePathSet = false;
String mailtext = "";
while ((line = bufferedReader.readLine()) != null) {
mailtext+= line + "\r\n";
}
inputStream.close();
DataBaseHandler dataBaseHandler = new DataBaseHandler();
try {
dataBaseHandler.fetchDataFromMailAndSave(mailtext);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
inputStream.close();
System.out.println(currentFile.toPath());
System.out.println(Constants.importLocation + currentFile.getName());
File destFile = new File(Constants.importDoneLocation + currentFile.getName());
if (destFile.exists())
{
destFile = new File(Constants.importDoneLocation + currentFile.getName() + "_copy");
Files.move(currentFile.toPath(), destFile.toPath());
} else
{
Files.move(currentFile.toPath(), destFile.toPath());
}
}
}
public static List<List<String>> importOrderFilesFromImportLocation() throws IOException
{
PropertyFileHandler propertyFileHandler = PropertyFileHandler.getInstance();
List<String> importFiles;
String defaultEncoding = "UTF-8";
List<List<String>> rows = new ArrayList<List<String>>();
try (Stream<Path> walk = Files.walk(Paths.get(propertyFileHandler.propertyFileModel.get_settings_Order_ImportVerzeichnisNameTextField()), 2)) {
importFiles = walk
.filter(p -> !Files.isDirectory(p)) // not a directory
.map(p -> p.toString().toLowerCase()) // convert path to string
.filter(f -> f.endsWith("ptf")) // check end with
.collect(Collectors.toList()); // collect all matched to a List
}
ArrayList<String> columns = new ArrayList<String>();
ArrayList<String> values = new ArrayList<String>();
boolean columnsAreSet = false;
for (String file : importFiles)
{
File currentFile = new File(file);
InputStream inputStream = new FileInputStream(currentFile.getAbsolutePath());
BOMInputStream bOMInputStream = new BOMInputStream(inputStream);
ByteOrderMark bom = bOMInputStream.getBOM();
String charsetName = bom == null ? defaultEncoding : bom.getCharsetName();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(bOMInputStream), charsetName));
String line;
boolean filePathSet = false;
while ((line = bufferedReader.readLine()) != null) {
if (columnsAreSet == false && line!= null && line.contains(": "))
{
columns.add(line.split(": ", 2)[0].replaceAll("\\s+",""));
if (!filePathSet)
{
columns.add("Dateipfad");
}
}
if (line!= null && !line.isBlank() && line.length()>2 && line.contains(": "))
{
System.out.println(line);
values.add(line.split(": ", 2)[1]);
if (!filePathSet)
{
values.add(file);
filePathSet = true;
}
}
}
inputStream.close();
if (rows.size() < 1)
{
rows.add(columns);
columnsAreSet = true;
}
rows.add(values);
values = new ArrayList<String>();
}
return rows;
}
public static String getOrdererFromSingleTitleFromFile(String filepath, int index, String ordererColumnName) throws IOException
{
String defaultEncoding = "UTF-8";
File currentFile = new File(filepath);
if(!currentFile.exists() || currentFile.isDirectory()) {
return "Fehler: Datei konnte nicht gefunden werden! Zwischenzeitliche Bearbeitung möglich.";
}
InputStream inputStream = new FileInputStream(currentFile.getAbsolutePath());
BOMInputStream bOMInputStream = new BOMInputStream(inputStream);
ByteOrderMark bom = bOMInputStream.getBOM();
String charsetName = bom == null ? defaultEncoding : bom.getCharsetName();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(bOMInputStream), charsetName));
String line;
while ((line = bufferedReader.readLine()) != null) {
if (line!= null && !line.isBlank() && line.length()>2 && line.contains(": ") && line.contains(ordererColumnName))
{
bufferedReader.close();
return(line.split(": ", 2)[1]);
}
}
bufferedReader.close();
return "Fehler: Aktuelle Zuweisung konnte nicht abgerufen werden";
}
public static void deleteFile(String filepath)
{
File file = new File(filepath);
if (file.delete()) {
System.out.println("Deleted the file: " + file.getName());
} else {
System.out.println("Failed to delete the file.");
}
}
//global import method, will handle csv/tsv
//will create and return a list (lines) of a List (columns)
//the subsequent mechanism all handle that specific file.
public static List<List<String>> getFileStringListFromFile(File fileChosen) throws IOException
{
List<List<String>> rows = new ArrayList<List<String>>();
if (fileChosen.exists())
{
InputStream inputStream = new FileInputStream(fileChosen.getAbsolutePath());
String defaultEncoding = "UTF-8";
String separator = "";
BOMInputStream bOMInputStream = new BOMInputStream(inputStream);
ByteOrderMark bom = bOMInputStream.getBOM();
String charsetName = bom == null ? defaultEncoding : bom.getCharsetName();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(bOMInputStream), charsetName));
String line;
while ((line = bufferedReader.readLine()) != null) {
int commaCounter = 0;
int tabCounter = 0;
int semicolonCounter = 0;
int seperatorCounter = 0;
if (separator.isEmpty())
{
//count Commas and Tabs in the first line (headings) and use that as a separator
//using comma as separator is a bit weird: Authors often use commas as separators for their names
//might still be useful if people only want to enrich very reduced file (issn/titel/...)
for (char character : line.toCharArray())
{
if (character == ',')
{
commaCounter ++;
} else if (character == '\t')
{
tabCounter ++;
} else if (character == ';')
{
semicolonCounter ++;
}
}
if (commaCounter > tabCounter && commaCounter > semicolonCounter)
{
separator = ",";
seperatorCounter = commaCounter;
}
if (tabCounter > commaCounter && tabCounter > semicolonCounter)
{
separator = "\t";
seperatorCounter = tabCounter;
}
if (semicolonCounter > tabCounter && semicolonCounter > commaCounter)
{
separator = ";";
seperatorCounter = semicolonCounter;
}
//separator = (commaCounter > tabCounter) ? "," : "\t";
}
if (separator.isEmpty())
{
//no separator? maybe its a file with only one issn per line...
ArrayList<String> columns = new ArrayList<String>();
columns.add(line.toString());
rows.add(columns);
} else
{
String[] array = line.split(separator);
ArrayList<String> columns = new ArrayList<String>();
for (String string : array)
{
columns.add(string);
}
rows.add(columns);
}
}
inputStream.close();
bufferedReader.close();
}
return rows;
}
//lineformatter: UI uses monospace font.
//so we need to count the chars in order to display the data properly
// i.e.:
//column A: Value 1
//col. B: Value 2
public static String lineFormatter(String heading, String data)
{
if (heading.toCharArray().length > 25)
{
heading = heading.substring(0,20);
heading += " (..): ";
} else
{
heading += ":";
int counter = 29 - heading.toCharArray().length;
for (;counter > 0; counter --)
{
heading += " ";
}
}
return heading + data + "\n";
}
}

View File

@@ -0,0 +1,65 @@
package logic_reiheAPicker;
public class JarWinkler {
public static double compute(final String s1, final String s2) {
// lowest score on empty strings
if (s1 == null || s2 == null || s1.isEmpty() || s2.isEmpty()) {
return 0;
}
// highest score on equal strings
if (s1.equals(s2)) {
return 1;
}
// some score on different strings
int prefixMatch = 0; // exact prefix matches
int matches = 0; // matches (including prefix and ones requiring transpostion)
int transpositions = 0; // matching characters that are not aligned but close together
int maxLength = Math.max(s1.length(), s2.length());
int maxMatchDistance = Math.max((int) Math.floor(maxLength / 2.0) - 1, 0); // look-ahead/-behind to limit transposed matches
// comparison
final String shorter = s1.length() < s2.length() ? s1 : s2;
final String longer = s1.length() >= s2.length() ? s1 : s2;
for (int i = 0; i < shorter.length(); i++) {
// check for exact matches
boolean match = shorter.charAt(i) == longer.charAt(i);
if (match) {
if (i < 4) {
// prefix match (of at most 4 characters, as described by the algorithm)
prefixMatch++;
}
matches++;
continue;
}
// check fro transposed matches
for (int j = Math.max(i - maxMatchDistance, 0); j < Math.min(i + maxMatchDistance, longer.length()); j++) {
if (i == j) {
// case already covered
continue;
}
// transposition required to match?
match = shorter.charAt(i) == longer.charAt(j);
if (match) {
transpositions++;
break;
}
}
}
// any matching characters?
if (matches == 0) {
return 0;
}
// modify transpositions (according to the algorithm)
transpositions = (int) (transpositions / 2.0);
// non prefix-boosted score
double score = 0.3334 * (matches / (double) longer.length() + matches / (double) shorter.length() + (matches - transpositions)
/ (double) matches);
if (score < 0.7) {
return score;
}
// we already have a good match, hence we boost the score proportional to the common prefix
double boostedScore = score + prefixMatch * 0.1 * (1.0 - score);
return boostedScore;
}
}

View File

@@ -0,0 +1,92 @@
package logic_reiheAPicker;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.util.Properties;
import models_reiheAPicker.PropertiesFileModel;
public class PropertyFileHandler {
private static final PropertyFileHandler propertyFileHandler = new PropertyFileHandler();
//propertiesFile Location
private String propertiesFileString = "./reiheAconfig.properties";
//addition 7.9.20;
public PropertiesFileModel propertyFileModel;
PropertyFileHandler()
{
try {
initConfigFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static PropertyFileHandler getInstance() {
return propertyFileHandler;
}
//Opens config file and loads config details
//If config file cannot be found: Create default Config file
private void initConfigFile() throws IOException
{
File configFile = new File(this.propertiesFileString);
if (!configFile.exists())
{
configFile.createNewFile();
this.propertyFileModel = new PropertiesFileModel();
savePropertiesFile(propertyFileModel.getProperties(), this.propertiesFileString);
} else if (this.propertyFileModel == null)
{
this.propertyFileModel = new PropertiesFileModel();
InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8);
Properties properties = new Properties();
properties.load(inputStreamReader);
this.propertyFileModel.setProperties(properties);
} else
{
InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8);
Properties properties = new Properties();
properties.load(inputStreamReader);
this.propertyFileModel.setProperties(properties);
}
}
//Saves Changes in "Options" Tab to config file
public void setConfigDetailGeneral(String settings_ExportFileFolder) throws IOException
{
this.propertyFileModel.setGeneralProperties(settings_ExportFileFolder);
savePropertiesFile(this.propertyFileModel.getProperties(), this.propertiesFileString);
return;
}
public void setConfigDetail() throws IOException
{
savePropertiesFile(this.propertyFileModel.getProperties(), this.propertiesFileString);
return;
}
//Save Properties File
private static void savePropertiesFile(Properties properties, String location) throws IOException
{
File helpTextFile = new File(location);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(helpTextFile), StandardCharsets.UTF_8);
properties.store(outputStreamWriter, "Properties");
outputStreamWriter.close();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,161 @@
package logic_reiheAPicker;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;
import var_reiheAPicker.Constants;
public class UpdateDataApiRunable extends Thread {
List<List<String>> titles;
int isbnIndex;
public float currentProgress = 0;
PropertyFileHandler propertyFileHandler;
ProgressIndicator progressIndicator;
Label progressLabel;
Stage progressStage;
private ApiCallerClass apiCaller;
private int flag = 0;
public UpdateDataApiRunable(List<List<String>> titles, int isbnIndex, ProgressIndicator progressIndicator, Label progressLabel)
{
this.apiCaller = new ApiCallerClass();
this.titles = titles;
this.isbnIndex = isbnIndex;
this.progressIndicator = progressIndicator;
this.propertyFileHandler = PropertyFileHandler.getInstance();
this.progressLabel = progressLabel;
}
public void setCurrentProgress(int max, int current, String feedbackApiString)
{
currentProgress = (float) ((float)current / (float) max);
int flag = this.flag;
Platform.runLater(new Runnable() {
@Override
public void run() {
progressIndicator.setProgress(currentProgress);
progressLabel.setText(feedbackApiString);
}
});
System.out.println(current + " of " + max + "; " + currentProgress * 100 + "%");
if (this.flag == 0)
{
this.flag = 1;
} else
{
this.flag = 0;
}
}
public void run()
{
updateTitles();
}
private List<List<String>> updateTitles()
{
String feedbackApiString = "";
for(int counter = 1; counter <= titles.size()-1; counter ++)
{
try {
titles.get(counter).set(2, callApi(titles.get(counter).get(isbnIndex)));
float secondsRemaining = (float) ((titles.size()-1 - counter) * 0.11);
int minutesRemaining = (int) (secondsRemaining / 60);
int AfterMinutessecondsRemaining = (int) (secondsRemaining % 60);
feedbackApiString = "Prüfe Titel " + counter + "/" + titles.size() + ". ~" + minutesRemaining + ":" + AfterMinutessecondsRemaining + " verbleibend.";
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
setCurrentProgress(titles.size()-1, counter, feedbackApiString);
}
setCurrentProgress(1,1, "Done!");
return titles;
}
private String callApi(String isbnsField) throws MalformedURLException, InterruptedException
{
URL apiLink;
String[] isbns = isbnsField.replace(" ", "").split(";");
if (!propertyFileHandler.propertyFileModel.get_settings_API_link().isBlank() && isbns.length >= 1)
{
if (isbns != null && isbns.length > 0 && !isbns[0].equals("-"))
{
String isbnSearchTerm = "";
int counter = 0;
for (String isbn : isbns)
{
if (isbnSearchTerm.isBlank())
{
isbnSearchTerm = isbn;
} else
{
isbnSearchTerm = isbnSearchTerm + this.propertyFileHandler.propertyFileModel.get_settings_API_isbnSeparator() + isbn;
}
}
if (!isbnSearchTerm.isBlank())
{
apiLink = new URL(propertyFileHandler.propertyFileModel.get_settings_API_link().replace(Constants.isbnWildcard, isbnSearchTerm));
String response = this.apiCaller.callUrlLimitedWaitTime(apiLink);
String returnString = "";
if (!response.isBlank())
{
if (response.contains(Constants.oaSearchTerm))
{
returnString = Constants.oaMarker;
}
if (response.contains(propertyFileHandler.propertyFileModel.get_settings_API_sigil()))
{
if (returnString.isBlank())
{
returnString = Constants.bestandvorhanden;
} else
{
returnString = Constants.bestandvorhanden + ", " + returnString;
}
} else
{
if (returnString.isBlank())
{
returnString = Constants.bestandnichtvorhanden;
} else
{
returnString = Constants.bestandnichtvorhanden + ", " + returnString;
}
}
return returnString;
}
}
}
}
return("Prüfung nicht möglich");
}
}

View File

@@ -0,0 +1,19 @@
package models_reiheAPicker;
import javafx.scene.control.TextArea;
public class CustomTextAreaPickerTab extends TextArea {
private ListEnum listEnum;
public CustomTextAreaPickerTab(ListEnum listEnum)
{
this.listEnum = listEnum;
}
public ListEnum getListEnum() {
return listEnum;
}
}

View File

@@ -0,0 +1,25 @@
package models_reiheAPicker;
public class DdcWhiteListModel {
private double ddcNumber;
private boolean covers0to100;
public DdcWhiteListModel(double ddcNumber, boolean covers0to100)
{
this.ddcNumber = ddcNumber;
this.covers0to100 = covers0to100;
}
public double getDdcNumber()
{
return this.ddcNumber;
}
public boolean getCovers0to100()
{
return this.covers0to100;
}
}

View File

@@ -0,0 +1,98 @@
package models_reiheAPicker;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import logic_reiheAPicker.FondsManager_getDataFromEmail;
public class FondsManager_applicationModel {
public FondsManager_publicationModel publicationModel;
public FondsManager_authorModel authorModel;
public FondsManager_applicationModel(String mailtext)
{
mailtext = mailtext.replace("=\r\n", "");
mailtext = mailtext.replace("=C3=B6", "ö");
mailtext = mailtext.replace("=C3=A4", "ä");
mailtext = mailtext.replace("=C3=BC", "ü");
mailtext = mailtext.replace("=c3=96", "Ö");
mailtext = mailtext.replace("=c3=84", "Ä");
mailtext = mailtext.replace("=C3=9C", "Ü");
System.out.println(mailtext);
this.publicationModel = new FondsManager_publicationModel(mailtext);
this.authorModel = new FondsManager_authorModel(mailtext);
}
public FondsManager_applicationModel(int id_publication, String initialEmail,String notes,String title,String publisher,String journalTitle, String submitDate,
String releaseDate,String costPrognosed,String currency,String costLoc,String correspondingAuthorIsPhMember,
String partialFeesAccepted, String fundingAcknowledgemetAccepted,String oaGreenAccepted,String applicationStage,String emailCostPersonResponsible, String comment_intern,
int id_author, String email, String firstname, String lastname, String orcid, String phone) //List<String> fieldList)
{
this.publicationModel = new FondsManager_publicationModel(id_publication, initialEmail,notes,title,publisher,submitDate,
releaseDate,costPrognosed,currency,costLoc,correspondingAuthorIsPhMember,
partialFeesAccepted, fundingAcknowledgemetAccepted,oaGreenAccepted,applicationStage,emailCostPersonResponsible, journalTitle, comment_intern);
this.authorModel = new FondsManager_authorModel(id_author, email, firstname, lastname, orcid, phone);
}
public List<String> getValues()
{
List<String> values = new ArrayList<String>();
values.add(Integer.toString( this.publicationModel.id));
values.add(this.publicationModel.initialEmail);
values.add(this.publicationModel.notes);
values.add(this.publicationModel.title);
values.add(this.publicationModel.publisher);
values.add(this.publicationModel.journalTitle);
values.add(this.publicationModel.submitDate);
values.add(this.publicationModel.releaseDate);
values.add(this.publicationModel.costPrognosed);
values.add(this.publicationModel.currency);
values.add(this.publicationModel.costLoc);
values.add(this.publicationModel.applicationStage);
values.add(this.publicationModel.emailCostPersonResponsible);
values.add(this.publicationModel.comment_intern);
values.add(Integer.toString( this.authorModel.id));
values.add(this.authorModel.email);
values.add(this.authorModel.firstname);
values.add(this.authorModel.lastname);
values.add(this.authorModel.orcid);
values.add(this.authorModel.phone);
return values;
}
public List<String> getColumns()
{
List<String> columns = new ArrayList<String>();
columns.add("id_Publikation");
columns.add("Antragstext");
columns.add("Kommentar");
columns.add("Titel");
columns.add("Verlag");
columns.add("Zeitschrift");
columns.add("Eingereicht am");
columns.add("Erscheint am");
columns.add("APC");
columns.add("Waehrung");
columns.add("Kostenstelle");
columns.add("Status");
columns.add("HaushaltsBVM");
columns.add("Hinweis");
columns.add("id_Autor");
columns.add("E-Mail");
columns.add("Vorname");
columns.add("Nachname");
columns.add("Orcid");
columns.add("Telefon");
return columns;
}
}

View File

@@ -0,0 +1,34 @@
package models_reiheAPicker;
import logic_reiheAPicker.FondsManager_getDataFromEmail;
public class FondsManager_authorModel {
public int id;
public String email;
public String firstname;
public String lastname;
public String orcid;
public int isPhMember;
public String phone;
public FondsManager_authorModel(String initialEmail)
{
this.email = FondsManager_getDataFromEmail.get_email(initialEmail);
this.firstname = FondsManager_getDataFromEmail.get_firstname(initialEmail);
this.lastname = FondsManager_getDataFromEmail.get_lastname(initialEmail);
this.orcid = FondsManager_getDataFromEmail.get_orcid(initialEmail);
//this.phone
//this.isPhMember
}
public FondsManager_authorModel(int id, String email, String firstname, String lastname, String orcid, String phone)
{
this.id = id;
this.email = email;
this.firstname = firstname;
this.lastname = lastname;
this.orcid = orcid;
this.phone = phone;
}
}

View File

@@ -0,0 +1,76 @@
package models_reiheAPicker;
import java.util.Date;
import logic_reiheAPicker.FondsManager_getDataFromEmail;
public class FondsManager_publicationModel {
public int id;
public String title;
public String publisher;
public String journalTitle;
public String submitDate;
public String releaseDate;
public String costPrognosed;
public String currency;
public String costLoc;
public String correspondingAuthorIsPhMember;
public String partialFeesAccepted;
public String fundingAcknowledgemetAccepted;
public String oaGreenAccepted;
public String applicationStage;
public String emailCostPersonResponsible;
public String notes;
public String initialEmail;
public String dateOfApplication;
public String comment_intern;
public FondsManager_publicationModel(String initialEmail)
{
this.initialEmail = initialEmail;
this.notes = FondsManager_getDataFromEmail.get_notes(initialEmail);
this.title = FondsManager_getDataFromEmail.get_title(initialEmail);
this.publisher = FondsManager_getDataFromEmail.get_publisher(initialEmail);
this.submitDate = FondsManager_getDataFromEmail.get_submitDate(initialEmail);
this.releaseDate = FondsManager_getDataFromEmail.get_releaseDate(initialEmail);
this.costPrognosed = FondsManager_getDataFromEmail.get_costPrognosed(initialEmail);
this.currency = FondsManager_getDataFromEmail.get_currency(initialEmail);
this.costLoc = FondsManager_getDataFromEmail.get_costLoc(initialEmail);
this.correspondingAuthorIsPhMember = FondsManager_getDataFromEmail.get_correspondingAuthorIsPhMember(initialEmail);
this.partialFeesAccepted = FondsManager_getDataFromEmail.get_partialFeesAccepted(initialEmail);
this.fundingAcknowledgemetAccepted = FondsManager_getDataFromEmail.get_fundingAcknowledgemetAccepted(initialEmail);
this.oaGreenAccepted = FondsManager_getDataFromEmail.get_oaGreenAccepted(initialEmail);
this.applicationStage = FondsManager_getDataFromEmail.get_applicationStage(initialEmail);
this.emailCostPersonResponsible = FondsManager_getDataFromEmail.get_emailCostResponsiblePerson(initialEmail);
this.journalTitle = FondsManager_getDataFromEmail.get_journalTitle(initialEmail);
}
public FondsManager_publicationModel(int id, String initialEmail,String notes,String title,String publisher,String submitDate,
String releaseDate,String costPrognosed,String currency,String costLoc,String correspondingAuthorIsPhMember,
String partialFeesAccepted, String fundingAcknowledgemetAccepted,String oaGreenAccepted,String applicationStage,String emailCostPersonResponsible,
String journalTitle, String comment_intern)
{
this.id = id;
this.initialEmail = initialEmail;
this.notes = notes;
this.title = title;
this.publisher = publisher;
this.journalTitle = journalTitle;
this.submitDate = submitDate;
this.releaseDate = releaseDate;
this.costPrognosed = costPrognosed;
this.currency = currency;
this.costLoc = costLoc;
this.correspondingAuthorIsPhMember = correspondingAuthorIsPhMember;
this.partialFeesAccepted = partialFeesAccepted;
this.fundingAcknowledgemetAccepted = fundingAcknowledgemetAccepted;
this.oaGreenAccepted = oaGreenAccepted;
this.applicationStage = applicationStage;
this.emailCostPersonResponsible = emailCostPersonResponsible;
this.comment_intern = comment_intern;
}
}

View File

@@ -0,0 +1,9 @@
package models_reiheAPicker;
public enum ListEnum {
PICKS,
QUEUE,
NOPES,
}

View File

@@ -0,0 +1,459 @@
package models_reiheAPicker;
import java.util.ArrayList;
import java.util.Map.Entry;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;
import var_reiheAPicker.Constants;
import java.util.Properties;
//new PropertiesFileModel
//created to simplifiy the task of creating new Properties in the config file
//also makes creating new fields in properties guy much easier
//in order to add a new property:
//(1) Create Field in this Model
//For example: private PropertyModel RandomCheckbox;
//(2) Add Field to Constructors
// (two separate ones, one with values, second one only created model with default values (in case no properties file detected))
// you have to add the new Property to both constructors
// One constructor takes the actual value (from the file), the default value, and the tagName for the file
// the second constructor
//(3) Add new Field to function "InitPropertyList"
//Function gathers all Properties in a list, so other Functions can be generic and iterate through that very list
//(5) create a getter Function
public class PropertiesFileModel {
private ArrayList<PropertyModel> PropertyModels;
private int _generalSetting_LaunchMode = 0;
//
private PropertyModel settings_FontSize;
private PropertyModel settings_QueueBoxWidth;
private PropertyModel settings_QueueBoxHeight;
private PropertyModel settings_ExportFileFolder;
private PropertyModel settings_PublisherBlacklist;
private PropertyModel settings_RemoveDuplicates;
private PropertyModel settings_DDCBlacklist;
private PropertyModel settings_DDCWhitelist;
private PropertyModel settings_BlockBelletristik;
private PropertyModel settings_SaveFileFolder;
private PropertyModel settings_f1search;
private PropertyModel settings_f2search;
private PropertyModel settings_f3search;
private PropertyModel settings_f4search;
private PropertyModel settings_f1searchShift;
private PropertyModel settings_f2searchShift;
private PropertyModel settings_f3searchShift;
private PropertyModel settings_f4searchShift;
private PropertyModel settings_f1searchCtrl;
private PropertyModel settings_f2searchCtrl;
private PropertyModel settings_f3searchCtrl;
private PropertyModel settings_f4searchCtrl;
private PropertyModel settings_stichwortmarkierungGruen;
private PropertyModel settings_stichwortmarkierungRot;
private PropertyModel settings_API_link;
private PropertyModel settings_API_CheckApiAfterImport;
private PropertyModel settings_API_RemoveHoldings;
private PropertyModel settings_API_sigil;
private PropertyModel settings_API_isbnSeparator;
private PropertyModel settings_API_markOA;
private PropertyModel settings_API_RemoveOA;
private PropertyModel settings_RemoveDuplicatesByTitle;
private PropertyModel settings_RemoveSchoolBooks;
private PropertyModel settings_RemoveJuvenileLiterature;
private PropertyModel settings_FieldDisplaySettings;
private PropertyModel settings_RemoveTitlesWithoutISBNsInQueue;
private PropertyModel settings_Order_ImportVerzeichnisNameTextField;
private PropertyModel settings_Order_DoneVerzeichnisNameTextField;
private PropertyModel settings_PickerOrOrdererName;
private PropertyModel settings_OtherOrdererNames;
public void updateProperties(String exportFileFolder,String settings_SaveFileFolder,String publisherBlacklist,String RemoveDuplicates,String dDCBlacklist,
String dDCWhitelist, String settings_BlockBelletristik, String settings_f1search,String settings_f2search,String settings_f3search,String settings_f4search,
String settings_f1searchShift,String settings_f2searchShift,String settings_f3searchShift,String settings_f4searchShift,String settings_f1searchCtrl,
String settings_f2searchCtrl,String settings_f3searchCtrl,String settings_f4searchCtrl, String settings_stichwortmarkierungGruen, String settings_stichwortmarkierungRot,
String settings_API_link, String settings_API_CheckApiAfterImport, String settings_API_RemoveHoldings, String settings_API_isbnSeparator, String settings_API_sigil, String settings_API_markOA, String settings_API_RemoveOA,
String settings_RemoveDuplicatesByTitle, String settings_RemoveSchoolBooks, String settings_RemoveJuvenileLiterature, String settings_FieldDisplaySettings,
String settings_RemoveTitlesWithoutISBNsInQueue, String settings_Order_ImportVerzeichnisNameTextField, String settings_Order_DoneVerzeichnisNameTextField,
String settings_PickerName, String settings_OtherOrdererNames)
{
this.settings_ExportFileFolder.setNewValue(exportFileFolder);
this.settings_SaveFileFolder.setNewValue(settings_SaveFileFolder);
this.settings_PublisherBlacklist.setNewValue(publisherBlacklist);
this.settings_RemoveDuplicates.setNewValue(RemoveDuplicates);
this.settings_DDCBlacklist.setNewValue(dDCBlacklist);
this.settings_DDCWhitelist.setNewValue(dDCWhitelist);
this.settings_BlockBelletristik.setNewValue(settings_BlockBelletristik);
this.settings_f1search.setNewValue(settings_f1search);
this.settings_f2search.setNewValue(settings_f2search);
this.settings_f3search.setNewValue(settings_f3search);
this.settings_f4search.setNewValue(settings_f4search);
this.settings_f1searchShift.setNewValue(settings_f1searchShift);
this.settings_f2searchShift.setNewValue(settings_f2searchShift);
this.settings_f3searchShift.setNewValue(settings_f3searchShift);
this.settings_f4searchShift.setNewValue(settings_f4searchShift);
this.settings_f1searchCtrl.setNewValue(settings_f1searchCtrl);
this.settings_f2searchCtrl.setNewValue(settings_f2searchCtrl);
this.settings_f3searchCtrl.setNewValue(settings_f3searchCtrl);
this.settings_f4searchCtrl.setNewValue(settings_f4searchCtrl);
this.settings_stichwortmarkierungGruen.setNewValue(settings_stichwortmarkierungGruen);
this.settings_stichwortmarkierungRot.setNewValue(settings_stichwortmarkierungRot);
this.settings_API_link.setNewValue(settings_API_link);
this.settings_API_CheckApiAfterImport.setNewValue(settings_API_CheckApiAfterImport);
this.settings_API_RemoveHoldings.setNewValue(settings_API_RemoveHoldings);
this.settings_API_isbnSeparator.setNewValue(settings_API_isbnSeparator);
this.settings_API_sigil.setNewValue(settings_API_sigil);
this.settings_API_markOA.setNewValue(settings_API_markOA);
this.settings_API_RemoveOA.setNewValue(settings_API_RemoveOA);
this.settings_RemoveDuplicatesByTitle.setNewValue(settings_RemoveDuplicatesByTitle);
this.settings_RemoveSchoolBooks.setNewValue(settings_RemoveSchoolBooks);
this.settings_RemoveJuvenileLiterature.setNewValue(settings_RemoveJuvenileLiterature);
this.settings_FieldDisplaySettings.setNewValue(settings_FieldDisplaySettings);
this.settings_RemoveTitlesWithoutISBNsInQueue.setNewValue(settings_RemoveTitlesWithoutISBNsInQueue);
this.settings_Order_ImportVerzeichnisNameTextField.setNewValue(settings_Order_ImportVerzeichnisNameTextField);
this.settings_Order_DoneVerzeichnisNameTextField.setNewValue(settings_Order_DoneVerzeichnisNameTextField);
this.settings_PickerOrOrdererName.setNewValue(settings_PickerName);
this.settings_OtherOrdererNames.setNewValue(settings_OtherOrdererNames);
}
public PropertiesFileModel(String settings_ExportFileFolder,String settings_SaveFileFolder, String settings_PublisherBlacklist, String settings_RemoveDuplicates, String settings_DDCBlacklist,
String settings_DDCWhitelist, String settings_BlockBelletristik, String settings_f1search,String settings_f2search,String settings_f3search,String settings_f4search,
String settings_f1searchShift,String settings_f2searchShift,String settings_f3searchShift,String settings_f4searchShift,String settings_f1searchCtrl,String settings_f2searchCtrl,
String settings_f3searchCtrl,String settings_f4searchCtrl, String settings_stichwortmarkierungGruen, String settings_stichwortmarkierungRot, String settings_API_link,
String settings_API_CheckApiAfterImport, String settings_API_RemoveHoldings, String settings_API_isbnSeparator, String settings_API_sigil, String settings_API_markOA, String settings_API_RemoveOA,
String settings_RemoveDuplicatesByTitle, String settings_RemoveSchoolBooks, String settings_RemoveJuvenileLiterature, String settings_FieldDisplaySettings,
String settings_RemoveTitlesWithoutISBNsInQueue, String settings_Order_ImportVerzeichnisNameTextField, String settings_Order_DoneVerzeichnisNameTextField,
String settings_PickerName, String settings_OtherOrdererNames)
{
this.settings_ExportFileFolder = new PropertyModel(settings_ExportFileFolder,"Dokumente","settings_ExportFileFolder");
this.settings_SaveFileFolder = new PropertyModel(settings_SaveFileFolder,"Dokumente","settings_SaveFileFolder");
this.settings_PublisherBlacklist = new PropertyModel(settings_PublisherBlacklist,"","settings_PublisherBlacklist");
this.settings_RemoveDuplicates = new PropertyModel(settings_RemoveDuplicates,"true","settings_RemoveDuplicates");
this.settings_DDCBlacklist = new PropertyModel(settings_DDCBlacklist,"","settings_DDCBlacklist");
this.settings_DDCWhitelist = new PropertyModel(settings_DDCWhitelist,"","settings_DDCWhitelist");
this.settings_BlockBelletristik = new PropertyModel(settings_BlockBelletristik, "", "settings_BlockBelletristik");
this.settings_f1search = new PropertyModel(settings_f1search, Constants.CatalogueUrlTitleSearch, "settings_f1search");
this.settings_f2search = new PropertyModel(settings_f2search, Constants.CatalogueUrlTitleAuthorSearch, "settings_f2search");
this.settings_f3search = new PropertyModel(settings_f3search, Constants.CatalogueUrlIsbnfSearch, "settings_f3search");
this.settings_f4search = new PropertyModel(settings_f4search, Constants.CatalogueUrlpublisherSearch, "settings_f4search");
this.settings_f1searchShift = new PropertyModel(settings_f1searchShift, "", "settings_f1searchShift");
this.settings_f2searchShift = new PropertyModel(settings_f2searchShift, "", "settings_f2searchShift");
this.settings_f3searchShift = new PropertyModel(settings_f3searchShift, "", "settings_f3searchShift");
this.settings_f4searchShift = new PropertyModel(settings_f4searchShift, "", "settings_f4searchShift");
this.settings_f1searchCtrl = new PropertyModel(settings_f1searchCtrl, "", "settings_f1searchCtrl");
this.settings_f2searchCtrl = new PropertyModel(settings_f2searchCtrl, "", "settings_f2searchCtrl");
this.settings_f3searchCtrl = new PropertyModel(settings_f3searchCtrl, "", "settings_f3searchCtrl");
this.settings_f4searchCtrl = new PropertyModel(settings_f4searchCtrl, "", "settings_f4searchCtrl");
this.settings_stichwortmarkierungGruen = new PropertyModel(settings_stichwortmarkierungGruen, "", "settings_stichwortmarkierungGruen");
this.settings_stichwortmarkierungRot = new PropertyModel(settings_stichwortmarkierungRot, "", "settings_stichwortmarkierungRot");
this.settings_API_link = new PropertyModel(settings_API_link, "", "settings_API_link");
this.settings_API_CheckApiAfterImport = new PropertyModel(settings_API_CheckApiAfterImport, "", "settings_API_CheckApiAfterImport");
this.settings_API_RemoveHoldings = new PropertyModel(settings_API_RemoveHoldings, "true", "settings_API_RemoveHoldings");
this.settings_API_isbnSeparator = new PropertyModel(settings_API_isbnSeparator, "true", "settings_API_isbnSeparator");
this.settings_API_sigil = new PropertyModel(settings_API_sigil, "", "settings_API_sigil");
this.settings_API_markOA = new PropertyModel(settings_API_markOA, "true", "settings_API_markOA");
this.settings_API_RemoveOA = new PropertyModel(settings_API_RemoveOA, "true", "settings_API_RemoveOA");
this.settings_RemoveDuplicatesByTitle = new PropertyModel(settings_RemoveDuplicatesByTitle, "", "settings_RemoveDuplicatesByTitle");
this.settings_RemoveSchoolBooks = new PropertyModel(settings_RemoveSchoolBooks, "", "settings_RemoveSchoolBooks");
this.settings_RemoveJuvenileLiterature = new PropertyModel(settings_RemoveJuvenileLiterature, "", "settings_RemoveJuvenileLiterature");
this.settings_FieldDisplaySettings = new PropertyModel(settings_FieldDisplaySettings, Constants.DefaultFieldDefinition, "settings_FieldDisplaySettings");
this.settings_RemoveTitlesWithoutISBNsInQueue = new PropertyModel(settings_RemoveTitlesWithoutISBNsInQueue, "", "settings_RemoveTitlesWithoutISBNsInQueue");
this.settings_Order_ImportVerzeichnisNameTextField = new PropertyModel(settings_Order_ImportVerzeichnisNameTextField, "", "settings_Order_ImportVerzeichnisNameTextField");
this.settings_Order_DoneVerzeichnisNameTextField = new PropertyModel(settings_Order_DoneVerzeichnisNameTextField, "", "settings_Order_DoneVerzeichnisNameTextField");
this.settings_PickerOrOrdererName = new PropertyModel(settings_PickerName, "", "settings_PickerName");
this.settings_OtherOrdererNames = new PropertyModel(settings_OtherOrdererNames, "", "settings_OtherOrdererNames");
initPropertyList();
}
public PropertiesFileModel()
{
this.settings_ExportFileFolder = new PropertyModel("Dokumente","settings_ExportFileFolder");
this.settings_SaveFileFolder = new PropertyModel("Dokumente","settings_SaveFileFolder");
this.settings_PublisherBlacklist = new PropertyModel("","settings_PublisherBlacklist");
this.settings_RemoveDuplicates = new PropertyModel("true","settings_RemoveDuplicates");
this.settings_DDCBlacklist = new PropertyModel("","settings_DDCBlacklist");
this.settings_DDCWhitelist = new PropertyModel("","settings_DDCWhitelist");
this.settings_BlockBelletristik = new PropertyModel("false", "settings_BlockBelletristik");
this.settings_f1search = new PropertyModel(Constants.CatalogueUrlTitleSearch, "settings_f1search");
this.settings_f2search = new PropertyModel(Constants.CatalogueUrlTitleAuthorSearch, "settings_f2search");
this.settings_f3search = new PropertyModel(Constants.CatalogueUrlIsbnfSearch, "settings_f3search");
this.settings_f4search = new PropertyModel(Constants.CatalogueUrlpublisherSearch, "settings_f4search");
this.settings_f1searchShift = new PropertyModel(Constants.KVKUrlTitleSearch, "settings_f1searchShift");
this.settings_f2searchShift = new PropertyModel(Constants.KVKUrlTitleAuthorSearch, "settings_f2searchShift");
this.settings_f3searchShift = new PropertyModel(Constants.KVKUrlIsbnfSearch, "settings_f3searchShift");
this.settings_f4searchShift = new PropertyModel(Constants.KVKUrlpublisherSearch , "settings_f4searchShift");
this.settings_f1searchCtrl = new PropertyModel(Constants.LehmannsUrlIsbnSearch, "settings_f1searchCtrl");
this.settings_f2searchCtrl = new PropertyModel(Constants.RombachUrlIsbnSearch, "settings_f2searchCtrl");
this.settings_f3searchCtrl = new PropertyModel(Constants.AmazonUrlIsbnSearch, "settings_f3searchCtrl");
this.settings_f4searchCtrl = new PropertyModel("", "settings_f4searchCtrl");
this.settings_stichwortmarkierungGruen = new PropertyModel("", "settings_stichwortmarkierungGruen");
this.settings_stichwortmarkierungRot = new PropertyModel("", "settings_stichwortmarkierungRot");
this.settings_API_link = new PropertyModel("https://sru.bsz-bw.de/swb?version=1.1&query=pica.isb%3D[{[isbn]}]&operation=searchRetrieve&maximumRecords=10&recordSchema=marcxmlk10os", "settings_API_link");
this.settings_API_CheckApiAfterImport = new PropertyModel("false", "settings_API_CheckApiAfterImport");
this.settings_API_RemoveHoldings = new PropertyModel("true", "settings_API_RemoveHoldings");
this.settings_API_isbnSeparator = new PropertyModel("+or+pica.isb%3D", "", "settings_API_isbnSeparator");
this.settings_API_sigil = new PropertyModel("DE-Frei129", "", "settings_API_sigil");
this.settings_API_markOA = new PropertyModel("true", "", "settings_API_markOA");
this.settings_API_RemoveOA = new PropertyModel("true", "", "settings_API_RemoveOA");
this.settings_RemoveDuplicatesByTitle = new PropertyModel("false", "", "settings_RemoveDuplicatesByTitle");
this.settings_RemoveSchoolBooks = new PropertyModel("false", "", "settings_RemoveSchoolBooks");
this.settings_RemoveJuvenileLiterature = new PropertyModel("false", "", "settings_RemoveJuvenileLiterature");
this.settings_FieldDisplaySettings = new PropertyModel(Constants.DefaultFieldDefinition, "settings_FieldDisplaySettings");
this.settings_RemoveTitlesWithoutISBNsInQueue = new PropertyModel("false", "settings_RemoveTitlesWithoutISBNsInQueue");
this.settings_Order_ImportVerzeichnisNameTextField = new PropertyModel("", "settings_Order_ImportVerzeichnisNameTextField");
this.settings_Order_DoneVerzeichnisNameTextField = new PropertyModel("", "settings_Order_DoneVerzeichnisNameTextField");
this.settings_PickerOrOrdererName = new PropertyModel("", "", "settings_PickerName");
this.settings_OtherOrdererNames = new PropertyModel("", "", "settings_OtherOrdererNames");
this.settings_FontSize = new PropertyModel("16", "", "settings_FontSize");
this.settings_QueueBoxWidth = new PropertyModel("", "", "settings_QueueBoxWidth");
this.settings_QueueBoxHeight = new PropertyModel("", "", "settings_QueueBoxHeight");
initPropertyList();
}
private void initPropertyList()
{
this.PropertyModels = new ArrayList<PropertyModel>();
this.PropertyModels.add(this.settings_ExportFileFolder);
this.PropertyModels.add(this.settings_SaveFileFolder);
this.PropertyModels.add(this.settings_PublisherBlacklist);
this.PropertyModels.add(this.settings_RemoveDuplicates);
this.PropertyModels.add(this.settings_DDCBlacklist);
this.PropertyModels.add(this.settings_DDCWhitelist);
this.PropertyModels.add(this.settings_BlockBelletristik);
this.PropertyModels.add(this.settings_f1search);
this.PropertyModels.add(this.settings_f2search);
this.PropertyModels.add(this.settings_f3search);
this.PropertyModels.add(this.settings_f4search);
this.PropertyModels.add(this.settings_f1searchShift);
this.PropertyModels.add(this.settings_f2searchShift);
this.PropertyModels.add(this.settings_f3searchShift);
this.PropertyModels.add(this.settings_f4searchShift);
this.PropertyModels.add(this.settings_f1searchCtrl);
this.PropertyModels.add(this.settings_f2searchCtrl);
this.PropertyModels.add(this.settings_f3searchCtrl);
this.PropertyModels.add(this.settings_f4searchCtrl);
this.PropertyModels.add(this.settings_stichwortmarkierungGruen);
this.PropertyModels.add(this.settings_stichwortmarkierungRot);
this.PropertyModels.add(this.settings_API_link);
this.PropertyModels.add(this.settings_API_CheckApiAfterImport);
this.PropertyModels.add(this.settings_API_RemoveHoldings);
this.PropertyModels.add(this.settings_API_sigil);
this.PropertyModels.add(this.settings_API_isbnSeparator);
this.PropertyModels.add(this.settings_API_markOA);
this.PropertyModels.add(this.settings_API_RemoveOA);
this.PropertyModels.add(this.settings_RemoveDuplicatesByTitle);
this.PropertyModels.add(this.settings_RemoveSchoolBooks);
this.PropertyModels.add(this.settings_RemoveJuvenileLiterature);
this.PropertyModels.add(this.settings_FieldDisplaySettings);
this.PropertyModels.add(this.settings_RemoveTitlesWithoutISBNsInQueue);
this.PropertyModels.add(this.settings_Order_ImportVerzeichnisNameTextField);
this.PropertyModels.add(this.settings_Order_DoneVerzeichnisNameTextField);
this.PropertyModels.add(this.settings_PickerOrOrdererName);
this.PropertyModels.add(this.settings_OtherOrdererNames);
this.PropertyModels.add(settings_FontSize);
this.PropertyModels.add(settings_QueueBoxWidth);
this.PropertyModels.add(settings_QueueBoxHeight);
}
public void setGeneralProperties(String settings_ExportFileFolder)
{
this.settings_ExportFileFolder.setNewValue(settings_ExportFileFolder);
initPropertyList();
}
public Properties getProperties()
{
Properties properties = new Properties();
for(PropertyModel propertyModel: PropertyModels)
{
properties.setProperty(propertyModel.TagNameValue, propertyModel.getCurrentValue());
}
return properties;
}
public void setProperties(Properties propertiesFile)
{
for (Entry<Object, Object> propertyFileItem : propertiesFile.entrySet())
{
for (PropertyModel propertyModel : PropertyModels)
{
if (propertyFileItem.getKey().equals(propertyModel.TagNameValue))
{
propertyModel.setNewValue(propertyFileItem.getValue().toString());
}
}
}
initPropertyList();
return;
}
public int get_settingsLaunchMode()
{
return this._generalSetting_LaunchMode;
}
public void set_settingsPickerLaunchMode()
{
this._generalSetting_LaunchMode = 0;
}
public void set_settingsOrderLaunchMode()
{
this._generalSetting_LaunchMode = 1;
}
public void set_settingsPubFundMode()
{
this._generalSetting_LaunchMode = 2;
}
public String get_settings_ExportFileFolder()
{
return this.settings_ExportFileFolder.getCurrentValue();
}
public String get_settings_PublisherBlacklist()
{
return this.settings_PublisherBlacklist.getCurrentValue();
}
public String get_settings_RemoveDuplicates()
{
return this.settings_RemoveDuplicates.getCurrentValue();
}
public String get_settings_DDCBlacklist()
{
return this.settings_DDCBlacklist.getCurrentValue();
}
public String get_settings_DDCWhitelist()
{
return this.settings_DDCWhitelist.getCurrentValue();
}
public String get_settings_BlockBelletristik()
{
return this.settings_BlockBelletristik.getCurrentValue();
}
public String get_settings_SaveFileFolder()
{
return this.settings_SaveFileFolder.getCurrentValue();
}
public void set_settings_FontSize (String fontSize){this.settings_FontSize.setNewValue(fontSize);}
public void set_settings_QueueBoxWidth (String queueBoxWidth){this.settings_QueueBoxWidth.setNewValue(queueBoxWidth);}
public void set_settings_QueueBoxHeight (String queueBoxHeight) { this.settings_QueueBoxHeight.setNewValue(queueBoxHeight);}
public String get_settings_FontSize (){ return this.settings_FontSize .getCurrentValue();}
public String get_settings_QueueBoxWidth (){ return this.settings_QueueBoxWidth .getCurrentValue();}
public String get_settings_QueueBoxHeight (){ return this.settings_QueueBoxHeight .getCurrentValue();}
public String get_settings_stichwortmarkierungGruen (){return this.settings_stichwortmarkierungGruen .getCurrentValue();}
public String get_settings_stichwortmarkierungRot (){return this.settings_stichwortmarkierungRot .getCurrentValue();}
public String get_settings_API_link () {return this.settings_API_link.getCurrentValue();}
public String get_settings_f1search (){return this.settings_f1search .getCurrentValue();}
public String get_settings_f2search (){return this.settings_f2search .getCurrentValue();}
public String get_settings_f3search (){return this.settings_f3search .getCurrentValue();}
public String get_settings_f4search (){return this.settings_f4search .getCurrentValue();}
public String get_settings_f1searchShift(){return this.settings_f1searchShift.getCurrentValue();}
public String get_settings_f2searchShift(){return this.settings_f2searchShift.getCurrentValue();}
public String get_settings_f3searchShift(){return this.settings_f3searchShift.getCurrentValue();}
public String get_settings_f4searchShift(){return this.settings_f4searchShift.getCurrentValue();}
public String get_settings_f1searchCtrl (){return this.settings_f1searchCtrl .getCurrentValue();}
public String get_settings_f2searchCtrl (){return this.settings_f2searchCtrl .getCurrentValue();}
public String get_settings_f3searchCtrl (){return this.settings_f3searchCtrl .getCurrentValue();}
public String get_settings_f4searchCtrl (){return this.settings_f4searchCtrl .getCurrentValue();}
public String get_settings_API_sigil (){return this.settings_API_sigil .getCurrentValue();}
public String get_settings_API_isbnSeparator (){return this.settings_API_isbnSeparator .getCurrentValue();}
public String get_settings_API_markOA (){return this.settings_API_markOA .getCurrentValue();}
public String get_settings_API_RemoveOA (){return this.settings_API_RemoveOA .getCurrentValue();}
public String get_settings_API_CheckApiAfterImport (){return this.settings_API_CheckApiAfterImport .getCurrentValue();}
public String get_settings_API_RemoveHoldings (){return this.settings_API_RemoveHoldings .getCurrentValue();}
public String get_settings_RemoveDuplicatesByTitle (){return this.settings_RemoveDuplicatesByTitle .getCurrentValue();}
public String get_settings_RemoveSchoolBooks (){return this.settings_RemoveSchoolBooks .getCurrentValue();}
public String get_settings_RemoveJuvenileLiterature (){return this.settings_RemoveJuvenileLiterature .getCurrentValue();}
public String get_settings_FieldDisplaySettings () {return this.settings_FieldDisplaySettings.getCurrentValue();}
public String get_settings_RemoveTitlesWithoutISBNsInQueue () {return this.settings_RemoveTitlesWithoutISBNsInQueue.getCurrentValue();}
public String get_settings_Order_ImportVerzeichnisNameTextField () {return this.settings_Order_ImportVerzeichnisNameTextField.getCurrentValue();}
public String get_settings_Order_DoneVerzeichnisNameTextField () {return this.settings_Order_DoneVerzeichnisNameTextField.getCurrentValue();}
public String get_settings_PickerOrOrdererName () {return this.settings_PickerOrOrdererName.getCurrentValue();}
public String get_settings_OtherOrdererNames () {return this.settings_OtherOrdererNames.getCurrentValue();}
/*
public String get_labels_ExportFileFolder()
{
return this.settings_ExportFileFolder.getTagNameValue();
}
public String get_labels_PublisherBlacklist()
{
return this.settings_PublisherBlacklist.getTagNameValue();
}
public String get_labels_RemoveDuplicates()
{
return this.settings_RemoveDuplicates.getTagNameValue();
}
public String get_labels_DDCBlacklist()
{
return this.settings_DDCBlacklist.getTagNameValue();
}
public String get_labels_DDCWhitelist()
{
return this.settings_DDCWhitelist.getTagNameValue();
}
public String get_labels_BlockBelletristik()
{
return this.settings_BlockBelletristik.getTagNameValue();
}
public String get_labels_SaveFileFolder()
{
return this.settings_SaveFileFolder.getTagNameValue();
}
public String get_labels_f1search (){return this.settings_f1search .getTagNameValue();}
public String get_labels_f2search (){return this.settings_f2search .getTagNameValue();}
public String get_labels_f3search (){return this.settings_f3search .getTagNameValue();}
public String get_labels_f4search (){return this.settings_f4search .getTagNameValue();}
public String get_labels_f1searchShift(){return this.settings_f1searchShift.getTagNameValue();}
public String get_labels_f2searchShift(){return this.settings_f2searchShift.getTagNameValue();}
public String get_labels_f3searchShift(){return this.settings_f3searchShift.getTagNameValue();}
public String get_labels_f4searchShift(){return this.settings_f4searchShift.getTagNameValue();}
public String get_labels_f1searchCtrl (){return this.settings_f1searchCtrl .getTagNameValue();}
public String get_labels_f2searchCtrl (){return this.settings_f2searchCtrl .getTagNameValue();}
public String get_labels_f3searchCtrl (){return this.settings_f3searchCtrl .getTagNameValue();}
public String get_labels_f4searchCtrl (){return this.settings_f4searchCtrl .getTagNameValue();}
public String get_labels_API_sigil (){return this.settings_API_sigil .getTagNameValue();}
public String get_labels_API_isbnSeparator (){return this.settings_API_isbnSeparator .getTagNameValue();}
public String get_labels_API_markOA (){return this.settings_API_markOA .getTagNameValue();}
public String get_labels_API_RemoveOA (){return this.settings_API_RemoveOA .getTagNameValue();}
public String get_labels_API_RemoveHoldings (){return this.settings_API_RemoveHoldings .getTagNameValue();}
public String get_labels_API_CheckApiAfterImport (){return this.settings_API_CheckApiAfterImport .getTagNameValue();}
public String get_labels_stichwortmarkierungGruen (){return this.settings_stichwortmarkierungGruen .getTagNameValue();}
public String get_labels_stichwortmarkierungRot (){return this.settings_stichwortmarkierungRot .getTagNameValue();}
public String get_Labels_API_link () {return this.settings_API_link.getTagNameValue();}
*/
}

View File

@@ -0,0 +1,52 @@
package models_reiheAPicker;
//only used in model: PropertyFileModel
//Basic propertyEntity
//InitialValue not needed as of now
public class PropertyModel {
public final String TagNameValue;
private String CurrentValue;
private String InitialValue;
private String DefaultValue;
public PropertyModel(String currentValue, String defaultValue, String tagNameValue) {
this.CurrentValue = currentValue;
this.InitialValue = currentValue;
this.DefaultValue = defaultValue;
this.TagNameValue = tagNameValue;
}
public PropertyModel(String defaultValue, String tagNameValue) {
this.CurrentValue = defaultValue;
this.InitialValue = defaultValue;
this.DefaultValue = defaultValue;
this.TagNameValue = tagNameValue;
}
public String getCurrentValue()
{
return this.CurrentValue;
}
public String getInitialValue()
{
return this.InitialValue;
}
public String getDefaultValue()
{
return this.DefaultValue;
}
public String getTagNameValue()
{
return this.TagNameValue;
}
public void setNewValue(String newValue)
{
this.CurrentValue = newValue;
this.InitialValue = newValue;
}
}

View File

@@ -0,0 +1,14 @@
package models_reiheAPicker;
public class PublisherAmountBooksModel {
public String publisher;
public int numberOfBooks;
public PublisherAmountBooksModel(String publisher, int numberOfBooks)
{
this.publisher = publisher;
this.numberOfBooks = numberOfBooks;
}
}

View File

@@ -0,0 +1,5 @@
package models_reiheAPicker;
public class TitleModel {
}

18
src/module-info.java Normal file
View File

@@ -0,0 +1,18 @@
module reiheAPicker {
requires javafx.graphics;
requires javafx.controls;
requires org.apache.commons.io;
requires javafx.base;
requires java.desktop;
requires java.xml;
requires org.jsoup;
requires org.json;
requires commons.lang;
requires poi;
requires poi.ooxml;
requires java.base;
requires java.datatransfer;
requires java.sql;
requires okhttp3;
opens launcher to javafx.graphics;
}

Some files were not shown because too many files have changed in this diff Show More