Search in sources :

Example 6 with ImportFormatPreferences

use of org.jabref.logic.importer.ImportFormatPreferences in project jabref by JabRef.

the class BibtexDatabaseWriterTest method setUp.

@Before
public void setUp() {
    // Write to a string instead of to a file
    databaseWriter = new BibtexDatabaseWriter<>(StringSaveSession::new);
    database = new BibDatabase();
    metaData = new MetaData();
    bibtexContext = new BibDatabaseContext(database, metaData, new Defaults(BibDatabaseMode.BIBTEX));
    importFormatPreferences = mock(ImportFormatPreferences.class, Answers.RETURNS_DEEP_STUBS);
}
Also used : Defaults(org.jabref.model.Defaults) MetaData(org.jabref.model.metadata.MetaData) ImportFormatPreferences(org.jabref.logic.importer.ImportFormatPreferences) BibDatabase(org.jabref.model.database.BibDatabase) BibDatabaseContext(org.jabref.model.database.BibDatabaseContext) Before(org.junit.Before)

Example 7 with ImportFormatPreferences

use of org.jabref.logic.importer.ImportFormatPreferences in project jabref by JabRef.

the class AstrophysicsDataSystemTest method setUp.

@Before
public void setUp() throws Exception {
    ImportFormatPreferences importFormatPreferences = mock(ImportFormatPreferences.class);
    when(importFormatPreferences.getFieldContentParserPreferences()).thenReturn(mock(FieldContentParserPreferences.class));
    fetcher = new AstrophysicsDataSystem(importFormatPreferences);
    diezSliceTheoremEntry = new BibEntry();
    diezSliceTheoremEntry.setType(BibtexEntryTypes.ARTICLE);
    diezSliceTheoremEntry.setCiteKey("2014arXiv1405.2249D");
    diezSliceTheoremEntry.setField("author", "Diez, T.");
    diezSliceTheoremEntry.setField("title", "Slice theorem for Fr$\\backslash$'echet group actions and covariant symplectic field theory");
    diezSliceTheoremEntry.setField("year", "2014");
    diezSliceTheoremEntry.setField("archiveprefix", "arXiv");
    diezSliceTheoremEntry.setField("eprint", "1405.2249");
    diezSliceTheoremEntry.setField("journal", "ArXiv e-prints");
    diezSliceTheoremEntry.setField("keywords", "Mathematical Physics, Mathematics - Differential Geometry, Mathematics - Symplectic Geometry, 58B99, 58Z05, 58B25, 22E65, 58D19, 53D20, 53D42");
    diezSliceTheoremEntry.setField("month", "#may#");
    diezSliceTheoremEntry.setField("primaryclass", "math-ph");
    diezSliceTheoremEntry.setField("abstract", "A general slice theorem for the action of a Fr$\\backslash$'echet Lie group on a" + NEWLINE + "Fr$\\backslash$'echet manifolds is established. The Nash-Moser theorem provides the" + NEWLINE + "fundamental tool to generalize the result of Palais to this" + NEWLINE + "infinite-dimensional setting. The presented slice theorem is illustrated" + NEWLINE + "by its application to gauge theories: the action of the gauge" + NEWLINE + "transformation group admits smooth slices at every point and thus the" + NEWLINE + "gauge orbit space is stratified by Fr$\\backslash$'echet manifolds. Furthermore, a" + NEWLINE + "covariant and symplectic formulation of classical field theory is" + NEWLINE + "proposed and extensively discussed. At the root of this novel framework" + NEWLINE + "is the incorporation of field degrees of freedom F and spacetime M into" + NEWLINE + "the product manifold F * M. The induced bigrading of differential forms" + NEWLINE + "is used in order to carry over the usual symplectic theory to this new" + NEWLINE + "setting. The examples of the Klein-Gordon field and general Yang-Mills" + NEWLINE + "theory illustrate that the presented approach conveniently handles the" + NEWLINE + "occurring symmetries." + NEWLINE);
    famaeyMcGaughEntry = new BibEntry();
    famaeyMcGaughEntry.setType(BiblatexEntryTypes.ARTICLE);
    famaeyMcGaughEntry.setField("bibtexkey", "2012LRR....15...10F");
    famaeyMcGaughEntry.setField("author", "Famaey, B. and McGaugh, S. S.");
    famaeyMcGaughEntry.setField("title", "Modified Newtonian Dynamics (MOND): Observational Phenomenology and Relativistic Extensions");
    famaeyMcGaughEntry.setField("journal", "Living Reviews in Relativity");
    famaeyMcGaughEntry.setField("year", "2012");
    famaeyMcGaughEntry.setField("volume", "15");
    famaeyMcGaughEntry.setField("month", "#sep#");
    famaeyMcGaughEntry.setField("archiveprefix", "arXiv");
    famaeyMcGaughEntry.setField("doi", "10.12942/lrr-2012-10");
    famaeyMcGaughEntry.setField("eid", "10");
    famaeyMcGaughEntry.setField("eprint", "1112.3960");
    famaeyMcGaughEntry.setField("pages", "10");
    famaeyMcGaughEntry.setField("keywords", "astronomical observations, Newtonian limit, equations of motion, extragalactic astronomy, cosmology, theories of gravity, fundamental physics, astrophysics");
    sunWelchEntry = new BibEntry();
    sunWelchEntry.setType(BiblatexEntryTypes.ARTICLE);
    sunWelchEntry.setField("bibtexkey", "2012NatMa..11...44S");
    sunWelchEntry.setField("author", "Sun, Y. and Welch, G. C. and Leong, W. L. and Takacs, C. J. and Bazan, G. C. and Heeger, A. J.");
    sunWelchEntry.setField("doi", "10.1038/nmat3160");
    sunWelchEntry.setField("journal", "Nature Materials");
    sunWelchEntry.setField("month", "#jan#");
    sunWelchEntry.setField("pages", "44-48");
    sunWelchEntry.setField("title", "Solution-processed small-molecule solar cells with 6.7\\% efficiency");
    sunWelchEntry.setField("volume", "11");
    sunWelchEntry.setField("year", "2012");
    xiongSunEntry = new BibEntry();
    xiongSunEntry.setType(BiblatexEntryTypes.ARTICLE);
    xiongSunEntry.setField("bibtexkey", "2007ITGRS..45..879X");
    xiongSunEntry.setField("author", "Xiong, X. and Sun, J. and Barnes, W. and Salomonson, V. and Esposito, J. and Erives, H. and Guenther, B.");
    xiongSunEntry.setField("doi", "10.1109/TGRS.2006.890567");
    xiongSunEntry.setField("journal", "IEEE Transactions on Geoscience and Remote Sensing");
    xiongSunEntry.setField("month", "#apr#");
    xiongSunEntry.setField("pages", "879-889");
    xiongSunEntry.setField("title", "Multiyear On-Orbit Calibration and Performance of Terra MODIS Reflective Solar Bands");
    xiongSunEntry.setField("volume", "45");
    xiongSunEntry.setField("year", "2007");
    ingersollPollardEntry = new BibEntry();
    ingersollPollardEntry.setType(BiblatexEntryTypes.ARTICLE);
    ingersollPollardEntry.setField("bibtexkey", "1982Icar...52...62I");
    ingersollPollardEntry.setField("author", "Ingersoll, A. P. and Pollard, D.");
    ingersollPollardEntry.setField("doi", "10.1016/0019-1035(82)90169-5");
    ingersollPollardEntry.setField("journal", "\\icarus");
    ingersollPollardEntry.setField("keywords", "Atmospheric Circulation, Barotropic Flow, Convective Flow, Flow Stability, Jupiter Atmosphere, Rotating Fluids, Saturn Atmosphere, Adiabatic Flow, Anelasticity, Compressible Fluids, Planetary Rotation, Rotating Cylinders, Scaling Laws, Wind Profiles, PLANETS, JUPITER, SATURN, MOTION, INTERIORS, ATMOSPHERE, ANALYSIS, SCALE, BAROTROPY, CHARACTERISTICS, STRUCTURE, WINDS, VISCOSITY, DATA, CONVECTION, ROTATION, EDDY EFFECTS, ENERGY, ADIABATICITY, DIAGRAMS, REVIEW, LATITUDE, ZONES, VELOCITY, MATHEMATICAL MODELS, HEAT FLOW, EQUATIONS OF MOTION, FLUIDS, DYNAMICS, TEMPERATURE, GRADIENTS");
    ingersollPollardEntry.setField("month", "#oct#");
    ingersollPollardEntry.setField("pages", "62-80");
    ingersollPollardEntry.setField("title", "Motion in the interiors and atmospheres of Jupiter and Saturn - Scale analysis, anelastic equations, barotropic stability criterion");
    ingersollPollardEntry.setField("volume", "52");
    ingersollPollardEntry.setField("year", "1982");
    luceyPaulEntry = new BibEntry();
    luceyPaulEntry.setType(BiblatexEntryTypes.ARTICLE);
    luceyPaulEntry.setField("bibtexkey", "2000JGR...10520297L");
    luceyPaulEntry.setField("author", "Lucey, P. G. and Blewett, D. T. and Jolliff, B. L.");
    luceyPaulEntry.setField("doi", "10.1029/1999JE001117");
    luceyPaulEntry.setField("journal", "\\jgr");
    luceyPaulEntry.setField("keywords", "Planetology: Solid Surface Planets: Composition, Planetology: Solid Surface Planets: Remote sensing, Planetology: Solid Surface Planets: Surface materials and properties, Planetology: Solar System Objects: Moon (1221)");
    luceyPaulEntry.setField("pages", "20297-20306");
    luceyPaulEntry.setField("title", "Lunar iron and titanium abundance algorithms based on final processing of Clementine ultraviolet-visible images");
    luceyPaulEntry.setField("volume", "105");
    luceyPaulEntry.setField("year", "2000");
}
Also used : BibEntry(org.jabref.model.entry.BibEntry) FieldContentParserPreferences(org.jabref.logic.bibtex.FieldContentParserPreferences) ImportFormatPreferences(org.jabref.logic.importer.ImportFormatPreferences) Before(org.junit.Before)

Example 8 with ImportFormatPreferences

use of org.jabref.logic.importer.ImportFormatPreferences in project jabref by JabRef.

the class ArXivTest method setUp.

@Before
public void setUp() {
    ImportFormatPreferences importFormatPreferences = mock(ImportFormatPreferences.class);
    when(importFormatPreferences.getKeywordSeparator()).thenReturn(',');
    finder = new ArXiv(importFormatPreferences);
    entry = new BibEntry();
    sliceTheoremPaper = new BibEntry();
    sliceTheoremPaper.setType(BiblatexEntryTypes.ARTICLE);
    sliceTheoremPaper.setField("author", "Tobias Diez");
    sliceTheoremPaper.setField("title", "Slice theorem for Fréchet group actions and covariant symplectic field theory");
    sliceTheoremPaper.setField("date", "2014-05-09");
    sliceTheoremPaper.setField("abstract", "A general slice theorem for the action of a Fr\\'echet Lie group on a Fr\\'echet manifolds is established. The Nash-Moser theorem provides the fundamental tool to generalize the result of Palais to this infinite-dimensional setting. The presented slice theorem is illustrated by its application to gauge theories: the action of the gauge transformation group admits smooth slices at every point and thus the gauge orbit space is stratified by Fr\\'echet manifolds. Furthermore, a covariant and symplectic formulation of classical field theory is proposed and extensively discussed. At the root of this novel framework is the incorporation of field degrees of freedom F and spacetime M into the product manifold F * M. The induced bigrading of differential forms is used in order to carry over the usual symplectic theory to this new setting. The examples of the Klein-Gordon field and general Yang-Mills theory illustrate that the presented approach conveniently handles the occurring symmetries.");
    sliceTheoremPaper.setField("eprint", "1405.2249v1");
    sliceTheoremPaper.setField("file", "online:http\\://arxiv.org/pdf/1405.2249v1:PDF");
    sliceTheoremPaper.setField("eprinttype", "arXiv");
    sliceTheoremPaper.setField("eprintclass", "math-ph");
    sliceTheoremPaper.setField("keywords", "math-ph, math.DG, math.MP, math.SG, 58B99, 58Z05, 58B25, 22E65, 58D19, 53D20, 53D42");
}
Also used : BibEntry(org.jabref.model.entry.BibEntry) ImportFormatPreferences(org.jabref.logic.importer.ImportFormatPreferences) Before(org.junit.Before)

