Skip to content

Migrate fetchers to Search.g4 ANTLR parser. #13691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

turhantolgaunal
Copy link
Contributor

Closes #13607

  • Changed inherited fetcher classes to use ANTLR generated classes instead of lucene libraries.
  • Changed ACMPortalFetcher.java logic for transforming the parsed syntax to URL

TO DO:

  • Replace the logic in other fetcher classes to transform the parsed nodes into URL calls.
  • Modify other fetcher classes to correctly override changed inherited functions.

Steps to test

Using the Search.g4 syntax for searching on the web with different options.

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

-Changed inherited fetcher classes to use ANTLR generated classes instead of lucene libraries.
- Changed ACMPortalFetcher.java logic for transforming the parsed syntax to URL
@calixtus
Copy link
Member

Great start, to me it looks like your on the right track.

@calixtus calixtus changed the title pr: migrate fetchers to Search.g4 ANTLR parser. Migrate fetchers to Search.g4 ANTLR parser. Aug 14, 2025
@calixtus calixtus added dev: code-quality Issues related to code or architecture decisions component: fetcher labels Aug 14, 2025
- Changed ACMPortalFetcherTest unit test code to use Search.g4 generated classes instead of Lucene
- Removed trivial comment from ACMPortalFetcher
- Changed AbstractQueryTransformer methods to obey Search.g4 parser rules
- Modified ACMPortalFetcher to use the changed transformer logic
}

/**
* Constructing the url for the searchpage.
*
* @param query query node
* @param queryList list that contains the parsed nodes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Javadoc comment merely restates what is obvious from the parameter name and type. It should provide additional information about the expected format or constraints of the query list.

@jabref-machine
Copy link
Collaborator

JUnit tests of jabkit are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Source Code Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: fetcher dev: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Fetcher to Search.g4
3 participants