Skip to content
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

Fix/arxiv test #6980

Merged
merged 11 commits into from
Oct 4, 2020
44 changes: 27 additions & 17 deletions src/test/java/org/jabref/logic/importer/fetcher/ArXivTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,29 +249,39 @@ public String getTestJournal() {
return "\"Journal of Geometry and Physics (2013)\"";
}

/**
* A phrase is a sequence of terms wrapped in quotes.
* Only documents that contain exactly this sequence are returned.
*/
@Test
public void supportsPhraseSearch() throws Exception {
List<BibEntry> resultWithPhraseSearch = fetcher.performSearch("ti:\"Taxonomy of Distributed\"");
List<BibEntry> resultWithOutPhraseSearch = fetcher.performSearch("ti:Taxonomy AND ti:of AND ti:Distributed");
// Phrase search result has to be subset of the default search result
assertTrue(resultWithOutPhraseSearch.containsAll(resultWithPhraseSearch));
}

/**
* A phrase is a sequence of terms wrapped in quotes.
* Only documents that contain exactly this sequence are returned.
*/
@Test
public void supportsPhraseSearchAndMatchesExact() throws Exception {
BibEntry expected = new BibEntry(StandardEntryType.Article)
.withField(StandardField.AUTHOR, "Tobias Büscher and Angel L. Diez and Gerhard Gompper and Jens Elgeti")
.withField(StandardField.TITLE, "Instability and fingering of interfaces in growing tissue")
.withField(StandardField.DATE, "2020-03-10")
.withField(StandardField.ABSTRACT, "Interfaces in tissues are ubiquitous, both between tissue and environment as well as between populations of different cell types. The propagation of an interface can be driven mechanically. % e.g. by a difference in the respective homeostatic stress of the different cell types. Computer simulations of growing tissues are employed to study the stability of the interface between two tissues on a substrate. From a mechanical perspective, the dynamics and stability of this system is controlled mainly by four parameters of the respective tissues: (i) the homeostatic stress (ii) cell motility (iii) tissue viscosity and (iv) substrate friction. For propagation driven by a difference in homeostatic stress, the interface is stable for tissue-specific substrate friction even for very large differences of homeostatic stress; however, it becomes unstable above a critical stress difference when the tissue with the larger homeostatic stress has a higher viscosity. A small difference in directed bulk motility between the two tissues suffices to result in propagation with a stable interface, even for otherwise identical tissues. Larger differences in motility force, however, result in a finite-wavelength instability of the interface. Interestingly, the instability is apparently bound by nonlinear effects and the amplitude of the interface undulations only grows to a finite value in time.")
.withField(StandardField.DOI, "10.1088/1367-2630/ab9e88")
.withField(StandardField.EPRINT, "2003.04601")
.withField(StandardField.DOI, "10.1088/1367-2630/ab9e88")
.withField(StandardField.FILE, ":http\\://arxiv.org/pdf/2003.04601v1:PDF")
.withField(StandardField.AUTHOR, "Fauzi Adi Rafrastara and Qi Deyu")
.withField(StandardField.TITLE, "A Survey and Taxonomy of Distributed Data Mining Research Studies: A Systematic Literature Review")
.withField(StandardField.DATE, "2020-09-14")
.withField(StandardField.ABSTRACT, "Context: Data Mining (DM) method has been evolving year by year and as of today there is also the enhancement of DM technique that can be run several times faster than the traditional one, called Distributed Data Mining (DDM). It is not a new field in data processing actually, but in the recent years many researchers have been paying more attention on this area. Problems: The number of publication regarding DDM in high reputation journals and conferences has increased significantly. It makes difficult for researchers to gain a comprehensive view of DDM that require further research. Solution: We conducted a systematic literature review to map the previous research in DDM field. Our objective is to provide the motivation for new research by identifying the gap in DDM field as well as the hot area itself. Result: Our analysis came up with some conclusions by answering 7 research questions proposed in this literature review. In addition, the taxonomy of DDM research area is presented in this paper. Finally, this systematic literature review provides the statistic of development of DDM since 2000 to 2015, in which this will help the future researchers to have a comprehensive overview of current situation of DDM.")
.withField(StandardField.EPRINT, "2009.10618")
.withField(StandardField.FILE, ":http\\://arxiv.org/pdf/2009.10618v1:PDF")
.withField(StandardField.EPRINTTYPE, "arXiv")
.withField(StandardField.EPRINTCLASS, "q-bio.TO")
.withField(StandardField.KEYWORDS, "q-bio.TO");
.withField(StandardField.EPRINTCLASS, "cs.DC")
.withField(StandardField.KEYWORDS, "cs.DC, cs.LG");

List<BibEntry> resultWithPhraseSearch = fetcher.performSearch("au:\"Tobias Diez\"");
List<BibEntry> resultWithOutPhraseSearch = fetcher.performSearch("au:Tobias Diez");
// Ensure that phrase search result is just a subset of the default search result
assertTrue(resultWithOutPhraseSearch.containsAll(resultWithPhraseSearch));
resultWithOutPhraseSearch.removeAll(resultWithPhraseSearch);
List<BibEntry> resultWithPhraseSearch = fetcher.performSearch("ti:\"Taxonomy of Distributed\"");

// There is only a single paper found by searching for Tobias Diez as author that is not authored by "Tobias Diez".
assertEquals(Collections.singletonList(expected), resultWithOutPhraseSearch);
// There is only a single paper found by searching that contains the exact sequence "Taxonomy of Distributed" in the title.
assertEquals(Collections.singletonList(expected), resultWithPhraseSearch);
}

@Test
Expand Down