Example 9 with ImportFormatPreferences

use of org.jabref.logic.importer.ImportFormatPreferences in project jabref by JabRef.

the class DBLPFetcherTest method setUp.

@Before
public void setUp() {
    ImportFormatPreferences importFormatPreferences = mock(ImportFormatPreferences.class);
    when(importFormatPreferences.getFieldContentParserPreferences()).thenReturn(mock(FieldContentParserPreferences.class));
    dblpFetcher = new DBLPFetcher(importFormatPreferences);
    entry = new BibEntry();
    entry.setType(BibtexEntryTypes.ARTICLE.getName());
    entry.setCiteKey("DBLP:journals/stt/GeigerHL16");
    entry.setField(FieldName.TITLE, "Process Engine Benchmarking with Betsy in the Context of {ISO/IEC} Quality Standards");
    entry.setField(FieldName.AUTHOR, "Matthias Geiger and Simon Harrer and J{\\\"{o}}rg Lenhard");
    entry.setField(FieldName.JOURNAL, "Softwaretechnik-Trends");
    entry.setField(FieldName.VOLUME, "36");
    entry.setField(FieldName.NUMBER, "2");
    entry.setField(FieldName.YEAR, "2016");
    entry.setField(FieldName.URL, "http://pi.informatik.uni-siegen.de/stt/36_2/./03_Technische_Beitraege/ZEUS2016/beitrag_2.pdf");
    entry.setField("biburl", "http://dblp.dagstuhl.de/rec/bib/journals/stt/GeigerHL16");
    entry.setField("bibsource", "dblp computer science bibliography, http://dblp.org");
}
Also used : BibEntry(org.jabref.model.entry.BibEntry) FieldContentParserPreferences(org.jabref.logic.bibtex.FieldContentParserPreferences) ImportFormatPreferences(org.jabref.logic.importer.ImportFormatPreferences) Before(org.junit.Before)

Example 10 with ImportFormatPreferences

use of org.jabref.logic.importer.ImportFormatPreferences in project jabref by JabRef.

the class zbMATHTest method setUp.

@Before
public void setUp() throws Exception {
    ImportFormatPreferences importFormatPreferences = mock(ImportFormatPreferences.class);
    when(importFormatPreferences.getFieldContentParserPreferences()).thenReturn(mock(FieldContentParserPreferences.class));
    fetcher = new zbMATH(importFormatPreferences);
    donaldsonEntry = new BibEntry();
    donaldsonEntry.setType(BibtexEntryTypes.ARTICLE);
    donaldsonEntry.setCiteKey("zbMATH03800580");
    donaldsonEntry.setField("author", "S.K. {Donaldson}");
    donaldsonEntry.setField("journal", "Journal of Differential Geometry");
    donaldsonEntry.setField("issn", "0022-040X; 1945-743X/e");
    donaldsonEntry.setField("language", "English");
    donaldsonEntry.setField("keywords", "57N13 57R10 53C05 58J99 57R65");
    donaldsonEntry.setField("pages", "279--315");
    donaldsonEntry.setField("publisher", "International Press of Boston, Somerville, MA");
    donaldsonEntry.setField("title", "An application of gauge theory to four dimensional topology.");
    donaldsonEntry.setField("volume", "18");
    donaldsonEntry.setField("year", "1983");
    donaldsonEntry.setField("zbl", "0507.57010");
}
Also used : BibEntry(org.jabref.model.entry.BibEntry) FieldContentParserPreferences(org.jabref.logic.bibtex.FieldContentParserPreferences) ImportFormatPreferences(org.jabref.logic.importer.ImportFormatPreferences) Before(org.junit.Before)

Aggregations

ImportFormatPreferences (org.jabref.logic.importer.ImportFormatPreferences)11 Before (org.junit.Before)9 BibEntry (org.jabref.model.entry.BibEntry)7 FieldContentParserPreferences (org.jabref.logic.bibtex.FieldContentParserPreferences)5 ParserResult (org.jabref.logic.importer.ParserResult)2 BibDatabase (org.jabref.model.database.BibDatabase)2 MetaData (org.jabref.model.metadata.MetaData)2 File (java.io.File)1 FileReader (java.io.FileReader)1 IOException (java.io.IOException)1 StringWriter (java.io.StringWriter)1 Path (java.nio.file.Path)1 Collection (java.util.Collection)1 XMPMetadata (org.apache.jempbox.xmp.XMPMetadata)1 PDDocument (org.apache.pdfbox.pdmodel.PDDocument)1 PDPage (org.apache.pdfbox.pdmodel.PDPage)1 BibEntryWriter (org.jabref.logic.bibtex.BibEntryWriter)1 LatexFieldFormatter (org.jabref.logic.bibtex.LatexFieldFormatter)1 EntryComparator (org.jabref.logic.bibtex.comparator.EntryComparator)1 BibtexParser (org.jabref.logic.importer.fileformat.BibtexParser)1