Search in sources :

Example 1 with FieldFormatterCleanup

use of org.jabref.model.cleanup.FieldFormatterCleanup in project jabref by JabRef.

the class FieldFormatterCleanupsPanel method getFieldFormatterCleanup.

private FieldFormatterCleanup getFieldFormatterCleanup() {
    Formatter selectedFormatter = getFieldFormatter();
    String fieldKey = selectFieldCombobox.getSelectedItem().toString();
    return new FieldFormatterCleanup(fieldKey, selectedFormatter);
}
Also used : Formatter(org.jabref.model.cleanup.Formatter) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup)

Example 2 with FieldFormatterCleanup

use of org.jabref.model.cleanup.FieldFormatterCleanup in project jabref by JabRef.

the class MathSciNet method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    new MoveFieldCleanup("fjournal", FieldName.JOURNAL).cleanup(entry);
    new MoveFieldCleanup("mrclass", FieldName.KEYWORDS).cleanup(entry);
    new FieldFormatterCleanup("mrreviewer", new ClearFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.URL, new ClearFormatter()).cleanup(entry);
}
Also used : FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) MoveFieldCleanup(org.jabref.logic.cleanup.MoveFieldCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter)

Example 3 with FieldFormatterCleanup

use of org.jabref.model.cleanup.FieldFormatterCleanup in project jabref by JabRef.

the class AstrophysicsDataSystem method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    new FieldFormatterCleanup(FieldName.ABSTRACT, new RemoveBracesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.TITLE, new RemoveBracesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.AUTHOR, new NormalizeNamesFormatter()).cleanup(entry);
    // Remove ADS note
    new FieldFormatterCleanup("adsnote", new ClearFormatter()).cleanup(entry);
    // Move adsurl to url field
    new MoveFieldCleanup("adsurl", FieldName.URL).cleanup(entry);
}
Also used : NormalizeNamesFormatter(org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter) RemoveBracesFormatter(org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatter) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter) MoveFieldCleanup(org.jabref.logic.cleanup.MoveFieldCleanup)

Example 4 with FieldFormatterCleanup

use of org.jabref.model.cleanup.FieldFormatterCleanup in project jabref by JabRef.

the class DBLPFetcher method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    DoiCleanup doiCleaner = new DoiCleanup();
    FieldFormatterCleanup clearTimestampFormatter = new FieldFormatterCleanup(FieldName.TIMESTAMP, new ClearFormatter());
    doiCleaner.cleanup(entry);
    clearTimestampFormatter.cleanup(entry);
}
Also used : DoiCleanup(org.jabref.logic.cleanup.DoiCleanup) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter)

Example 5 with FieldFormatterCleanup

use of org.jabref.model.cleanup.FieldFormatterCleanup in project jabref by JabRef.

the class DoiFetcher method doPostCleanup.

private void doPostCleanup(BibEntry entry) {
    new FieldFormatterCleanup(FieldName.PAGES, new NormalizePagesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.URL, new ClearFormatter()).cleanup(entry);
}
Also used : FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter) NormalizePagesFormatter(org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter)

Aggregations

FieldFormatterCleanup (org.jabref.model.cleanup.FieldFormatterCleanup)33 Test (org.junit.Test)22 FieldFormatterCleanups (org.jabref.model.cleanup.FieldFormatterCleanups)20 LowerCaseFormatter (org.jabref.logic.formatter.casechanger.LowerCaseFormatter)10 BibEntry (org.jabref.model.entry.BibEntry)9 ClearFormatter (org.jabref.logic.formatter.bibtexfields.ClearFormatter)7 NormalizePagesFormatter (org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter)5 MoveFieldCleanup (org.jabref.logic.cleanup.MoveFieldCleanup)3 IdentityFormatter (org.jabref.logic.formatter.IdentityFormatter)3 NormalizeDateFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeDateFormatter)3 NormalizeMonthFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeMonthFormatter)3 StringReader (java.io.StringReader)2 NormalizeNamesFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter)2 RemoveBracesFormatter (org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatter)2 UpperCaseFormatter (org.jabref.logic.formatter.casechanger.UpperCaseFormatter)2 ParserResult (org.jabref.logic.importer.ParserResult)2 FormBuilder (com.jgoodies.forms.builder.FormBuilder)1 FormLayout (com.jgoodies.forms.layout.FormLayout)1 Component (java.awt.Component)1 ArrayList (java.util.ArrayList)1