Skip to content

WIP Restapi#628

Closed
Siedlerchr wants to merge 35 commits into
mainfrom
restapi
Closed

WIP Restapi#628
Siedlerchr wants to merge 35 commits into
mainfrom
restapi

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Sep 21, 2022

Copy link
Copy Markdown
Member

This ports the code of https://github.com/UST-QuAntiL/PlanQK-Library to JabRef's core.

Comment thread src/main/resources/xjc/medline/dtd/pubmed_190101.dtd Outdated
Comment thread src/main/resources/xjc/medline/dtd/mathml3-qname1.mod Outdated
TODO fix javafx inject errors
Comment thread src/main/java/org/jabref/gui/EntryTypeView.java Outdated
* upstream/main: (42 commits)
  Place subgroups w.r.t. alphabetical ordering (JabRef#9228)
  DOAB Fetcher now fetches ISBN and imprint fields where possible (JabRef#9229)
  ISSUE-9145: implement isbn fetcher (JabRef#9205)
  Remove explicit javafx jmod stuff (JabRef#9245)
  New Crowdin updates (JabRef#9239)
  Support Arabic language (JabRef#9243)
  Process CLI arguments before starting gui (JabRef#9217)
  Update README Decision Records link (JabRef#9241)
  Opening a file removes duplicate keywords and triggers lib changed (JabRef#9216)
  New Crowdin updates (JabRef#9237)
  Add Ukrainian as language (JabRef#9236)
  Add ADR-0026 on using Swing's FileChooser (JabRef#9235)
  Log exception (JabRef#9227)
  Fix archunit (JabRef#9234)
  Bump tika-core from 2.4.1 to 2.5.0 (JabRef#9232)
  Check group type before showing dialog in edit group (JabRef#8909)
  Fix unexpected closing of preferences dialog (JabRef#9225)
  Fix typo in connection error message (JabRef#9226)
  Improve VSCode config (JabRef#9218)
  Searching for an entry on the web shouldn't take forever (JabRef#9199)
  ...

# Conflicts:
#	build.gradle
#	lib/afterburner.fx.jar
#	src/main/java/org/jabref/cli/Launcher.java
#	src/main/java/org/jabref/gui/EntryTypeView.java
#	src/main/java/org/jabref/gui/auximport/FromAuxDialog.java
#	src/main/java/org/jabref/gui/bibtexextractor/ExtractBibtexDialog.java
#	src/main/java/org/jabref/gui/collab/ExternalChangesResolverDialog.java
#	src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanel.java
#	src/main/java/org/jabref/gui/contentselector/ContentSelectorDialogView.java
#	src/main/java/org/jabref/gui/customentrytypes/CustomizeEntryTypeDialogView.java
#	src/main/java/org/jabref/gui/documentviewer/DocumentViewerView.java
#	src/main/java/org/jabref/gui/edit/ManageKeywordsDialog.java
#	src/main/java/org/jabref/gui/entryeditor/EntryEditor.java
#	src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationTabView.java
#	src/main/java/org/jabref/gui/errorconsole/ErrorConsoleView.java
#	src/main/java/org/jabref/gui/exporter/CreateModifyExporterDialogView.java
#	src/main/java/org/jabref/gui/externalfiles/UnlinkedFilesDialogView.java
#	src/main/java/org/jabref/gui/help/AboutDialogView.java
#	src/main/java/org/jabref/gui/importer/ImportCustomEntryTypesDialog.java
#	src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java
#	src/main/java/org/jabref/gui/integrity/IntegrityCheckDialog.java
#	src/main/java/org/jabref/gui/libraryproperties/AbstractPropertiesTabView.java
#	src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesView.java
#	src/main/java/org/jabref/gui/libraryproperties/constants/ConstantsPropertiesView.java
#	src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesView.java
#	src/main/java/org/jabref/gui/libraryproperties/keypattern/KeyPatternPropertiesView.java
#	src/main/java/org/jabref/gui/libraryproperties/saving/SavingPropertiesView.java
#	src/main/java/org/jabref/gui/linkedfile/LinkedFileEditDialogView.java
#	src/main/java/org/jabref/gui/openoffice/ManageCitationsDialogView.java
#	src/main/java/org/jabref/gui/openoffice/StyleSelectDialogView.java
#	src/main/java/org/jabref/gui/preferences/AbstractPreferenceTabView.java
#	src/main/java/org/jabref/gui/preferences/PreferencesDialogView.java
#	src/main/java/org/jabref/gui/preferences/customexporter/CustomExporterTab.java
#	src/main/java/org/jabref/gui/preferences/externalfiletypes/EditExternalFileTypeEntryDialog.java
#	src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTab.java
#	src/main/java/org/jabref/gui/preferences/keybindings/KeyBindingsTab.java
#	src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java
#	src/main/java/org/jabref/gui/preferences/protectedterms/ProtectedTermsTab.java
#	src/main/java/org/jabref/gui/search/GlobalSearchResultDialog.java
#	src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialogView.java
#	src/main/java/org/jabref/gui/slr/ManageStudyDefinitionView.java
#	src/main/java/org/jabref/gui/texparser/ParseLatexDialogView.java
#	src/main/java/org/jabref/gui/texparser/ParseLatexResultView.java
Comment thread src/main/java/org/jabref/logic/pdf/search/indexing/IndexingTaskManager.java.orig Outdated
@Siedlerchr

Copy link
Copy Markdown
Member Author

Further idea: https://foojay.io/today/whats-new-in-jakarta-rest-3-1-in-jakarta-ee-10/
No cotainer necessary as it seems

@koppor

koppor commented Jan 5, 2023

Copy link
Copy Markdown
Member

Quoting from the article:

In the past, to run a Jakarta EE REST application required a full deployment to a compatible runtime like the Payara Platform or Payara Cloud. Jakarta REST 3.1 in Jakarta EE 10 introduced a new API to bootstrap REST resources outside of a container.

The simplest way to get a REST API deployed is to call the start() method on the jakarta.ws.rs. SeBootstrap class. This method returns a CompletionStage that you can then chain for different purposes.

@koppor

koppor commented Jan 5, 2023

Copy link
Copy Markdown
Member

Maybe, we just need to remove dependencies and call the start method? 1 hour pair programming?

@Siedlerchr

Copy link
Copy Markdown
Member Author

* upstream/main: (244 commits)
  Use Set instead of List for custom journal abbreviations (JabRef#9515)
  Delete snap.yml (JabRef#9526)
  New Crowdin updates (JabRef#9523)
  Fix not on fx thread error when downloading file (JabRef#9522)
  Fix downloading in case of circular redirect (JabRef#9519)
  Typo: sucess -> success (JabRef#9520)
  New Crowdin updates (JabRef#9517)
  Add CHANGELOG.md entry for 9472
  Fix journal abbbrev checker for curly braces (JabRef#9504)
  Remove journal_abbreviations_ieee_strings.csv from journal lists (JabRef#9511)
  Bump mockito-core from 4.10.0 to 4.11.0 (JabRef#9513)
  Bump lucene-core from 9.4.1 to 9.4.2 (JabRef#9512)
  Bump checkstyle from 10.5.0 to 10.6.0 (JabRef#9514)
  Create a better solution for define multi line fields (JabRef#9456)
  Check links once a month
  Really ignore CHANGELOG.md in link check
  Fix spaces
  Add missing dots
  Squashed 'buildres/csl/csl-styles/' changes from 84dba23..43566f2
  try to repack deb file (JabRef#9506)
  ...
@Siedlerchr

Copy link
Copy Markdown
Member Author

Fuu. I hat this complicated shit. Still needs a server implementation like jersey or whatever.

@koppor

koppor commented Jan 5, 2023

Copy link
Copy Markdown
Member

Trying to do two things

  • Use RestEasy as server (seems to be more "lightweight"
  • Switch from glassfish jaxb to Jackson

Found these helpful links:

Following is not supported by Jackson:

JAXBContext.newInstance("org.jabref.logic.importer.fileformat.mods");

There is ObjectMapper and XmlMapper.

However, polymorphism in XMLElements is not supported by JAXB. See FasterXML/jackson-modules-base#127.

Thus, I tried to rewrite the Importers to a StAX-based parsing. This is a huge job, but would make the code more "clean" and hopefully remove this xjc stuff. Was possibly a bad idea 5 years ago to go for the JAXB way and not directly parse the XML.

@koppor

koppor commented Jan 5, 2023

Copy link
Copy Markdown
Member

And now we have

reads package org.jboss.resteasy.concurrent from both resteasy.core.spi and resteasy.core

@Siedlerchr

Copy link
Copy Markdown
Member Author

Yes. I encountered the split modules as well. I don't think this jaxb rewrite will help.
Jetty etc had also problems. In the end it's jlink again

@koppor

koppor commented Jan 6, 2023

Copy link
Copy Markdown
Member

Submitted RestEasy Issue https://issues.redhat.com/browse/RESTEASY-3272

Comment thread buildres/csl/csl-styles/archives-of-medical-research.csl
Comment thread src/main/java/org/jabref/logic/shared/restserver/rest/Root.java Outdated
@koppor

koppor commented Mar 18, 2023

Copy link
Copy Markdown
Member

Fun with modules:

error: duplicate module on application module path
  module in jakarta.activation

koppor and others added 5 commits March 18, 2023 01:12
* upstream/main: (26 commits)
  Remove bibtexml.xsd (We don't support BibTeXML any more)
  Rewrite code of MedlineImporter (JabRef#9673)
  Rename variable and add more documentation
  Fix checkstyle
  Add hanling of "field = {content\}"
  Add link to PR
  Add link to PR.
  JabRef writes a new backup file only if there is a change.
  Add debug output to log.txt
  Refine logging howto
  Change log level for non-found files during PDF indexing
  Initial ImportHandlerTest
  Streamline AppDirs paths
  add a clear history button in sub-menu
  Removed redundant list
  add for en.properties
  add Localization.lang for string
  correct changelog
  add test for getLastSearchHistory and change HashLinkedSet to ArrayList
  fix the checkstlye
  ...
@Siedlerchr

Copy link
Copy Markdown
Member Author

I could fix the duplicate module stuff, but we stilll have method too large...

Siedlerchr and others added 4 commits March 20, 2023 17:39
* upstream/main:
  Bump org.slf4j:slf4j-api from 2.0.6 to 2.0.7 in /buildSrc
  Bump org.slf4j:slf4j-api from 2.0.6 to 2.0.7
  Bump org.apache.tika:tika-core from 2.6.0 to 2.7.0
  Bump hmarr/auto-approve-action from 3.2.0 to 3.2.1
  Bump actions/deploy-pages from 1 to 2
  Bump org.eclipse.jgit:org.eclipse.jgit
  Bump org.mockito:mockito-core from 5.1.1 to 5.2.0
# Conflicts:
#	src/main/java/org/jabref/logic/layout/format/MarkdownFormatter.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants